If date < = list range, return value

Weeble

Board Regular
Joined
Nov 30, 2016
Messages
95
Office Version
  1. 365
I have a table with different dates in column A
[TABLE="width: 500"]
<tbody>[TR]
[TD]a[/TD]
[TD]b[/TD]
[TD]c[/TD]
[TD]d[/TD]
[/TR]
[TR]
[TD]2017-01-15[/TD]
[TD]Apples[/TD]
[TD]5[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2017-02-15[/TD]
[TD]Apples[/TD]
[TD]4[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

I also have a list with different prices depending on the time of date.

[TABLE="width: 500"]
<tbody>[TR]
[TD]2017-01-01[/TD]
[TD]25,5 $[/TD]
[/TR]
[TR]
[TD]2017-02-01[/TD]
[TD]27,6 $[/TD]
[/TR]
[TR]
[TD]2018-01-01[/TD]
[TD]32,4 $[/TD]
[/TR]
</tbody>[/TABLE]

I want to make a formula in D column that goes similiar. " IF col A =< Date from my list ; C * value from list )

So if the apples have been sold 2017-01-15 or earlier than that the calculated price should be 25,5.
But if it's been sold between 2017-02-01 and less than 2018-01-01 the price should be 27,6.

How would I do this an easy way?
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
=INDEX(E1:E3,MATCH(A1,D1:D3,1),1)

where A1 is your apple date
D1:D3 are your price table dates
E1:E3 are your prices
 
Upvote 0
it's so simple that I even forgot that you can put a 1 instead of 0.
Thank you :)
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,198
Members
452,616
Latest member
intern444

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