LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default looking up multiple values in an arrray

But if the original table were sorted first by col A (name)
then by col B (role index), the summary table could be
built much more efficiently.


Yep, that would make things much easier.

--
Biff
Microsoft Excel MVP


"Harlan Grove" wrote in message
...
"T. Valko" wrote...
If you have 100's of unique names this won't be very efficient....


But if the original table were sorted first by col A (name) then by
col B (role index), the summary table could be built much more
efficiently.

Names on Sheet1 in the range A2:A20 assigned the named range: Name
Roles on Sheet1 in the range C2:C20 assigned the named range: Role

Sheet2 B1:?1 = names
Sheet2 A2:A? = roles

...

If the names in row 1 of Sheet2 were in the same order as the sorted
names in the table in Sheet1 and roles in col A of Sheet2 were in the
same order as roles in table in Sheet1, you could use

B2:
=IF(ROWS(B$2:B2)<=COUNTIF(Name,B$1),
INDEX(Role,MATCH(B$1,Name)+ROWS(B$2:B2)-1),"")

Fill B2 right as far as needed so there's a formula under each name in
row 1, say to Z2, then select B2:Z2 and fill down as far as needed so
there are formulas in these columns to the right of every role index
in col A.

Sorting is good. Makes other things easy and efficient.



 
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
find values in multiple cells and paste row values izzyt1972 Excel Discussion (Misc queries) 5 December 26th 07 10:14 PM
{SUM(IF((ARRRAY FORMULA)} bookman3 Excel Worksheet Functions 8 October 18th 07 04:43 AM
Adding multiple values in one column based on multiple values of the same value (text) in another column [email protected] Excel Discussion (Misc queries) 1 May 16th 07 06:02 PM
Adding numerical values based on multiple values in another column Kazmaniac Excel Worksheet Functions 6 April 4th 07 08:53 PM
Set a 2D arrray data into a range, given the top-left cell Tom Chau Excel Discussion (Misc queries) 2 June 29th 06 06:53 AM


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