Fill blank cells with 0

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to fill all the blank cells with 0 without having to copy and paste 100+ times. I tried "IF" function, but must not be entering it correctly as I can't get it to work.
 
For each rngB in Selection.SpecialCells(xlCellTypeBlanks)
rngB.Value=0
Next rngB


HTH
Paul
 
No need for code - Select the entire range, do Edit / Go To / Special / Blanks,
then type 0 and hit CTRL+ENTER.

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 00/02/03

----------------------------------------------------------------------------
Newsgroups - Where you really can get a free lunch!!
----------------------------------------------------------------------------



Cheri said:
I want to fill all the blank cells with 0 without having to copy and paste
100+ times. I tried "IF" function, but must not be entering it correctly as I
can't get it to work.
 
It's not necessary to go through the Edit / Go To... steps. Selecting a
range, typing 0 and hit CTRL-ENTER is sufficient.
 
That won't work; only blanks need to be selected, which is the reason for
the Edit | GoTo.
 
Back
Top