Vlookup with two results

G

Guest

My Vlookup formula returns the name of the person within a cost centre.
However if there are two people within the cost centre it obviously doesn't
return the second persons name.

I want to have a second Vlookup formula (in another cell) which will pick up
the name of the second person within the cost centre (there will no more than
2 people), or simply nothing if there is only 1 person within that cost
centre.

How can I do this?

Thanks in advance of your help
 
E

Earl Kiosterud

Luke,

Usually, a filter (Advanced or Autofilter) is used when you want such a dataset. It's a
process you have to do each time, though.
 
T

T. Valko

there will [be] no more than 2 people

Try something like this for the 2nd instance:

A10 = lookup_value

=IF(COUNTIF(A1:A5,A10)>1,LOOKUP(2,1/(A1:A5=A10),B1:B5),"")

Biff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top