Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replacing null with Zero in Excel

Status
Not open for further replies.
May 21, 2003
64
US
I would like to replace empty cells in excel with zero. Anyone know how to do this? Thanks.
 
if range("whatever cell").value="" then range("the cell").value=0

but im sure there is a much easier way to do this
 
Select the area
CTRL+F
Leave it blank and select "Entire cells Only"
Click replace
Enter 0
Rplace all

or being as we are in the VBA forum

Range("A1:A100").Replace What:="", Replacement:="0", LookAt:=xlWhole, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False

Rgds, Geoff
Si hoc legere scis, nimis eruditionis habes
Want the best answers to your questions ? - then read me baby one more time - faq222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top