Formula Error

gtd526

Well-known Member
Joined
Jul 30, 2013
Messages
660
Office Version
  1. 2019
Platform
  1. Windows
Hello,

I want to perform a subtraction in place of "Yes".
IFERROR(IF(AND($B5<0,$Z5>ABS($B5)),"Yes",IF(AND($B5<0,$Z5=ABS($B5)),"Tie","")),"") = shows Yes, which is correct (AO6).
I want it to perform a Subtraction instead of "Yes".
IFERROR(IF(AND($B5<0,$Z5>ABS($B5)),Z5-ABS(B5),IF(AND($B5<0,$Z5=ABS($B5)),"Tie","")),"") = shows "Blank" (AO5).

If I put this formula in another cell(M5) Z5-ABS(B5), I get the correct answer. See below.

NFL.xlsm
BMZAO
5-2.53.563.5
6-78Yes
Weekly Picks
Cell Formulas
RangeFormula
M5M5=Z5-ABS(B5)
Z5:Z6Z5=IFERROR(VLOOKUP($A5,'ATS Trends'!$A$2:$F$65,5,0),"")
AO5AO5=IFERROR(IF(AND($B5<0,$Z5>ABS($B5)),Z5-ABS(B5),IF(AND($B5<0,$Z5=ABS($B5)),"Tie","")),"")
AO6AO6=IFERROR(IF(AND($B6<0,$Z6>ABS($B6)),"Yes",IF(AND($B6<0,$Z6=ABS($B6)),"Tie","")),"")
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
It seems to work for me.

If I put:
Excel Formula:
=IFERROR(IF(AND($B5<0,$Z5>ABS($B5)),Z5-ABS(B5),IF(AND($B5<0,$Z5=ABS($B5)),"Tie","")),"")
in cell A05, it returns 3.5

If it does not for you, then verify that the values in B5 and Z5 are actually entered as numbers and not text.
You can do that by entering these formulas anywhere and see if they both return TRUE.
=ISNUMBER(B5)
=ISNUMBER(Z5)

If either returns FALSE, then you have "numbers entered as text".
 
Upvote 0
Solution
It seems to work for me.

If I put:
Excel Formula:
=IFERROR(IF(AND($B5<0,$Z5>ABS($B5)),Z5-ABS(B5),IF(AND($B5<0,$Z5=ABS($B5)),"Tie","")),"")
in cell A05, it returns 3.5

If it does not for you, then verify that the values in B5 and Z5 are actually entered as numbers and not text.
You can do that by entering these formulas anywhere and see if they both return TRUE.
=ISNUMBER(B5)
=ISNUMBER(Z5)

If either returns FALSE, then you have "numbers entered as text".
Yes. The formula is OK.
Once I plugged in the "ISNUMBER", it was coming back as True.
So I looked at Conditional Formatting, and there was the problem.
If it was <> Tie, it would apply White font. There was the problem.
It was correct the whole time.
Thanks for the reply.
 
Upvote 0
So I looked at Conditional Formatting, and there was the problem.
If it was <> Tie, it would apply White font. There was the problem.
It was correct the whole time.
Ah, so it was returning the correct value, you just couldn't see it!
 
Upvote 0

Forum statistics

Threads
1,215,869
Messages
6,127,415
Members
449,382
Latest member
DonnaRisso

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