Reputation: 185
I am trying to get the formula right to lookup a value and return the cell underneath that cell, but I can't seem to get the code right and a MATCH/MATCH does not seem to do the trick (at least to the best of my knowledge).
Let's suppose my data set looks like this:
Col1 Col2 Col3 --------------------- Row 1 | P(A1) P(A2) P(A3) Row 2 | 10.5% 11.5% 12.5% Row 3 | Row 4 | P(B1) P(B2) P(B3) Row 5 | 50.5% 60.6% 70.5% Row 6 | Row 7 | P(C1) P(C2) P(C3) Row 8 | 25.2% 34.6% 88.5%
Now I have a reference cell, say A1, which can have the value P(C2) and I want to return the corresponding value underneath P(C2), i.e. 34.6% in the cell A2.
I hope I am not being too cryptic and thanks very much in advance for any assistance.
Best Max
Upvotes: 0
Views: 52
Reputation: 8124
Try the following...
F2, confirmed with CONTROL+SHIFT+ENTER...
=INDEX(A2:C9,SMALL(IF(A2:C9=E2,ROW(A2:C9)-ROW(A2)+1),1)+1,MATCH(E2,INDEX(A2:C9,SMALL(IF(A2:C9=E2,ROW(A2:C9)-ROW(A2)+1),1),0),0))
Upvotes: 1