Get Price from price list changes file on the basis of order date

exeluser1

New Member
Joined
Jun 18, 2017
Messages
6
Hi!

I have a Table 1 with price list changes for a commodity:
Date of change
Commodity ID
New Price
2017 Jan 01132$10.5
2017 Jan 01150$20
2017 March 04132$12
2017 July 10132$15
2017 Aug 01150$25

<tbody>
</tbody>

And I have a Table 2 with orders (but w/o prices), and I need to get correct price from Table 1 on the basis of order date so it should look like (marked red):

Order Date
Commodity ID
Quantity
Unit price
2017 Jan 0313210$10.5
2017 Jan 3013210$10.5
2017 Mar 0515010$20
2017 Aug 1513210$15
2017 Aug 2015010$25

<tbody>
</tbody>


How can I do that using Excel Formulas?

Thanks!
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
More explanation:
Order date (Table 2) should be compared to price change dates, and the closest from the past (Table 1) should be taken (or the same date if order date equals date of change).
 
Upvote 0

Forum statistics

Threads
1,214,872
Messages
6,122,025
Members
449,060
Latest member
LinusJE

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