# INDEX MATCH Query - Return A Value From A Range Based On Two Criteria

#### jonsharman

##### New Member
Hi All,

I am trying to return a monetary value using INDEX MATCH based on two criteria that will search through a range of data - example of the sheet below:

 DATA LOOKUP RETURN CO2 P D 116 P £20.00 0 - 99 £10.00 £0.00 100 - 109 £15.00 £15.00 110 - 119 £20.00 £20.00 120 - 129 £115.00 £90.00 130 - 139 £175.00 £150.00

<tbody>
</tbody>

I have named the ranges CO2, P and D and in the above example I want to return the figure £20.00 based on looking for the value 116 which exists between 110 - 119 in the CO2 range and the P range. Likewise if I was to search for 135 and and D I would want to return £150.00

I have tried using TRUE to search for a near match but I get a #N/A error and I just cannot see what I am doing wrong.

Any help would be appreciated.

Thanks

### Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Example:

Excel 2010
ABCDEFG
1DATALOOKUPRETURN
2CO2PD116P£20.00
30£10.00£0.00
4100£15.00£15.00
5110£20.00£20.00
6120£115.00£90.00
7130£175.00£150.00
Sheet1
Cell Formulas
RangeFormula
G2=LOOKUP(E2,A3:A7,INDEX(B3:C7,0,MATCH(F2,B2:C2,FALSE)))

Here is a suggestion. Use the index with the match functions together.
=index(B3:C7,match(E2,A3:A7,1),match(F2,B2:C2,False)). Using 1 for the match type will look for 120 (cell A6), but will look for the next lower number 110 (cell A5). This will select the value in B5.

Replies
3
Views
152
Replies
6
Views
291
Replies
1
Views
281
Replies
1
Views
554
Replies
3
Views
517

1,217,346
Messages
6,136,044
Members
449,981
Latest member
kjd513

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