# Two-Way Lookup, NOT Using Matrix

#### tjthom

##### New Member
Hello!

I am trying to use a formula to first Search vertically within a column for "VALUE A", then search within the row of "VALUE A" for "VALUE B", then output "VALUE C" from row 1 of the column that "VALUE B" is located within. Here is a photo of what I would like:

I have found something similar to this, but it requires that the lookup value be the top row of the reference/array. In my situation, the output will always be above the second lookup value (value B). Here is an article that describes something similar, but it is NOT WHAT I WANT: How to Use INDEX MATCH MATCH

Does anyone know of a formula that I could assemble that would search above the second criteria as shown above?

ADDITIONALLY... I would like to create a second formula that will search for the last "value B" in a row and return the resulting time of that as well. Essentially, the first formula I need is described in the picture above, but I would like to create a second, separate formula that gives me the latest time. Value B represents an assigned task someone will be doing, and I want to output the start and end time of that task, for that person.

Thank you in advance for any help you can provide! I'll take suggestions even if they are not full answers/solutions!!!

### Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use \$ signs: \$V\$2:\$Z\$99 will always point to V2:Z99, even after copying

#### Eric W

##### MrExcel MVP
Here's one way to do it.

Excel 2010
ABCDEFGHIJKLMNOP
1Value A7:007:157:458:008:158:308:459:009:159:30
3
4Value B
54.03
6
7First Time
88:45:00 AM
9
10Last Time
119:30:00 AM
12

</tbody>
Sheet1

Worksheet Formulas
CellFormula
A8=INDEX(G1:AA1,MATCH(A5,INDEX(G1:AA20,MATCH(A2,C:C,0),0),0))

</tbody>

<tbody>
</tbody>

Array Formulas
CellFormula
A11{=INDEX(G1:AA1,MATCH(2,1/(INDEX(G1:AA20,MATCH(A2,C:C,0),0)=A5)))}

</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>

You'll want to put these in your preferred locations, and you'll need to adjust the ranges in them to match your sheet. The "Last Time" formula is an array formula, so confirm it with Control-Shift-Enter. Let me know how they work for you.

Replies
2
Views
501
Replies
10
Views
132
Replies
9
Views
199
Replies
5
Views
96
Replies
6
Views
188