IF and/OR Help Please

Jezza25

New Member
Joined
Jan 29, 2011
Messages
16
Hi I am trying to combine the following 2 formulas, in Cell U6 is number 1 or 2, in cell H6 is a range of formula, as you can see by the ranges below I want it to show a different result for 1 and a certain quantity and 2 and a certain quantity. If you can assist that would be great


Formula 1: =IF(U6=1,IF(H6<5001,"upto 5,000",IF(H6<10001,"5,001 to 10,000",IF(H6<20001,"10,001 to 20,000",IF(H6<50001,"20,001 to 50,000",IF(H6<100001,"50,001 to 100,000",IF(H6<150001,"100,001 to 150,000","No Result")))))))

Formula 2
=IF(U6=2,IF(H6<2001,"upto 2,000",IF(H6<7501,"2,001 to 7,500",IF(H6<15001,"7,501 to 15,000",IF(H6<30001,"15,001 to 30,000",IF(H6<100001,"30,001 to 100,000",IF(H6<150001,"100,001 to 150,000","No")))))))

thanks

Jezza
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Perhaps this?

=IF(U6=1,LOOKUP(H6,{-1E+99,5001,10001,20001,50001,100001,150001},{"up to 5,000","5,001 to 10,000","10,001 to 20,000","20,001 to 50,000","50,001 to 100,000","100,001 to 150,000","No Result"}),IF(U6=2,LOOKUP(H6,{-1E+99,2001,7501,15001,30001,100001,150001},{"up to 2,000","2,001 to 7,500","7,501 to 15,000","15,001 to 30,000","30,001 to 100,000","100,001 to 150,000","No"}),"Unknown U6 Value"))
 
Upvote 0
Hi,

In addition to the in cell formula, you can create lookup tables.

Example:
<img src="http://northernocean.net/etc/mrexcel/20141016_screenshot.png" />

Formula in Cell B6 is:
=IF($B$2=1,INDEX($C$9:$C$16,MATCH(B4,$D$9:$D$16,1)),IF($B$2=2,INDEX($F$9:$F$16,MATCH(B4,$G$9:$G$16,1)),NA()))

Sample Workbook (with test grid):
<a href="http://northernocean.net/etc/mrexcel/20141016_Book1.zip">SAMPLE WORKBOOK</a>
sha256 checksum (zip file): 712e3bdb22501b0365d5678ad8dda6c5bb039ca1df797d7205fa92ae589b743d
 
Upvote 0

Forum statistics

Threads
1,215,433
Messages
6,124,861
Members
449,194
Latest member
HellScout

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