Computing.Net > Forums > Office Software > Excel If Statement

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Excel If Statement

Reply to Message Icon

Name: yhtak
Date: July 14, 2009 at 18:12:35 Pacific
OS: Windows XP
Subcategory: Microsoft Office
Comment:

I have a column that has both blank cells and cells populated with amounts, there are no formulas in any of the cells. I want to change the blank cells to 0, and do nothing with the cells that contain an amount, I want the amount to remain unchanged. I've tried =IF(ISBLANK(A1),"0",IF(ISNUMBER(A1),A1)), this puts the 0 I want in the blank cell, but also replaces my amount with a 0, when I want it to remain the original amount. Can you help me with my IF statement?



Sponsored Link
Ads by Google

Response Number 1
Name: Mike (by mmcconaghy)
Date: July 14, 2009 at 21:10:06 Pacific
Reply:

Try this instead of an =IF statement:

Select / Highlight all the cells in the target column
On the Task Bar,
Select Edit
Select Go To
Click the Special button at the bottom
Select Blanks
Click OK
Now type an equal sign and zero =0 DO NOT PRESS ENTER YET
Next, hold Ctrl key and press Enter

That should do it.

MIKE

http://www.skeptic.com/


0

Response Number 2
Name: DerbyDad03
Date: July 15, 2009 at 06:05:21 Pacific
Reply:

Mike's method will indeed work, but there a couple of subtleties to keep in mind.

1 - I believe that using =0 will cause Excel to recalculate the cells just like all the other formulae. In most cases this probably won't matter, but in a large spreadsheet with a large number of formulae, it could slow it down.

2 - When using the Tools...Options...Formula checkbox, these cells will show up as formulae. Probably not a big deal, but worth mentioning.

A method that avoids these issues is:

1 - Put a 0 in one of your blank cells
2 - Copy the cell (Ctrl-c or right-click...Copy)
3 - Select your range
4 - Use Edit...Paste Special...Operation: Add


Of course, both of these methods require that you have the Tools..Options...Zero Values option selected.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Office Software Forum Home


Sponsored links

Ads by Google


Results for: Excel If Statement

Microsoft Excel IF Statement www.computing.net/answers/office/microsoft-excel-if-statement/4444.html

Excel IF Statement Help Needed www.computing.net/answers/office/excel-if-statement-help-needed/7417.html

Excel IF statements and conditional www.computing.net/answers/office/excel-if-statements-and-conditional/7035.html