Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 29
Default Returning looking up all values in a list

I have a list of project numbers and their costs, and some project numbers
are represented multiple times.

I want a lookup that will return all of the values for a project.

Column A Column B
154 100
143 150
153 75
143 92
176 68
122 84
143 111
110 225
176 374


I have a list of the unique project numbers in Column C

143
153
154
176
122
110

In column D I'd like to see the first cost, in Column E (where applicable)
the second cost, in Column F the third cost, etc.

When I do a vlookup I can't tell it to grab the second instance of the
project number, but there has to be a way.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Returning looking up all values in a list

Try this:

Entered as an array in D2 using the key combination of CTRL,SHIFT,ENTER (not
just ENTER):

=IF(COLUMNS($A:A)<=COUNTIF($A$2:$A$10,$C2),INDEX($ B$2:$B$10,SMALL(IF($A$2:$A$10=$C2,ROW(B$2:B$10)-MIN(ROW(B$2:B$10))+1),COLUMNS($A:A))),"")

Copy down then across until you get a solid column of blanks.

Biff

"Ted Metro" wrote in message
...
I have a list of project numbers and their costs, and some project numbers
are represented multiple times.

I want a lookup that will return all of the values for a project.

Column A Column B
154 100
143 150
153 75
143 92
176 68
122 84
143 111
110 225
176 374


I have a list of the unique project numbers in Column C

143
153
154
176
122
110

In column D I'd like to see the first cost, in Column E (where applicable)
the second cost, in Column F the third cost, etc.

When I do a vlookup I can't tell it to grab the second instance of the
project number, but there has to be a way.



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
How do I generate a list from a range of values robo7084 Excel Worksheet Functions 2 July 6th 06 01:48 AM
Min values in a list of numbers Traima Excel Worksheet Functions 1 August 5th 05 01:32 PM
Returning all values from a lookup - not just the first/last one Jim Burns Excel Worksheet Functions 2 June 20th 05 04:04 PM
Extracting Values on one list and not another B Schwarz Excel Discussion (Misc queries) 4 January 7th 05 01:48 PM
Selecting data from a list based on entered values GrantM Excel Discussion (Misc queries) 1 December 20th 04 10:59 AM


All times are GMT +1. The time now is 06:14 PM.

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

About Us

"It's about Microsoft Excel"