View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
alina b. alina b. is offline
external usenet poster
 
Posts: 5
Default SELECTIVE DELETE

try this

Sub deleteZero()

For x = 1 To 65536
If Cells(x, 13).Value = 0 Then Cells(x, 13).Value = ""
Next

End Sub

wrote:
I would like to delete all cells in row M with value 0,

However, all cells in row M contain the formula:

=IF(L8=2004, 2006, 0)

because I used this formula to produce a value of 2006 in M8 where L8 =
2004

I need all the cells that do not read 2006 to be completely blank
(contain no formula or value).