View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default find and return adjacent value (redux)!

Assuming your table is in A1:H3 and A11=222 and B11=Tony, this returns the
results you're after:

=INDEX(INDEX($A$1:$H$3,MATCH(A11,$A$1:$A$3,0),0),M ATCH(B11,INDEX($A$1:$H$3,MATCH(A11,$A$1:$A$3,0),0) ,0)+1)

There may be a shorter way, but it's past my bedtime.



"Todd Lietha" wrote:

I posted this earlier, but missed a key element in the example.

How would I do the following using a formula:

Find the row that contains value X, then in that row find the cell that
contains value Y, then return the value to the immediate right?

Example:
111 AAA Todd 2 Tim 4
222 ABB Tony 6 Todd 5
333 BBB Tim 8 Sue 3 Jim 7
x=222, y=Tony, returned value = 6
x=111 y=Tim, returned value = 4
x=333 y=Jim, returned value = 7

Thanks in advance!