ways around nested IF functions...

msouthall

New Member
Joined
Nov 27, 2008
Messages
5
Hi guys,

This is my first post and i'm not particularly advanced at Excel so apologies if this is a stupid question.

I'm using nested IF functions to reduce a large number of bands to a smaller set using the following formula:

=IF(LEFT(D4,1)="<","< 150",IF(LEFT(D4,3)="150","150-300",IF(LEFT(D4,3)="175","150-300",IF(LEFT(D4,3)="200","150-300",IF(LEFT(D4,3)="225","150-300",IF(LEFT(D4,3)="250","150-300",IF(LEFT(D4,3)="275","150-300","NO")))))))

However im stuck at 275 and need to go to 2000!

All help much appreciated

Matt
 
=LOOKUP(IF(LEFT(D4,1)="<",0,IF(LEFT(D4,1)=">",2000,--(TRIM(LEFT(D4,FIND("<",D4)-1))))),{0,"< 150";150,"150-300";300,"300-450";450,"450-600";600,"600-750";750,"750-900";900,"900+"})
though I suspect Barry's next version will be neater... :)
 
Last edited:
Upvote 0

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
I'm not sure if Rory's LOOKUP might be a better approach but sticking with my original method perhaps

=IF(LEFT(D4)="<","<150",IF(LEFT(D4)=">",">900",IF(LEFT(D4,4)+0>=900,">900",FLOOR(LEFT(D4,3),150)&"-"&FLOOR(LEFT(D4,3),150)+150)))
 
Upvote 0
There's no need. Just Fedex the real thing... :biggrin:
 
Upvote 0

Forum statistics

Threads
1,216,072
Messages
6,128,631
Members
449,460
Latest member
jgharbawi

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