View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Mike Mike is offline
external usenet poster
 
Posts: 3,101
Default How do I get the blank cells in excell to fill in with 0?

Hi,

Do you really want to fill all blank cells with a zero because it will take
a very long time to check and then fiill the 16.7 million cells on a 2003
worksheet. If you have lots of patience then the code below will do it but I
suspect you need to clarify.

Sub fillit()
For y = 1 To 65536
For x = 1 To 256
If Cells(y, x).Value = "" Then
Cells(y, x).Value = 0
End If
Next
Next
End Sub

Mike

"CrazyBOBO" wrote:

I have an excell sheet and I want blank cells to automatically fill in with a
"0". I have tried formating, but that dose't work. I have tried a formula,
that works, but if the cells are filled in the the formula is gone. If I save
this sheet and use it again then the "0" will be gone with a formula. This is
driving me crazy.