Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 13
Default Multiple field match?

Hi!

I have a table where I want to match 4 different fields in 4 different
columns and then reference the data to the right where these four
fields match the search criteria.

For example, if this was a 5 col x 4 row spreadsheet:

1 A 5 E xxxx1
1 A 5 E xxxx2
1 B 6 F xxxx3
1 B 6 F xxxx4


So if I want to match 1 B 6 F (each in it's own cell), it would return
xxx3.

Can anyone think of how to do this?

Thanks.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default Multiple field match?

In your example assume data is in columns A to E, starting row 1:

=INDEX(E1:E100,MATCH(1,(A1:A100)=1)*(B1:B100="B")* (C1:C100=6)*(D1:D100="F"),0),1)

Enter with Ctrl+Shift+Enter (an array formula)

HTH

" wrote:

Hi!

I have a table where I want to match 4 different fields in 4 different
columns and then reference the data to the right where these four
fields match the search criteria.

For example, if this was a 5 col x 4 row spreadsheet:

1 A 5 E xxxx1
1 A 5 E xxxx2
1 B 6 F xxxx3
1 B 6 F xxxx4


So if I want to match 1 B 6 F (each in it's own cell), it would return
xxx3.

Can anyone think of how to do this?

Thanks.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,688
Default Multiple field match?

Hi!

One way:

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

=INDEX(E1:E4,MATCH(1,(A1:A4=1)*(B1:B4="B")*(C1:C4= 6)*(D1:D4="F"),0))

Better to use cells to hold the criteria:

H1 = 1
I1 = B
J1 = 6
K1 = F

=INDEX(E1:E4,MATCH(1,(A1:A4=H1)*(B1:B4=I1)*(C1:C4= J1)*(D1:D4=K1),0))

Also, since you have duplicate matching criteria:

1 B 6 F xxxx3
1 B 6 F xxxx4


The formula will ALWAYS return the corresponding value for the FIRST match.

Biff

wrote in message
ps.com...
Hi!

I have a table where I want to match 4 different fields in 4 different
columns and then reference the data to the right where these four
fields match the search criteria.

For example, if this was a 5 col x 4 row spreadsheet:

1 A 5 E xxxx1
1 A 5 E xxxx2
1 B 6 F xxxx3
1 B 6 F xxxx4


So if I want to match 1 B 6 F (each in it's own cell), it would return
xxx3.

Can anyone think of how to do this?

Thanks.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 132
Default Multiple field match?

How can you write this using VBA?

Thanks,
Anna

"Toppers" wrote:

In your example assume data is in columns A to E, starting row 1:

=INDEX(E1:E100,MATCH(1,(A1:A100)=1)*(B1:B100="B")* (C1:C100=6)*(D1:D100="F"),0),1)

Enter with Ctrl+Shift+Enter (an array formula)

HTH

" wrote:

Hi!

I have a table where I want to match 4 different fields in 4 different
columns and then reference the data to the right where these four
fields match the search criteria.

For example, if this was a 5 col x 4 row spreadsheet:

1 A 5 E xxxx1
1 A 5 E xxxx2
1 B 6 F xxxx3
1 B 6 F xxxx4


So if I want to match 1 B 6 F (each in it's own cell), it would return
xxx3.

Can anyone think of how to do this?

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
data in primay field changed however subsequent field does not upd tan Excel Discussion (Misc queries) 1 July 24th 06 07:07 PM
Match Single Numeric Criteria and Return Multiple Numeric Labels Sam via OfficeKB.com Excel Worksheet Functions 3 December 30th 05 08:01 PM
How do I filter with multiple conditions in one field? TJ Excel Discussion (Misc queries) 4 September 28th 05 11:16 PM
Find a match that;s not exact Phyllis Excel Worksheet Functions 0 November 8th 04 08:12 PM
HOW TO MATCH MULTIPLE COLUMNS WITH OR WITHOUT GAPS IN eXCEL ? hims Excel Worksheet Functions 2 October 27th 04 07:03 PM


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