Nested IF function is not working

sprinklerman

New Member
Joined
Jan 19, 2016
Messages
2
I am having problems with this IF function, It is for pricing with price breaks for areas over 20000, and a bigger break for areas over 30000. Any help would be greatly appreciated.

The background! B9, C10, D10, and E10 are on another sheet in the workbook.

=IF(D2<4167,background!B9,IF(4168<d2>19999,(background!C10),IF(20000<d2>29999,(background!D10),IF(D2>30000,(background!E10)))))</d2></d2>
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
This doesnt quite make sense.

You're testing D2 for various limits and wanting to return certain cells fromt he looks of things.

What are those limits and corresponding cells?
 
Upvote 0
How about: =IF(D2<4167,background!B9,IF(D2<20000,background!C10,IF(D2<30000,background!D10,background!E10)))
 
Upvote 0
Welcome to the board.
Looks like parts of your formula got cut off.
Forum software tends to treat < and > symbols as HTML code, and stuff gets cut off.
When posting formulas, put spaces around those symbols.

Anyway, I'd guess you were trying something like

=IF(D2<4167,background!B9,IF(4168 < D2 < 19999,(background!C10),IF(20000 < D2 < 29999,(background!D10),IF(D2>30000,(background!E10)))))

That's not valid syntax
You'd have to do
=AND(D2>=4168,D2<20000)

However, you don't need to test for the >=4168, because the formula already did that with the first IF, IF(D2<4167

Try like this
=IF(D2<4167,background!B9,IF(D2<19999,background!C10,IF(D2<29999,background!D10,background!E10)))
 
Upvote 0

Forum statistics

Threads
1,215,028
Messages
6,122,753
Members
449,094
Latest member
dsharae57

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