Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 683
Default How do you use sumproduct to return specific cell data?

I have the following scenario:
A B C D E
1Hotel# 1Job# 2Hotel# 2Job# Staff#
101 6001 100 5002 231356
103 5002 101 6001 253586
406 2025 503 2025 365412
503 2025 601 6004 894561

The data from col A & B are connected by row ... meaning 101 & 6001 go
together and should not be worked individually (thus the number 1 in the col
headers connect those two cols, and the number 2 in the col headers connect
those two columns C and D).

I want to find a way for the formula to take the data that is in the same
row in col A/B, in this case 101/6001, and find a match anywhere in col C/D,
and return to me the data in col E that is in the same row as the match. So,
for instance, row 1, I have 101 and 6001. I look down col C/D and find a
match 101 and 6001 in the second row. So, the returned data would be 253586
because it is in the same row as the match found in C/D.

Sorry, for the long way about this. I thought I could use sumproduct.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default How do you use sumproduct to return specific cell data?

=SUMPRODUCT(--($C$2:$C$5=F2),--($D$2:$D$5=G2),$E$2:$E$5)


F2=101
G2=6001

HTH

"Brian" wrote:

I have the following scenario:
A B C D E
1Hotel# 1Job# 2Hotel# 2Job# Staff#
101 6001 100 5002 231356
103 5002 101 6001 253586
406 2025 503 2025 365412
503 2025 601 6004 894561

The data from col A & B are connected by row ... meaning 101 & 6001 go
together and should not be worked individually (thus the number 1 in the col
headers connect those two cols, and the number 2 in the col headers connect
those two columns C and D).

I want to find a way for the formula to take the data that is in the same
row in col A/B, in this case 101/6001, and find a match anywhere in col C/D,
and return to me the data in col E that is in the same row as the match. So,
for instance, row 1, I have 101 and 6001. I look down col C/D and find a
match 101 and 6001 in the second row. So, the returned data would be 253586
because it is in the same row as the match found in C/D.

Sorry, for the long way about this. I thought I could use sumproduct.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 683
Default How do you use sumproduct to return specific cell data?

Thank you so much and yes, this works ... but I failed to mention a few
things.

There is a possibility that there will be duplicated data pairs in col C/D.
Right now, the formula adds them together (and rightfully so). I just would
like it to return a single piece of data in col E).

And ... there is the possibility that the data pair up in col A/B may be
duplicated several times. So for the second and third duplicated data pair,
it will still give me the result in col E that corresponds always to the very
first match it finds. Is it possible for the second duplicate data pair to
move past the first find (since it is theoretically "taken" by the first data
pair from col A/B).

I do apologize for not giving you all the info. I am very new at this.
Thanks!

"Toppers" wrote:

=SUMPRODUCT(--($C$2:$C$5=F2),--($D$2:$D$5=G2),$E$2:$E$5)


F2=101
G2=6001

HTH

"Brian" wrote:

I have the following scenario:
A B C D E
1Hotel# 1Job# 2Hotel# 2Job# Staff#
101 6001 100 5002 231356
103 5002 101 6001 253586
406 2025 503 2025 365412
503 2025 601 6004 894561

The data from col A & B are connected by row ... meaning 101 & 6001 go
together and should not be worked individually (thus the number 1 in the col
headers connect those two cols, and the number 2 in the col headers connect
those two columns C and D).

I want to find a way for the formula to take the data that is in the same
row in col A/B, in this case 101/6001, and find a match anywhere in col C/D,
and return to me the data in col E that is in the same row as the match. So,
for instance, row 1, I have 101 and 6001. I look down col C/D and find a
match 101 and 6001 in the second row. So, the returned data would be 253586
because it is in the same row as the match found in C/D.

Sorry, for the long way about this. I thought I could use sumproduct.

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
Sumproduct - formula to return data OTHER than given criteria Twishlist Excel Worksheet Functions 4 July 24th 07 05:22 AM
Search for a number in a table and return data of a specific cell Karaman Excel Discussion (Misc queries) 4 June 30th 06 03:46 PM
How to return the row # of an expression in specific array of cell Rado Excel Worksheet Functions 2 June 27th 06 04:59 PM
search multiple sheets for specific date, return data in cell to r NonIllegitimiCarborundum Excel Discussion (Misc queries) 0 April 28th 06 09:02 PM
Select cell containing specific text &return value from another ce plf100 Excel Worksheet Functions 4 November 16th 05 01:57 PM


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