Matching on multiple criteria with a date range lookup

BILLYBOB1972

New Member
Joined
Jan 7, 2016
Messages
22
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)
abc01/04/2020ABC01/04/201911/04/20205.5
abc10/04/2020ABC12/04/20205.75
abc19/04/2020DEF01/01/20198
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

Toadstool

Well-known Member
Joined
Mar 5, 2018
Messages
1,449
Office Version
  1. 2016
Platform
  1. Windows
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))
 

Watch MrExcel Video

Forum statistics

Threads
1,129,795
Messages
5,638,373
Members
417,024
Latest member
Mrpica01

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
Top