Hi!
I have a Table 1 with price list changes for a commodity:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Date of change
[/TD]
[TD]Commodity ID
[/TD]
[TD]New Price
[/TD]
[/TR]
[TR]
[TD]2017 Jan 01[/TD]
[TD]132[/TD]
[TD]$10.5[/TD]
[/TR]
[TR]
[TD]2017 Jan 01[/TD]
[TD]150[/TD]
[TD]$20[/TD]
[/TR]
[TR]
[TD]2017 March 04[/TD]
[TD]132[/TD]
[TD]$12[/TD]
[/TR]
[TR]
[TD]2017 July 10[/TD]
[TD]132[/TD]
[TD]$15[/TD]
[/TR]
[TR]
[TD]2017 Aug 01[/TD]
[TD]150[/TD]
[TD]$25[/TD]
[/TR]
</tbody>[/TABLE]
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):
[TABLE="width: 500"]
<tbody>[TR]
[TD]Order Date
[/TD]
[TD]Commodity ID
[/TD]
[TD]Quantity
[/TD]
[TD]Unit price[/TD]
[/TR]
[TR]
[TD]2017 Jan 03[/TD]
[TD]132[/TD]
[TD]10[/TD]
[TD]$10.5
[/TD]
[/TR]
[TR]
[TD]2017 Jan 30[/TD]
[TD]132[/TD]
[TD]10[/TD]
[TD]$10.5
[/TD]
[/TR]
[TR]
[TD]2017 Mar 05[/TD]
[TD]150[/TD]
[TD]10[/TD]
[TD]$20
[/TD]
[/TR]
[TR]
[TD]2017 Aug 15[/TD]
[TD]132[/TD]
[TD]10[/TD]
[TD]$15
[/TD]
[/TR]
[TR]
[TD]2017 Aug 20[/TD]
[TD]150[/TD]
[TD]10[/TD]
[TD]$25
[/TD]
[/TR]
</tbody>[/TABLE]
How can I do that using Excel Formulas?
Thanks!
I have a Table 1 with price list changes for a commodity:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Date of change
[/TD]
[TD]Commodity ID
[/TD]
[TD]New Price
[/TD]
[/TR]
[TR]
[TD]2017 Jan 01[/TD]
[TD]132[/TD]
[TD]$10.5[/TD]
[/TR]
[TR]
[TD]2017 Jan 01[/TD]
[TD]150[/TD]
[TD]$20[/TD]
[/TR]
[TR]
[TD]2017 March 04[/TD]
[TD]132[/TD]
[TD]$12[/TD]
[/TR]
[TR]
[TD]2017 July 10[/TD]
[TD]132[/TD]
[TD]$15[/TD]
[/TR]
[TR]
[TD]2017 Aug 01[/TD]
[TD]150[/TD]
[TD]$25[/TD]
[/TR]
</tbody>[/TABLE]
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):
[TABLE="width: 500"]
<tbody>[TR]
[TD]Order Date
[/TD]
[TD]Commodity ID
[/TD]
[TD]Quantity
[/TD]
[TD]Unit price[/TD]
[/TR]
[TR]
[TD]2017 Jan 03[/TD]
[TD]132[/TD]
[TD]10[/TD]
[TD]$10.5
[/TD]
[/TR]
[TR]
[TD]2017 Jan 30[/TD]
[TD]132[/TD]
[TD]10[/TD]
[TD]$10.5
[/TD]
[/TR]
[TR]
[TD]2017 Mar 05[/TD]
[TD]150[/TD]
[TD]10[/TD]
[TD]$20
[/TD]
[/TR]
[TR]
[TD]2017 Aug 15[/TD]
[TD]132[/TD]
[TD]10[/TD]
[TD]$15
[/TD]
[/TR]
[TR]
[TD]2017 Aug 20[/TD]
[TD]150[/TD]
[TD]10[/TD]
[TD]$25
[/TD]
[/TR]
</tbody>[/TABLE]
How can I do that using Excel Formulas?
Thanks!