Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default help needed with lookup and related functions

Excel 2003

Given two worksheets in a .xls file.
First worksheet is lookup data. First row of each column is a group name,
say GrpA, GrpB, GrpC. Under each group name (rows 2 thru n) are names of
people, say Tom, Dick, Harry. GrpA may have 5 names (rows 2 to 6) and GrpB
may have 10 names (rows 2 to 11), etc. So we have say:

A1 = GrpA
A2 = Tom
A3 = Dick
A4 = Harry

B1 = GrpB
B2 = Jane
B3 = Sally

Second worksheet is working data. First column is list of names, starting in
row 2. Columns B thru Z have a group name in row 1 -- GrpA, GrpB, etc --
matching the Group names in the lookup worksheet. A group name in row 1 may
appear in multiple columns. So we may have

A1 = "Name"
A2 = Tom
A3= Dick
A4 = Harry

B1 = "GrpA"
C1 = "GrpB"
D1 = "GrpC"
E1 = "GrpA"

Some of the names in the working data (Col A) will appear under more than
one group in the lookup data.

Some of the names in the working data will appear under exactly one group in
the lookup data.

Some of the names in the working data will appear under no groups in the
lookup data.

The task is to set a formula in the working data, at the intersection of a
name and a group, that will place an "X" in the cell if the name in that row
appears in the column of the matching group in the lookup sheet.

I've been playing around with IF, the various LOOKUP functions, and the
various IS* functions, but have not come up with something that works.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,722
Default help needed with lookup and related functions

Formula in B2:
=IF(ISNUMBER(MATCH($A2,OFFSET(Sheet1!$A$1,1,MATCH( B$1,Sheet1!$1:$1,0)-1,20,1),0)),"X","")

Copy down and across as needed. Note that the 20 in formula should be equal
to or greater than largest Group on Sheet1.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"EdStevens" wrote:

Excel 2003

Given two worksheets in a .xls file.
First worksheet is lookup data. First row of each column is a group name,
say GrpA, GrpB, GrpC. Under each group name (rows 2 thru n) are names of
people, say Tom, Dick, Harry. GrpA may have 5 names (rows 2 to 6) and GrpB
may have 10 names (rows 2 to 11), etc. So we have say:

A1 = GrpA
A2 = Tom
A3 = Dick
A4 = Harry

B1 = GrpB
B2 = Jane
B3 = Sally

Second worksheet is working data. First column is list of names, starting in
row 2. Columns B thru Z have a group name in row 1 -- GrpA, GrpB, etc --
matching the Group names in the lookup worksheet. A group name in row 1 may
appear in multiple columns. So we may have

A1 = "Name"
A2 = Tom
A3= Dick
A4 = Harry

B1 = "GrpA"
C1 = "GrpB"
D1 = "GrpC"
E1 = "GrpA"

Some of the names in the working data (Col A) will appear under more than
one group in the lookup data.

Some of the names in the working data will appear under exactly one group in
the lookup data.

Some of the names in the working data will appear under no groups in the
lookup data.

The task is to set a formula in the working data, at the intersection of a
name and a group, that will place an "X" in the cell if the name in that row
appears in the column of the matching group in the lookup sheet.

I've been playing around with IF, the various LOOKUP functions, and the
various IS* functions, but have not come up with something that works.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default help needed with lookup and related functions

Perfect. A bit of adjustment for my actual layout (original post was a
simplified for clarity) and it worked perfectly. Thank you.
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default help needed with lookup and related functions

Try this...

Let's assume your lookup data is on Sheet1 in the range A2:K10. A1:K1 are
the column headers GrpA, GrpB, etc.

Names used in the formula:

Table: refers to Sheet1!$A$2:$K$10
Grps: refers to Sheet1!$A$1:$K$1

Enter this formula on Sheet2 B2:

=IF(COUNTIF(INDEX(Table,,MATCH(B$1,Grps,0)),$A2)," X","")

Copy across then down as needed.

--
Biff
Microsoft Excel MVP


"EdStevens" wrote in message
...
Excel 2003

Given two worksheets in a .xls file.
First worksheet is lookup data. First row of each column is a group name,
say GrpA, GrpB, GrpC. Under each group name (rows 2 thru n) are names of
people, say Tom, Dick, Harry. GrpA may have 5 names (rows 2 to 6) and
GrpB
may have 10 names (rows 2 to 11), etc. So we have say:

A1 = GrpA
A2 = Tom
A3 = Dick
A4 = Harry

B1 = GrpB
B2 = Jane
B3 = Sally

Second worksheet is working data. First column is list of names, starting
in
row 2. Columns B thru Z have a group name in row 1 -- GrpA, GrpB, etc --
matching the Group names in the lookup worksheet. A group name in row 1
may
appear in multiple columns. So we may have

A1 = "Name"
A2 = Tom
A3= Dick
A4 = Harry

B1 = "GrpA"
C1 = "GrpB"
D1 = "GrpC"
E1 = "GrpA"

Some of the names in the working data (Col A) will appear under more than
one group in the lookup data.

Some of the names in the working data will appear under exactly one group
in
the lookup data.

Some of the names in the working data will appear under no groups in the
lookup data.

The task is to set a formula in the working data, at the intersection of a
name and a group, that will place an "X" in the cell if the name in that
row
appears in the column of the matching group in the lookup sheet.

I've been playing around with IF, the various LOOKUP functions, and the
various IS* functions, but have not come up with something that works.



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 related question Craig Excel Worksheet Functions 1 June 23rd 09 04:48 PM
Need help with Excel 2000 text-related functions Joan A Excel Worksheet Functions 7 February 3rd 08 10:36 PM
Finding the Max of a related Value Lookup Cav Excel Worksheet Functions 4 November 23rd 05 02:53 PM
solver related some financial knowledge may be needed Richard Payman Excel Discussion (Misc queries) 4 September 8th 05 02:37 PM
Extend Rows and related formula downwards using functions not macros NewRipper New Users to Excel 0 June 27th 05 08:32 PM


All times are GMT +1. The time now is 05:13 PM.

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"