Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Too many Zeros

  Asked By: Jody    Date: Nov 08    Category: MS Office    Views: 539
  

I am working on an Excel sheet with over 9,000 lines. I'm trying to
delete all the Zero's (0) but if i use the replace, Crtl+F, the
items with the more numbers than just the zero will loose their
zeros. Here is an example:

0
0
0
500681
0
0
0
500682

How do i get rid of just the single digit number, which happen to be
just zero?

Share: 

 

5 Answers Found

 
Answer #1    Answered By: Bryson Smith     Answered On: Nov 08

Could you use conditional formatting to turn the font to white? or do
you need the zero to vanish completely?

 
Answer #2    Answered By: Minnie Romero     Answered On: Nov 08

Hi go to format cells, custom and use #,##? and it will get rid of
the 0's and leave the rest of the number.

 
Answer #3    Answered By: Madison Campbell     Answered On: Nov 08

Here is the way I would do it.
I take your problem as wanting to delete the value in the zero cells and not
the cell or the row.

Sub DeleteZeros()
'Preset starting point
StartColumn = 1 'A
StartRow = 1
'get last entry
EndOfFile = Cells(Rows.Count, StartColumn).End(xlUp).Row + 1
'Delete Zeros
While StartRow < EndOfFile
If Cells(StartRow, StartColumn).Value = 0 Then Cells(StartRow,
StartColumn).Value = Empty
StartRow = StartRow + 1
Wend
End Sub

 
Answer #4    Answered By: Duane Walker     Answered On: Nov 08

Replace has a "match entire cell contents" option. I think that's what you
need.

 
Answer #5    Answered By: Quinn Johnson     Answered On: Nov 08

To Hide entries that only contain 0, you can use the cell formatting. Go to
Format Cells and chose "Custom" under the category. This will get you a
collection of base formatting. Notice that some of the numeric formats
include a semicolon (and some contain two). The semi colons divide the
format into two or three possible formats. The first one is for positive
numbers and the second one is for negative numbers. The optional third one
is for the value zero.

So choose a format and either add the second semicolon or remove the
formatting after the second semicolon. For example, #,##0;[Red]-#,##0; will
colour negative numbers red and hide zero values.



You can get creative and put something like "zero" in the third position.
(Remember to add the quotes.)

 
Didn't find what you were looking for? Find more on Too many Zeros Or get search suggestion and latest updates.




Tagged: