Nested IF() Alternative - Criterias

lattiz

New Member
Joined
Jan 19, 2005
Messages
3
Hello all,

Being my first post I would like to say thanks for the breadth of knowledge I have gained from this site and its patrons.

This is the situation I have. Given a value in a cell, say A1, I would like to return in B1 a value from column II below where A1 follows the criteria listed under column I (i.e. if A1 were 26%, B1 would populate with 20%).

I
>30%
25%< <30%
20%< <25%
15%< <20%
10%< <15%
<10%

II
0%
20%
40%
60%
80%
100%

I have thought of various ways of doing this (nested ifs, arrays, db) and was wondering if someone could throw out what they think is the CLEANEST solution to this problem.

Thanks much!
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
=LOOKUP(B1,{0;0.1;0.15;0.2;0.25;0.3},{1;0.8;0.6;0.4;0.2;0})

If so desired, the formula cell can be formatted as %.
 
Upvote 0
I had been trying to work with the vlookup. (couldn't quite get it to work for values greater than thirty.)

Aladin's solution is far more flexible, and in general far superior.

But for some reason on my next attempt my brain came up with the following:
(it only works because all of your bin sizes are in multiples of 5)

=CHOOSE(MIN(INT(A1/0.05)*(A1>=A3)+1,7),1,,0.8,0.6,0.4,0.2,0)
 
Upvote 0
Aladin,

Is there anyway to make the contents of your formula dynamic (i.e. have them linked from cells)?

Thanks
 
Upvote 0
lattiz said:
Aladin,

Is there anyway to make the contents of your formula dynamic (i.e. have them linked from cells)?

Thanks
aaLOOKUP lattiz.xls
BCDEFG
126%0.20.2LookupTable
20%100%
310%80%
415%60%
520%40%
625%20%
730%0%
8
Sheet1


Select F2:G7, go to the Name Box on the Formula Bar, type LTable, and hit enter. Then use:

D1:

=LOOKUP(B1,LTable)
 
Upvote 0

Forum statistics

Threads
1,214,596
Messages
6,120,438
Members
448,966
Latest member
DannyC96

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