View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ashish Mathur[_2_] Ashish Mathur[_2_] is offline
external usenet poster
 
Posts: 1,766
Default find all instances of a search item and put result in a single cel

Hi,

Download and install the following addin -
http://www.download.com/Morefunc/300...-10423159.html. Then array
enter (Ctrl+Shift+Enter) the following formula

=SUBSTITUTE(TRIM(MCONCAT(IF($C$4:$C$8=B14,$B$4:$B$ 8," ")," "))," ",", ")

B14 has yellow. C4:C8 has the colours and B4:B8 has the names

--
Regards,

Ashish Mathur
Microsoft Excel MVP

"Art" wrote in message
...
Is it possible to search a column in one sheet for all occurrences of a
search item and then put the result of that search in a single cell on a
second sheet?

For example, Sheet 1 may have something like this:

A :: B
John yellow
Mary yellow
Sue red
Richard green
Michael yellow

In the second sheet, I have a row for each color, and I want to put in,
say,
H1, the names in Sheet 1 that have that color in column B.

C :: H
yellow John, Mary, Michael

So, say I have "yellow" in B1, I want the spreadsheet to put in H1 the
name
of each person in Column A, separated with a comma and space, in Sheet 1
who
has that color in Column B.

It's possible there may be NO occurences, ONE occurence, or MORE THAN ONE
occurence, which makes it even more difficult because I only need
commas/spaces for MORE THAN ONE occurence.

Thanks!!!!