View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Conan Kelly Conan Kelly is offline
external usenet poster
 
Posts: 419
Default Question regarding HLookup (unique values)

J,

You are going to need a unique identifier for each person in order to use
HLOOKUP. If Person A & B both have a value of 6, it will only return the
first occurence of 6.

It might be possible to do it adding other functions to your formula, but
that will get a little convoluted.

Is there any way to add a "suffix" to your person identifer.......maybe
something like 6.1 & 6.2 or 6-1 & 6-2.

If you can not change the way things are done, it is a little beyond me to
help you out. Maybe someone more knowlegable can help you.

Sorry,

Conan




"J" wrote in message
...
I have a 33 column, 2 row array. The first row contains names. The second
row
contains values between 0-20. I use HLookup to find a name that matches a
number and return the name. I do this down another column of 33 fields so
it
lists every name. The problem is if HLookup finds a value, it will return
the
same name multiple times (depending on how often the value appears)

Example:
CD88 - 6
CD89 - 6
CD90 - 5

=HLOOKUP(CD88,$AP$87:$BV$88,2,FALSE)

For instance, Person A and Person B both have values of 6, Person C has a
value of 5. When my HLookup function gets to CD88, it returns person A.
The
second row Hlookup looks now for CD89 (which is also 6). Instead of
returning
Person B, it returns Person A again.

How can I set up my function to skip over names it has already selected so
I
get all 33 unique names.

Thanks,