nested if formula with AND or OR

Cossie

Active Member
Joined
May 6, 2002
Messages
323
Hello
i would like some assistance with my Nested if statement please. my formula is:
=IF(OR(AND(DESIGNReport!$K6>'Cash Category Ranges '!$F$3:$F$10),AND(DESIGNReport!K6<='Cash Category Ranges '!$G$3:$G$10)),'Cash Category Ranges '!H3:H10,"X")
This returns correctly for the first category but incorrectly for any other condition. I would like it to look at DESIGNReport!$K6 and if it is between $50 k and $100 k return 2 and so on.
any assistance would be appreciated.
With thanks



-$ 300,000$ 50,000
1​
$ 50,001$ 100,000
2​
$ 100,001$ 150,000
3​
$ 150,001$ 200,000
4​
$ 200,001$ 250,000
5​
$ 250,001$ 300,000
6​
$ 300,001$ 600,000
7​
$ 600,001$ 2,000,000
8​
 

Some videos you may like

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

StephenCrump

MrExcel MVP
Joined
Sep 18, 2013
Messages
4,054
Office Version
  1. 365
Platform
  1. Windows
Your formula construction is incorrect.

It will return the vector {1;2;3;4;5;6;7;8} (i.e. 'Cash Category Ranges '!H3:H10) if DESIGNReport!$K6 is greater than every value in 'Cash Category Ranges '!$F$3:$F$10,
OR if DESIGNReport!$K6 is less than or equal to every value in 'Cash Category Ranges '!$G$3:$G$10, i.e. if DESIGNReport!$K6 > $600,000.01 OR if DESIGNReport!$K6 <=$50,000.

In versions earlier than Excel 365, the result will display as 1, but if you evaluate the formula using F2 you'll see the result is actually {1;2;3;4;5;6;7;8}. So if DESIGNReport!$K6 is $20,000, say, the result displayed (1) will appear to be correct, but it is not really.

You could use VLOOKUP instead:

ABCDEFG
1
2
3300,000.00-300,000.001
4650,000.012
5100,000.013
6150,000.014
7200,000.015
8250,000.016
9300,000.017
10600,000.018
112,000,000.01X
Cash Category Ranges
Cell Formulas
RangeFormula
B3B3=DESIGNreport!K6
B4B4=IFERROR(VLOOKUP(B3,F3:G11,2),"X")
 

Watch MrExcel Video

Forum statistics

Threads
1,123,530
Messages
5,602,200
Members
414,513
Latest member
junbuggle

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
Top