ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Vlookup with two results (https://www.excelbanter.com/excel-discussion-misc-queries/135961-vlookup-two-results.html)

Luke

Vlookup with two results
 
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

Earl Kiosterud

Vlookup with two results
 
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.

--
Earl Kiosterud
www.smokeylake.com
-----------------------------------------------------------------------
"Luke" wrote in message
...
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




T. Valko

Vlookup with two results
 
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

"Luke" wrote in message
...
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





All times are GMT +1. The time now is 02:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com