View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Two possible values with a lookup?

You would need a more complicated formula. How would you want the results
displayed:

98765...result1...result2...result3

Or

98765...result1
..............result2
..............result3

--
Biff
Microsoft Excel MVP


"Homer" wrote in message
...
Thanks for the help.

What would you do if there were three or more possibilities? Would you
just
string if statements along or is there a better way?



"T. Valko" wrote:

If there are *only the 2 possibilities* you can use the lookup for the
1st
instance and then something like this for the 2nd:

X1 formula:

=VLOOKUP(98765,A2:D5,2,0)

Y1 formula:

=IF(COUNTIF(A2:A5,98765)=2,IF(X1="R","X","R"),"")

--
Biff
Microsoft Excel MVP


"Homer" wrote in message
...
Here is what I have:

A B C D
12345 X 9 a
98765 R 3 t
98765 X 4 b
56489 X 7 p

Column B has two options X or R. Through validation and list I have
the
ability to choose either X or R in Column B. Some times Column A has
multiple combinations of information.

In another area of the sheet I need to have both the X and R show up.
If
I
use vlookup the first instance only, is shown.

What can I do?