Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Jody Mills   on Nov 08 In MS Office Category.

  
Question Answered By: Madison Campbell   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

Share: