I have a table that contains productid and price date. The price has gone through changes overtime and need to find the price value based on specific date but the this specific date fall between a range of dates.
Here is my work table:
[TABLE="width: 225"]
<tbody>[TR]
[TD][TABLE="width: 225"]
<tbody>[TR]
[TD]Product ID[/TD]
[TD]Price Date[/TD]
[TD]Need price[/TD]
[/TR]
[TR]
[TD]2512330[/TD]
[TD]05/07/2016[/TD]
[TD]???[/TD]
[/TR]
[TR]
[TD]2512330[/TD]
[TD]06/07/2016[/TD]
[TD]???[/TD]
[/TR]
[TR]
[TD]2512330[/TD]
[TD]06/13/2016[/TD]
[TD]???[/TD]
[/TR]
[TR]
[TD]2512330[/TD]
[TD]07/20/2016[/TD]
[TD]???[/TD]
[/TR]
[TR]
[TD]2512330[/TD]
[TD]08/27/2016[/TD]
[TD]???[/TD]
[/TR]
[TR]
[TD]2512330[/TD]
[TD]09/22/2016[/TD]
[TD]???[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Here is my source table:
[TABLE="width: 824"]
<tbody>[TR]
[TD]Product ID[/TD]
[TD]Current Update[/TD]
[TD]Price[/TD]
[TD]First Update[/TD]
[TD]Price[/TD]
[TD]Second Update[/TD]
[TD]Price[/TD]
[TD]Third Update[/TD]
[TD]Price[/TD]
[TD]Fourth Update[/TD]
[TD]Price[/TD]
[TD]Fifth Update[/TD]
[TD]Price[/TD]
[/TR]
[TR]
[TD="align: right"]2143480[/TD]
[TD="align: right"]5/2/2017[/TD]
[TD="align: right"]405.60[/TD]
[TD="align: right"]8/18/2016[/TD]
[TD="align: right"]375.60[/TD]
[TD="align: right"]12/23/2015[/TD]
[TD="align: right"]344.88[/TD]
[TD="align: right"]5/29/2015[/TD]
[TD="align: right"]319.08[/TD]
[TD="align: right"]10/20/2014[/TD]
[TD="align: right"]292.99[/TD]
[TD="align: right"]10/1/1996[/TD]
[TD="align: right"]0.00[/TD]
[/TR]
[TR]
[TD="align: right"]2512330[/TD]
[TD="align: right"]5/2/2017[/TD]
[TD="align: right"]18.36[/TD]
[TD="align: right"]12/6/2016[/TD]
[TD="align: right"]16.70[/TD]
[TD="align: right"]6/3/2016[/TD]
[TD="align: right"]15.62[/TD]
[TD="align: right"]12/1/2015[/TD]
[TD="align: right"]14.22[/TD]
[TD="align: right"]5/14/2015[/TD]
[TD="align: right"]12.94[/TD]
[TD="align: right"]12/4/2014[/TD]
[TD="align: right"]11.77[/TD]
[/TR]
[TR]
[TD="align: right"]3089421[/TD]
[TD="align: right"]1/1/2017[/TD]
[TD="align: right"]7.77[/TD]
[TD="align: right"]4/1/2016[/TD]
[TD="align: right"]7.20[/TD]
[TD="align: right"]8/24/2015[/TD]
[TD="align: right"]6.67[/TD]
[TD="align: right"]12/15/2014[/TD]
[TD="align: right"]6.30[/TD]
[TD="align: right"]3/17/2014[/TD]
[TD="align: right"]5.83[/TD]
[TD="align: right"]8/30/2013[/TD]
[TD="align: right"]5.31[/TD]
[/TR]
</tbody>[/TABLE]
You can see that my work table has only productid but multiple price dates, that's where I need to find the price that correspond to that date and unfortunately it falls between a range. I have tried combination of vlookup and match and it did not work, also tried some index/match but no luck.
Any help/direction will greatly appreciated.
Thanks,
octord
Here is my work table:
[TABLE="width: 225"]
<tbody>[TR]
[TD][TABLE="width: 225"]
<tbody>[TR]
[TD]Product ID[/TD]
[TD]Price Date[/TD]
[TD]Need price[/TD]
[/TR]
[TR]
[TD]2512330[/TD]
[TD]05/07/2016[/TD]
[TD]???[/TD]
[/TR]
[TR]
[TD]2512330[/TD]
[TD]06/07/2016[/TD]
[TD]???[/TD]
[/TR]
[TR]
[TD]2512330[/TD]
[TD]06/13/2016[/TD]
[TD]???[/TD]
[/TR]
[TR]
[TD]2512330[/TD]
[TD]07/20/2016[/TD]
[TD]???[/TD]
[/TR]
[TR]
[TD]2512330[/TD]
[TD]08/27/2016[/TD]
[TD]???[/TD]
[/TR]
[TR]
[TD]2512330[/TD]
[TD]09/22/2016[/TD]
[TD]???[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Here is my source table:
[TABLE="width: 824"]
<tbody>[TR]
[TD]Product ID[/TD]
[TD]Current Update[/TD]
[TD]Price[/TD]
[TD]First Update[/TD]
[TD]Price[/TD]
[TD]Second Update[/TD]
[TD]Price[/TD]
[TD]Third Update[/TD]
[TD]Price[/TD]
[TD]Fourth Update[/TD]
[TD]Price[/TD]
[TD]Fifth Update[/TD]
[TD]Price[/TD]
[/TR]
[TR]
[TD="align: right"]2143480[/TD]
[TD="align: right"]5/2/2017[/TD]
[TD="align: right"]405.60[/TD]
[TD="align: right"]8/18/2016[/TD]
[TD="align: right"]375.60[/TD]
[TD="align: right"]12/23/2015[/TD]
[TD="align: right"]344.88[/TD]
[TD="align: right"]5/29/2015[/TD]
[TD="align: right"]319.08[/TD]
[TD="align: right"]10/20/2014[/TD]
[TD="align: right"]292.99[/TD]
[TD="align: right"]10/1/1996[/TD]
[TD="align: right"]0.00[/TD]
[/TR]
[TR]
[TD="align: right"]2512330[/TD]
[TD="align: right"]5/2/2017[/TD]
[TD="align: right"]18.36[/TD]
[TD="align: right"]12/6/2016[/TD]
[TD="align: right"]16.70[/TD]
[TD="align: right"]6/3/2016[/TD]
[TD="align: right"]15.62[/TD]
[TD="align: right"]12/1/2015[/TD]
[TD="align: right"]14.22[/TD]
[TD="align: right"]5/14/2015[/TD]
[TD="align: right"]12.94[/TD]
[TD="align: right"]12/4/2014[/TD]
[TD="align: right"]11.77[/TD]
[/TR]
[TR]
[TD="align: right"]3089421[/TD]
[TD="align: right"]1/1/2017[/TD]
[TD="align: right"]7.77[/TD]
[TD="align: right"]4/1/2016[/TD]
[TD="align: right"]7.20[/TD]
[TD="align: right"]8/24/2015[/TD]
[TD="align: right"]6.67[/TD]
[TD="align: right"]12/15/2014[/TD]
[TD="align: right"]6.30[/TD]
[TD="align: right"]3/17/2014[/TD]
[TD="align: right"]5.83[/TD]
[TD="align: right"]8/30/2013[/TD]
[TD="align: right"]5.31[/TD]
[/TR]
</tbody>[/TABLE]
You can see that my work table has only productid but multiple price dates, that's where I need to find the price that correspond to that date and unfortunately it falls between a range. I have tried combination of vlookup and match and it did not work, also tried some index/match but no luck.
Any help/direction will greatly appreciated.
Thanks,
octord