Excel does not return 0

mkr9999

New Member
Joined
Mar 25, 2021
Messages
3
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Opposite problem than most... I have several models that I inherited that return blank on a blank cell. Excel should default to return a zero. I want it to return a zero, as it is causing other formulas to error out. The formula in question is a simple index match referring to another worksheet. The cell it is referring to is indeed blank (no spaces or formula within that cell). Any thoughts?
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
=INDEX('Util B'!$D$18:$IS$211,MATCH($D9,'Util B'!$A$18:$A$211,0),MATCH($B9,'Util B'!$D$18:$IS$18,0))
I forced it to return 0 with
=if (AboveFormula = "",0,AboveFormula) but I shouldn't have to do that.

Another one:
=IF(H9=0,E9,G9) if E9 or G9 are blank, should return a zero. Again, forced to return 0 with:
=IF(IF(H9=0,E9,G9)="",0,IF(H9=0,E9,G9))
 
Upvote 0
(You finally just posted the formula.)

Re: ``The cell it is referring to is indeed blank (no spaces or formula within that cell)``. Looks can be deceiving.

The only way to truly know is use formulas of the form =ISBLANK(A1).

It is possible that the cell that appears to have no constant or formula actually contains the null string that was copy-and-pasted-value.

To demonstrate, enter ="" into A1, then copy and paste-value back into A1.
 
Last edited:
Upvote 0
Solution
Both those formulae will return 0 if the relevant cell is genuinely empty.
 
Upvote 0
Re: Looks can be deceiving.

The only way to truly know is use formulas of the form =ISBLANK(A1).

It is possible that the cell that appears to have no constant or formula actually contains the null string that was copy-and-pasted-value.

To demonstrate, enter ="" into A1, then copy and paste-value back into A1.


Thank you @joeu2004 . The data source was pasted from another file, and that is the issue.
 
Upvote 0
mkr9999

You said
"..as it is causing other formulas to error out."
So i understand that cell value is not really zero.

But ... verify
File> Options> Advanced> Display options for this spreadsheet
if the checkbox
Show zero in cells whose value is zero
is checked

Just in case...

M.
 
Upvote 0

Forum statistics

Threads
1,215,440
Messages
6,124,882
Members
449,193
Latest member
PurplePlop

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