Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 11
Default Formula - Capture Multiple names into One cell

I hope I can explain this clearly.

I need advise on how to write a formula that will:
1) look thru a string of cells in a column for a match to a number
specified in another cell
2)then return the person name located in the cell next to the match

Sounds simple except ther will be multiple matches to the number and each
match can have a different name. I need to show all the names that match,
seperated by a comma, in this one cell.
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 7,247
Default Formula - Capture Multiple names into One cell

The VLOOKUP function should do this. If the value to be matched is in A1 and
the list of data is in B1:C100, then use

=VLOOKUP(A1,B1:C100,2,FALSE)

That will scan down column B until a value matches A1, go to the next column
and return the data there. If no match is found, the formula will return
#N/A. The FALSE in the formula indicates that VLOOKUP is to match the exact
value in A1.


--
Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)



"PSU35" wrote in message
...
I hope I can explain this clearly.

I need advise on how to write a formula that will:
1) look thru a string of cells in a column for a match to a number
specified in another cell
2)then return the person name located in the cell next to the match

Sounds simple except ther will be multiple matches to the number and each
match can have a different name. I need to show all the names that match,
seperated by a comma, in this one cell.


  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 11
Default Formula - Capture Multiple names into One cell

Chip
What is the FALSE for? Do I replace that with something ?

"Chip Pearson" wrote:

The VLOOKUP function should do this. If the value to be matched is in A1 and
the list of data is in B1:C100, then use

=VLOOKUP(A1,B1:C100,2,FALSE)

That will scan down column B until a value matches A1, go to the next column
and return the data there. If no match is found, the formula will return
#N/A. The FALSE in the formula indicates that VLOOKUP is to match the exact
value in A1.


--
Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)



"PSU35" wrote in message
...
I hope I can explain this clearly.

I need advise on how to write a formula that will:
1) look thru a string of cells in a column for a match to a number
specified in another cell
2)then return the person name located in the cell next to the match

Sounds simple except ther will be multiple matches to the number and each
match can have a different name. I need to show all the names that match,
seperated by a comma, in this one cell.


  #4   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 11
Default Formula - Capture Multiple names into One cell

Chip
Tried the formula with "False" and it returns only one name, the first one
it see's. Without "False" it return the last name it see's. It's not giving
me all the names.

"Chip Pearson" wrote:

The VLOOKUP function should do this. If the value to be matched is in A1 and
the list of data is in B1:C100, then use

=VLOOKUP(A1,B1:C100,2,FALSE)

That will scan down column B until a value matches A1, go to the next column
and return the data there. If no match is found, the formula will return
#N/A. The FALSE in the formula indicates that VLOOKUP is to match the exact
value in A1.


--
Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)



"PSU35" wrote in message
...
I hope I can explain this clearly.

I need advise on how to write a formula that will:
1) look thru a string of cells in a column for a match to a number
specified in another cell
2)then return the person name located in the cell next to the match

Sounds simple except ther will be multiple matches to the number and each
match can have a different name. I need to show all the names that match,
seperated by a comma, in this one cell.


  #6   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 10,124
Default Formula - Capture Multiple names into One cell

Oops. You said you want a list of all hits in ONE cell
Sub FiltertoOneCell()
mynum = 1 'put your number here

lr = Cells(Rows.Count, "a").End(xlUp).Row
Range("A1:B" & lr).AutoFilter Field:=1, Criteria1:=mynum
For Each c In Range("b2:b" & lr).SpecialCells(xlCellTypeVisible)
ms = ms & ", " & c
Next c
MsgBox Right(ms, Len(ms) - 1)
Range("c1").Value = Right(ms, Len(ms) - 1)
Range("A1:B" & lr).AutoFilter
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Don Guillett" wrote in message
...
Use datafilterautofilter on the number

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"PSU35" wrote in message
...
I hope I can explain this clearly.

I need advise on how to write a formula that will:
1) look thru a string of cells in a column for a match to a number
specified in another cell
2)then return the person name located in the cell next to the match

Sounds simple except ther will be multiple matches to the number and each
match can have a different name. I need to show all the names that
match,
seperated by a comma, in this one cell.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a formula to capture the hyperlink from a cell? [email protected] Excel Worksheet Functions 2 February 6th 08 07:47 PM
Macro to capture worksheet names El Bee Excel Worksheet Functions 2 July 13th 06 05:56 PM
'IF' FORMULA TO CAPTURE CERTAIN CELL VALUES PaulH-Oz Excel Worksheet Functions 1 March 27th 06 01:25 AM
'IF' FORMULA TO CAPTURE CERTAIN CELL VALUES Franksta Excel Worksheet Functions 0 March 26th 06 11:57 PM
'IF' FORMULA TO CAPTURE CERTAIN CELL VALUES JMB Excel Worksheet Functions 0 March 26th 06 11:47 PM


All times are GMT +1. The time now is 09:57 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"