In Excel 2007, why do I get a minus result for one cell but not the other when both cells are formatted exactly the same?
This is the formula I have in cell U36: =IFERROR(IF(U15="";"";(U15*2.5-T15*2)*2);"")
Then I have exactly the same formula (other cell references, but exactly the same pattern) in cell J17, but for J17 I get no minus displayed, only nothing is displayed (which is correct).
ISBLANK does not work if the cell contains a formula, even if the result of the formula is "". ISBLANK only gives TRUE when the cell is actually empty.
EDIT: Ignore suggested formula, I misread the requirement.
You had omitted a does not equal value and a FALSE option for the IF statement, both amendments underlined and bold.
0
hermesalphaAuthor Commented:
You were right Rob, the formula works now. But still the same minus figure. However, when I think about it, the cell is probably not counted as empty because there is a formula in it. Is there any way to make Excel count the cell as empty if there is no value in it BUT a formula?
In other words, "if U15 contains value" instead of "if U15 is not empty"?
If the result in U15 is zero then maybe the check in the other formula needs to check for zero not "".
For the result of U15 to be zero, it is evaluating the (J15/J19)*U14 part of the formula and the result is zero; if the result of that part of the formula was an error the result would be "".
0
hermesalphaAuthor Commented:
Great, that worked, thanks! I only needed to change the "" to 0, like this:
=IFERROR(IF(U15=0;"";(U15*2.5-T15*2)*2);"")
0
Question has a verified solution.
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
You'd be better uploading a sample with some values to show context.