Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
slf slf is offline
external usenet poster
 
Posts: 8
Default Lookup Across Multiple Columns - Return Category names

I'm trying to figure out a formula for this scenerio:

col a col b col c col d col e col f
col g
name cat1 cat2 cat3 cat4 cat5
cat6
Smith, John x x x 1 x
x
Taylor, Mary 1 x 1 x x
x
Adams, Ted x 1 x x 1
x

"X" meaning the cell is blank

Is there a formula that will lookup Taylor,Mary & return all the category
names ("cat1, cat2, cat3, etc) where there is a number "1" showing?




  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Lookup Across Multiple Columns - Return Category names

Try this...

Assume your table is in the range A1:G4

A10 = lookup name = Taylor,Mary

Enter this formula in A9. It will return the count of ones for the name of
interest.

=SUM(INDEX(B2:G4,MATCH(A10,A2:A4,0),0))

Enter this array formula** in B10 and copy across to G10:

=IF(COLUMNS($B10:B10)$A9,"",INDEX($B$1:$G$1,SMALL (IF(INDEX($B$2:$G$4,MATCH($A10,$A$2:$A$4,0),0)=1,C OLUMN($B$1:$G$1)),COLUMNS($B10:B10))-COLUMN($B$1)+1))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT
key then hit ENTER.

--
Biff
Microsoft Excel MVP


"slf" wrote in message
...
I'm trying to figure out a formula for this scenerio:

col a col b col c col d col e col
f
col g
name cat1 cat2 cat3 cat4 cat5
cat6
Smith, John x x x 1
x
x
Taylor, Mary 1 x 1 x
x
x
Adams, Ted x 1 x x
1
x

"X" meaning the cell is blank

Is there a formula that will lookup Taylor,Mary & return all the category
names ("cat1, cat2, cat3, etc) where there is a number "1" showing?






  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,180
Default Lookup Across Multiple Columns - Return Category names

Excel 2007
Two more methods:
PivotTable (no formulas)
Tables (with macro)
http://www.mediafire.com/file/1ymtjm...07_13_09a.xlsm
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
V lookup with 2 criteria to return results for multiple columns JenL Excel Worksheet Functions 2 September 20th 07 10:04 PM
lookup for a value in multiple columns and return a result Ram Excel Discussion (Misc queries) 16 June 29th 07 11:16 PM
BIFF - Help!! lookup numbers in multiple columns and return one nu JB Excel Worksheet Functions 6 October 23rd 06 02:56 PM
how can i apply labels (or category names) to columns? Justin H. Excel Worksheet Functions 2 October 19th 06 12:49 AM
Lookup in Multiple Columns, Return Multiple Values andy62 Excel Worksheet Functions 3 July 6th 06 02:36 AM


All times are GMT +1. The time now is 01:07 AM.

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"