Nested If Statement

MJK

Board Regular
Joined
Dec 4, 2002
Messages
179
I'm trying to write a nested if statement to extract dollar ranges from a column of data.

Example:

Dollar Amounts Less Than $50,000
Dollar Amounts $50,000 to $250,000
Dollar Amounts $250,000 to $1,000,000
Dollar Amounts $1,000,000 and Greater

Any help would be greatly Appreciated

MJK
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
=IF(I2<=50000,"Less than $50,000",IF(I2<=250000,"$50,000 to $250,000",IF(I2<=1000000,"$250,000 to $1,000,000",IF(I2>1000000,"Greater than $1,000,000"))))
 
Upvote 0
MJK said:
=IF(I2<=50000,"Less than $50,000",IF(I2<=250000,"$50,000 to $250,000",IF(I2<=1000000,"$250,000 to $1,000,000",IF(I2>1000000,"Greater than $1,000,000"))))

Since you have a lookup task, invoke a lookup formula instead of an IF-formula:
Book5
ABCDEFGHI
1Table
20Less Than $50,000Less Than $50,00023,000
350,000$50,000 to $250,000Less Than $50,00050,000
4250,000$250,000 to $1,000,000$50,000 to $250,000250,000
51,000,000$1,000,000 and Greater$1,000,000 and Greater1,200,000
6
7
Sheet1


H2:

=LOOKUP(I2-(LOOKUP(I2,$A$2:$A$5)=I2),$A$2:$B$5)

If you name A2:A5 AMOUNT and B2:B5 DESCRIPTION...

=LOOKUP(I2-(LOOKUP(I2,AMOUNT)=I2),AMOUNT,DESCRIPTION)

If you don't want to keep an external table...

=LOOKUP(I2-(LOOKUP(I2,{0;50000;250000;1000000})=I2),{0,"Less Than $50,000";50000,"$50,000 to $250,000";250000,"$250,000 to $1,000,000";1000000,"$1,000,000 and Greater"})
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

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