Multiple nested IF Statements

MMarks

New Member
Joined
Jan 8, 2018
Messages
6
I am trying to write the following IF statement
=IF(AW8>E8, "+", IF(AW8<E8, "-", IF(AW8=E8, "Y")))

However AW8 also contains a nested IF statement (See below), and therefore the arguments above are not showing correctly.
=IF(AV8<=19.99,"0",IF(AV8<=34. 5,"1",IF(AV8<49,"2",IF(AV8<63. 5,"3",IF(AV8<77,"4",IF(AV8>78, "5"))))))

Is there a way to resolve this?

Thanks
 
Did you use following formula in AW8?


=IF(AV8<=19.99,0,IF(AV8<=34.5,1,IF(AV8<49,2,IF(AV8<63.5,3,IF(AV8<77,4,5)))))


Because with your formula (=IF(AV8<=19.99,0,IF(AV8<=34. 5,1,IF(AV8<49,2,IF(AV8<63. 5,3,IF(AV8<77,4,IF(AV8>78, 5)))))), you will get + always because resulting value between 77 and 78 is not defined. If you keep cell value 78 then resulting value will be "FALSE" with this formula.
 
Last edited:
Upvote 0

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Statement in cell AW8. =IF(AV8<=19.99, "0"...... etc seems to be working fine.
Statement in cell AX8 =IF(AW8>E8, "+",.... etc is not returning the correct values.
For example
Cell AW8 shows 2 as result of =IF(AV8 <=19.99, "0"....
Cell AX8 shows + even though E8 is 3 which means it should show -
When I replace formula in AW8 with number 2 AX8 displays - which is correct.
 
Upvote 0
Statement in cell AW8. =IF(AV8<=19.99, "0"...... etc seems to be working fine.
Statement in cell AX8 =IF(AW8>E8, "+",.... etc is not returning the correct values.
For example
Cell AW8 shows 2 as result of =IF(AV8 <=19.99, "0"....
Cell AX8 shows + even though E8 is 3 which means it should show -
When I replace formula in AW8 with number 2 AX8 displays - which is correct.

Try to post a series of input values along with corresponding return values.
 
Upvote 0
Hi Mark,

I have used =IF(AV8<=19.99,0,IF(AV8<=34.5,1,IF(AV8<49,2,IF(AV8<63.5,3,IF(AV8<77,4,5))))).

Result Table
EAVAWAX
FormulaFormula
1.00 19.99 0.00 -
0.00 34.50 1.00 +
2.00 48.00 2.00 Y
4.00 62.00 3.00 -
3.00 76.00 4.00 +
5.00 78.00 5.00 Y

<tbody>
</tbody><colgroup><col span="2"><col span="2"></colgroup>

EAVAWAX
FormulaFormula
119.99=IF(AV8<=19.99,0,IF(AV8<=34.5,1,IF(AV8<49,2,IF(AV8<63.5,3,IF(AV8<77,4,5)))))=IF(AW8>E8, "+", IF(AW8<E8, "-", IF(AW8=E8, "Y")))
034.5=IF(AV9<=19.99,0,IF(AV9<=34.5,1,IF(AV9<49,2,IF(AV9<63.5,3,IF(AV9<77,4,5)))))=IF(AW9>E9, "+", IF(AW9<E9, "-", IF(AW9=E9, "Y")))
248=IF(AV10<=19.99,0,IF(AV10<=34.5,1,IF(AV10<49,2,IF(AV10<63.5,3,IF(AV10<77,4,5)))))=IF(AW10>E10, "+", IF(AW10<E10, "-", IF(AW10=E10, "Y")))
462=IF(AV11<=19.99,0,IF(AV11<=34.5,1,IF(AV11<49,2,IF(AV11<63.5,3,IF(AV11<77,4,5)))))=IF(AW11>E11, "+", IF(AW11<E11, "-", IF(AW11=E11, "Y")))
376=IF(AV12<=19.99,0,IF(AV12<=34.5,1,IF(AV12<49,2,IF(AV12<63.5,3,IF(AV12<77,4,5)))))=IF(AW12>E12, "+", IF(AW12<E12, "-", IF(AW12=E12, "Y")))
578=IF(AV13<=19.99,0,IF(AV13<=34.5,1,IF(AV13<49,2,IF(AV13<63.5,3,IF(AV13<77,4,5)))))=IF(AW13>E13, "+", IF(AW13<E13, "-", IF(AW13=E13, "Y")))


<tbody>
</tbody><colgroup><col span="2"><col><col></colgroup>
 
Upvote 0
Thanks, that seems to have fixed it!
Looks like the issue was the use of "" in my version of the nested IF in AW column...

Thanks again
 
Upvote 0

Forum statistics

Threads
1,215,456
Messages
6,124,939
Members
449,197
Latest member
k_bs

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