# index formulas

#### J Lee

##### New Member
hello,

i'm having problems with the following formula:

it is used to take an index to average, and associate a "ranking" based on certain parameters (between 1-2, or 2-3, or 3-4, etc). I have used this formula in many instances with a lot of success, however, i'm having issues this one time, and can't figure out why. it's is only working when i have a value that is "greater than" (please see formula), and when the value is less than, it is giving me a "value" error, which seems to be derived from the "match" part of the formula.

=INDEX(\$B\$21:\$B\$24,IF(B56>\$H\$21,1,MIN(MATCH((AY\$19:AY\$45),(\$H\$21:\$H\$24),-1)+1,8)),0)

here is a "translation" of the formula:

=INDEX(value to be returned,IF(lookup value>highest # in range,1,MIN(MATCH((list of all lookup values),(minimums to qualify for the value to be returned),-1,+1,8)),0)

thanks for any help.

k

### Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.

#### RoryA

##### MrExcel MVP, Moderator
Did you array-enter it?

#### J Lee

##### New Member
I've never had to hold ctrl+shift+enter when I enter the formula if that's what you mean...

#### barry houdini

##### MrExcel MVP
That formula usually needs to be array-entered, as Rory suggests. In which cell or cells are you using it?

It'll work OK if the IF function test is TRUE because that part of the formula doesn't need CSE, but the MATCH part does because MATCH normally expects a single value as the first argument, you're using a range there.

If you use the formula somewhere in rows 19 to 45 you might still get a result....but possibly not the one you want.

This version doesn't require CSE

=INDEX(\$B\$21:\$B\$24,IF(B56>\$H\$21,1,MIN(INDEX(MATCH(AY\$19:AY\$45,\$H\$21:\$H\$24,-1),0)+1,8)),0)

H21:H24 should be sorted descending

#### J Lee

##### New Member
it's now giving me an #N/A error...

#### RoryA

##### MrExcel MVP, Moderator
I guess one or more of your values is not matching.

Replies
4
Views
90
Replies
7
Views
48
Replies
3
Views
199
Replies
6
Views
117
Replies
8
Views
170

1,191,701
Messages
5,988,177
Members
440,135
Latest member
DCDavid

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

### Which adblocker are you using?

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

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