# Matching on multiple criteria with a date range lookup

#### BILLYBOB1972

##### New Member
I'm ok with index match formulas but I'm stuck with working out how to use a match with multiple criteria and finding a value based on a date range.

In the example below I need to match the reference but also find the price based on the date. The value in cells c2 & c3 should return 5.5 and cell c4 should return 5.75.

Is this possible. I've spent some time looking through multiple sites for assistance but I can't find anything that works. This may not even be a n index match so don't know if I'm even asking the right question. Hoping someone can point me in the right direction.

 Reference (Column A) Date (Column B) Price (Column C) Reference (Column E) From (Column F) To (Column G) Price (Column H) abc 01/04/2020 ABC 01/04/2019 11/04/2020 5.5 abc 10/04/2020 ABC 12/04/2020 5.75 abc 19/04/2020 DEF 01/01/2019 8

### Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

##### Well-known Member
Hi BillyBob1972,

Does this do what you want?

BillyBob1972.xlsx
ABCDEFGH
1Reference (Column A)Date (Column B)Price (Column C)Reference (Column E)From (Column F)To (Column G)Price (Column H)
2abc01-Apr-205.5ABC01-Apr-1911-Apr-205.5
3abc10-Apr-205.5ABC12-Apr-205.75
4abc19-Apr-205.75DEF01-Jan-198
Sheet1
Cell Formulas
RangeFormula
C2:C4C2=INDEX(\$H\$2:\$H\$6,MATCH(1,INDEX((\$E\$2:\$E\$6=A2)*((\$F\$2:\$F\$6<=B2)*((\$G\$2:\$G\$6>=B2)+(\$G\$2:\$G\$6=""))),0,1),0))

#### BILLYBOB1972

##### New Member

Works perfect. Thanks for your help.

Replies
5
Views
99
Replies
6
Views
196
Replies
16
Views
363
Replies
0
Views
54
Replies
7
Views
233

1,127,136
Messages
5,622,936
Members
415,941
Latest member
georgiana686

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