Fill blank cells with 0

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.
 
P

pfsardella

For each rngB in Selection.SpecialCells(xlCellTypeBlanks)
rngB.Value=0
Next rngB


HTH
Paul
 
K

Ken Wright

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.
 
R

Ralph Winchell

It's not necessary to go through the Edit / Go To... steps. Selecting a
range, typing 0 and hit CTRL-ENTER is sufficient.
 
V

Vasant Nanavati

That won't work; only blanks need to be selected, which is the reason for
the Edit | GoTo.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top