# Nested IF() Alternative - Criterias

#### lattiz

##### New Member
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

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
=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 %.

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)

Awesome, thanks.

Aladin,

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

Thanks

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)

Replies
3
Views
95
Replies
1
Views
98
Replies
6
Views
851
Replies
5
Views
339
Replies
5
Views
281

Threads
1,220,987
Messages
6,157,238
Members
451,407
Latest member
vdaesety

### 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

### 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