ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Fill blank cells with 0 (https://www.excelbanter.com/excel-programming/284304-fill-blank-cells-0-a.html)

Cheri[_2_]

Fill blank cells with 0
 
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.

[email protected]

Fill blank cells with 0
 
For each rngB in Selection.SpecialCells(xlCellTypeBlanks)
rngB.Value=0
Next rngB


HTH
Paul
--------------------------------------------------------------------------------------------------------------
Be advised to back up your WorkBook before attempting to make changes.
--------------------------------------------------------------------------------------------------------------

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.



Ken Wright

Fill blank cells with 0
 
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" wrote in message
...
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.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.545 / Virus Database: 339 - Release Date: 27/11/2003



Ralph Winchell

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



"Ken Wright" wrote in
:

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



Vasant Nanavati

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

--

Vasant


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



"Ken Wright" wrote in
:

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





Ralph Winchell

Fill blank cells with 0
 
Ahhh, I didn't see that part of the requirement.



"Vasant Nanavati" <vasantn *AT* aol *DOT* com wrote in news:
:

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




All times are GMT +1. The time now is 02:46 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com