Hello,
I have a workbook with two worksheet. Please help me out with anything Vlookup/Index match, VBA etc..
On sheet1 I have column A= part number, column G=price and column M=location. On sheet2 I have column A= part number, column D= date, column M=price and column K=location.
On sheet2 on Column A has same item number with multiple rows with different date on column D. is there a way that can be done in VBA/Vlookup anything that look up the oldest date and copy price on column G and location to sheet1?
Thank you very much. This would save me half day of work
sheet1
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]G[/TD]
[TD]M[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Part number[/TD]
[TD]Price[/TD]
[TD]Location[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]G1APPLE[/TD]
[TD]8.00[/TD]
[TD]B13[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]G2PEAR[/TD]
[TD]9.00[/TD]
[TD]b5[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]G3ORANGE[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="class: grid, width: 300"]
<tbody>[TR]
[TD][/TD]
[TD]a[/TD]
[TD]d[/TD]
[TD]k[/TD]
[TD]m[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]part number[/TD]
[TD]date[/TD]
[TD]location[/TD]
[TD]price[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]G1APPLE[/TD]
[TD]10/08/2019[/TD]
[TD]B12[/TD]
[TD]5.00[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]G1APPLE[/TD]
[TD]10/01/2019[/TD]
[TD]B13[/TD]
[TD]8.00[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]G2PEAR[/TD]
[TD]10/03/2019[/TD]
[TD]B5[/TD]
[TD]9.00[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]G2PEAR[/TD]
[TD]12/05/2019[/TD]
[TD]B6[/TD]
[TD]6.50[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I have a workbook with two worksheet. Please help me out with anything Vlookup/Index match, VBA etc..
On sheet1 I have column A= part number, column G=price and column M=location. On sheet2 I have column A= part number, column D= date, column M=price and column K=location.
On sheet2 on Column A has same item number with multiple rows with different date on column D. is there a way that can be done in VBA/Vlookup anything that look up the oldest date and copy price on column G and location to sheet1?
Thank you very much. This would save me half day of work
sheet1
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]G[/TD]
[TD]M[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Part number[/TD]
[TD]Price[/TD]
[TD]Location[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]G1APPLE[/TD]
[TD]8.00[/TD]
[TD]B13[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]G2PEAR[/TD]
[TD]9.00[/TD]
[TD]b5[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]G3ORANGE[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="class: grid, width: 300"]
<tbody>[TR]
[TD][/TD]
[TD]a[/TD]
[TD]d[/TD]
[TD]k[/TD]
[TD]m[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]part number[/TD]
[TD]date[/TD]
[TD]location[/TD]
[TD]price[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]G1APPLE[/TD]
[TD]10/08/2019[/TD]
[TD]B12[/TD]
[TD]5.00[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]G1APPLE[/TD]
[TD]10/01/2019[/TD]
[TD]B13[/TD]
[TD]8.00[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]G2PEAR[/TD]
[TD]10/03/2019[/TD]
[TD]B5[/TD]
[TD]9.00[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]G2PEAR[/TD]
[TD]12/05/2019[/TD]
[TD]B6[/TD]
[TD]6.50[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]