Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 20
Default H and V lookup or match?

If I have the following data

A B C D E
NY MO IL NJ KS

1 Jim x x x
2 Joe x x x x
3 Amy x x x
4 Jane x x x x

How can I write a function that if I input NY into F1 the answer "Jim, Joe,
Jane" will show up in G1 and also if nothing is in F1 is will be blank?

Thanks

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default H and V lookup or match?

Assuming your data in A1:F5

NY MO IL NJ KS
Jim x x x
Joe x x x x
Amy x x x
Jane x x x x

Criteria in G1

In H1:
=LOOKUP("zzzz",CHOOSE({1,2},"",INDEX($A$2:$A$5,SMA LL(IF(($B$1:$F$1=$G$1)*($B$2:$F$5="x"),ROW(INDIREC T("1:"&ROWS($A$2:$A$5)))),ROWS($1:1)))))

ctrl+shift+enter, not just enter
copy down as far as needed


"excelrookie" wrote:

If I have the following data

A B C D E
NY MO IL NJ KS

1 Jim x x x
2 Joe x x x x
3 Amy x x x
4 Jane x x x x

How can I write a function that if I input NY into F1 the answer "Jim, Joe,
Jane" will show up in G1 and also if nothing is in F1 is will be blank?

Thanks

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 563
Default H and V lookup or match?

Another suggestion
Assuming data in A1:F5; criteria state code in G1
In H1: =MATCH(G1,B1:F1,0)
In I1: =IF(INDEX(B2:F5,1,H1)="x",A2&", ","")&IF(INDEX(B2:F5,2,H1)="x",A3&",
","")&IF(INDEX(B2:F5,3,H1)="x",A4&", ","")&IF(INDEX(B2:F5,4,H1)="x",A5,"")
Not as elegant as Teethless Mama's but also not an array formula
best wishes
--
Bernard Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme

"excelrookie" wrote in message
...
If I have the following data

A B C D E
NY MO IL NJ KS

1 Jim x x x
2 Joe x x x x
3 Amy x x x
4 Jane x x x x

How can I write a function that if I input NY into F1 the answer "Jim,
Joe,
Jane" will show up in G1 and also if nothing is in F1 is will be blank?

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
How can I lookup when match has more than one value? bonot1 Excel Worksheet Functions 56 April 4th 23 02:27 PM
Lookup Formula: Return 1st match, then 2nd match, then 3rd match Scott Excel Discussion (Misc queries) 4 December 11th 09 05:50 AM
Lookup? Match? pulling rows from one spreadsheet to match a text f cjax Excel Worksheet Functions 3 July 21st 06 02:51 PM
Lookup Match LookupTroubles Excel Worksheet Functions 1 June 22nd 05 05:12 PM
Lookup & match daniel chen Excel Discussion (Misc queries) 2 June 19th 05 01:18 PM


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