Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 414
Default lookup to return multiple values

hi is there a way to use the lookup function and return all the values in ONE
cell that match the criteria, and not just the first or largest one?
Thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default lookup to return multiple values

Use a User Defined Function
--
Gary''s Student - gsnu200810


"Andy" wrote:

hi is there a way to use the lookup function and return all the values in ONE
cell that match the criteria, and not just the first or largest one?
Thanks

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default lookup to return multiple values

Hi,

I assume this is related to your previous post. How about a UDF. Alt+F11 to
open VB editor, Right click 'This Workbook' and insert module and paste the
code below in on the right

Call with

=ListProjects(A1:A100,A1)

Where a1 - a100 is your list of names and a1 is the name your looking for.

Function ListProjects(rng As Range, mgr As String) As String
For Each c In rng
If c.Value = mgr Then
ListProjects = ListProjects + c.Offset(, 1).Text & " , "
End If
Next
End Function

Mike
"Andy" wrote:

hi is there a way to use the lookup function and return all the values in ONE
cell that match the criteria, and not just the first or largest one?
Thanks

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
Lookup to return multiple values lesg46 Excel Worksheet Functions 12 October 9th 08 11:47 PM
LOOKUP TO RETURN MULTIPLE VALUES wilma2299 Excel Discussion (Misc queries) 1 August 18th 07 01:38 PM
Lookup and Return Multiple Values billinr Excel Worksheet Functions 3 April 27th 07 06:59 PM
how to lookup a value and return multiple corresponding values Asthee Excel Worksheet Functions 1 November 5th 05 01:49 PM
Lookup and return multiple Values Neil Excel Worksheet Functions 1 August 22nd 05 10:33 PM


All times are GMT +1. The time now is 07:18 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"