Find cell value based on multiple criteria

octord

New Member
Joined
Apr 12, 2010
Messages
16
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:

Product IDPrice DateNeed price
251233005/07/2016???
251233006/07/2016???
251233006/13/2016???
251233007/20/2016???
251233008/27/2016???
251233009/22/2016???

<tbody>
</tbody>

<tbody>
</tbody>

Here is my source table:

Product IDCurrent UpdatePriceFirst UpdatePriceSecond UpdatePriceThird UpdatePriceFourth UpdatePriceFifth UpdatePrice
21434805/2/2017405.608/18/2016375.6012/23/2015344.885/29/2015319.0810/20/2014292.9910/1/19960.00
25123305/2/201718.3612/6/201616.706/3/201615.6212/1/201514.225/14/201512.9412/4/201411.77
30894211/1/20177.774/1/20167.208/24/20156.6712/15/20146.303/17/20145.838/30/20135.31

<tbody>
</tbody>

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
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
try this

Excel 2012
ABCDEFGHIJKLM
1Product IDPrice DateNeed price
2251233005/07/201614.22
3251233006/07/201615.62
4251233006/13/201615.62
5251233007/20/201615.62
6251233008/27/201615.62
7251233009/22/201615.62
8
9
10Product IDCurrent UpdatePriceFirst UpdatePriceSecond UpdatePriceThird UpdatePriceFourth UpdatePriceFifth UpdatePrice
11214348005/02/2017405.68/18/2016375.612/23/2015344.885/29/2015319.0810/20/2014292.9910/01/19960
12251233005/02/201718.3612/06/201616.706/03/201615.6212/01/201514.225/14/201512.9412/04/201411.77
13308942101/01/20177.7704/01/20167.28/24/20156.6712/15/20146.33/17/20145.838/30/20135.31

<tbody>
</tbody>
Sheet2

Array Formulas
CellFormula
C2{=INDEX($B$11:$M$13,MATCH($A2,$A$11:$A$13,0),MATCH(B2,IF($B$10:$M$10<>"Price",INDEX($B$11:$M$13,MATCH(A2,$A$11:$A$13,0),0)),-1)+3)}

<tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>
 
Upvote 0
I was able to get the answer 14.22. Can you use this?
=INDEX($B$10:$K$12,MATCH($B$2,INDEX($B$10:$K$12,MATCH($A$2,$A$10:$A$12,0),0),1),0)

<tbody>
</tbody>
Assume A2 is the ID, B2 is the Date. Assume data range is B10:K12
 
Upvote 0

Forum statistics

Threads
1,215,790
Messages
6,126,921
Members
449,348
Latest member
Rdeane

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