How to lookup a date in a range and return a value if found

Akkedis

New Member
Joined
Oct 9, 2014
Messages
2
Hello experts!
How can I find a value in a list that is dependent on a entered date being found in a date range?
Eg.
I have a list of materials with valid-from and valid-to dates, and prices for those materials (in A1:D9)
Now I enter a order date (B12), and a list of materials (A14:A16).
Question: How do I find the correct price per material (B14:B16) based on my Order Date?
See sheet below:

ABC D E
1MaterialValid fromValid to Price
2Pen25.10.201331.12.2013 95.00
3Pen01.01.201424.10.2014 150.00
4Pen25.10.201431.12.2014 100.00
5Brush25.10.201310.03.2014 200.00
6Brush11.03.201431.12.2014 205.00
7Ruler25.10.201331.12.2013 99.00
8Ruler01.01.201424.10.2014 103.00
9Ruler25.10.201431.12.2014 111.00
10
11
12Order Date:15.10.2014
13MaterialPrice
14Pen
?
15Brush
?
16Ruler
?

<tbody>
</tbody>


Thanks in advance!
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Hi

Try:

=SUMIFS($D$2:$D$9,$A$2:$A$9,A14,$B$2:$B$9,"<"&$B$12,$C$2:$C$9,">"&$B$12)
 
Upvote 0
Actually should be this to be inclusive:

=SUMIFS($D$2:$D$9,$A$2:$A$9,A14,$B$2:$B$9,"<="&$B$12,$C$2:$C$9,">="&$B$12)
 
Upvote 0

Forum statistics

Threads
1,214,976
Messages
6,122,543
Members
449,089
Latest member
davidcom

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
Back
Top