View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
JLatham JLatham is offline
external usenet poster
 
Posts: 3,365
Default Reverse Lookup column only

One way to do it. Designate a cell to hold the value to look up, for the
example, I'll use E1. I'll use E2 to put my formula into, although it could
be any cell not in the data area. Also assuming that Jan...Apr entries are
in row 1.

We will build a combined formula that appends the results of individual
tests of each column to show which one(s) the value appears in. So in E2, I
put this formula:

=IF(ISNA(MATCH($E$1,A:A,0)),"",A1) & IF(ISNA(MATCH($E$1,B:B,0)),"",B1) &
IF(ISNA(MATCH($E$1,C:C,0)),"",C1) & IF(ISNA(MATCH($E$1,D:D,0)),"",D1)

You could extend that on out to include more months tests, of course. If
you want to easily see when more than one month contains the value, you could
get it to put a space between the month values:

=IF(ISNA(MATCH($E$1,A:A,0)),"",A1) & " " &
IF(ISNA(MATCH($E$1,B:B,0)),"",B1) & " " & IF(ISNA(MATCH($E$1,C:C,0)),"",C1) &
" " & IF(ISNA(MATCH($E$1,D:D,0)),"",D1)



"Lisa" wrote:

How do i do a reverse lookup to show the heading in the first row. Example:
Say I want to now which month the value 29 show up in the below table? All I
want the answer is "MAR" or value of 32 is in "Apr". Many thanks



1 A B C D
2 Jan Feb Mar Apr
3 25 27 29 31
4 26 28 30 32