"#VALUE" error from IF statement

derohanes

New Member
Joined
Aug 15, 2010
Messages
7
This works all the time with a new worksheet, but as I keep editing cells something happens. Say, I want to put a blank in cell B1 if A1 is blank. In B1 I use =IF(A1="","",A1). If I try to use B1 in a formula it treats it as a "0" and calculates fine. Sometimes though I'll get a "#VALUE" error in a cell. Meanwhile, the cells above it and below it in a column are acting fine. Something has happened to that cell's format. I've tried to format it as a number cell, and a general cell. Neither works. Can someone help with this issue?
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Keep in mind when you format a cell as a number, that's just the display of it. What I have found is easier for this situation is to make the formula if(A1="",0,A1) then use conditional formatting to make the font color white (or match the background color) so it appears to your eyes like it's blank and then it magically fills in when A1 is populated.
 
Upvote 0
Keep in mind when you format a cell as a number, that's just the display of it. What I have found is easier for this situation is to make the formula if(A1="",0,A1) then use conditional formatting to make the font color white (or match the background color) so it appears to your eyes like it's blank and then it magically fills in when A1 is populated.

To explain a little more when you put "" you are telling Excel to put a text entry there. Even though you format the cell to display as a number, when it tries to do calculations those are still going to be on the text value. So, when it tries to do number math to a text value it gets confused. So, if you have it put in a 0 that will satisfy the math parts. Then use conditional formatting that when this value is 0, or you can even have the conditional formatting be if A1 is blank, then change the font color so that it's just as effective as being blank to the user's eyes.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top