A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Multi-Worksheet Sumproduct & Listing



 
 
Thread Tools Display Modes
  #1  
Old April 8th, 2009, 12:46 AM posted to microsoft.public.excel.worksheet.functions
Rob
external usenet poster
 
Posts: 1,029
Default Multi-Worksheet Sumproduct & Listing

I'm hoping someone would be able to help me solve a quandry of what I am
trying to do. In Excel 2003 I have four worksheets;

Worksheet 1 has unique values in Col "A" that I want to count in Worksheet 1
Col "D" where they match Worksheet 2 Col "A"
Worksheet 2 has values in Col "C" that I want to count in Worksheet 3 Col
"B" and place the total in Worksheet 1 Col "E" as they relate to Worksheet 1
Col "A" Through Worksheet 2 --- then I'd like to List the individual results
in Worksheet 2 Col "F" as well.
Worksheet 3 Col "A" has values that I want to count from worksheet 4 Col "A"
and place the total in Worksheet 1 Col "F" as they relate to Worksheet 3 Col
"B" & Worksheet 2 Col "C" and back to Worksheet 1 Col "A".

Now that I have confused everyone, I have detailed it in a layout below to
hopefully explain it better than what I could do in words.


Worksheet1

........A..........B.......C........D...........E. ...........F

1.....23a.....???......Y......WS2#....WS3#....WS4#

2.....23b.....???......Y......WS2#....WS3#....WS4#

3.....23c.....???......Y......WS2#....WS3#....WS4#

4.....23d.....???......n.........-...........-.............-

5.....23e.....???......Y......WS2#....WS3#....WS4#

6.....23f.....???......n..........-...........-.............-

7.....23g.....???......Y......WS2#....WS3#....WS4#



Worksheet2

........A.........B........C.........D........E... ....F

1.....23a.....???.....ABC......???.....???.....???

2.....23a.....???.....WER.....???.....???.....???

3.....23a.....???.....XYZ......???.....???.....???

4.....23b.....???.....SDF......???.....???.....???

5.....23b.....???.....JKL.......???.....???.....?? ?

6.....23c.....???.....ASD......???.....???.....???

7.....23e.....???.....LMN......???.....???.....???



Worksheet3

........A..........B.........C........D........E.. ......F

1.....234.....WER.....???.....???.....???.....???

2.....798.....WER.....???.....???.....???.....???

3.....008.....JKL.......???.....???.....???.....?? ?

4.....123.....JKL.......???.....???.....???.....?? ?

5.....798.....JKL.......???.....???.....???.....?? ?

6.....654.....ABC......???.....???.....???.....???

7.....888.....XYZ......???.....???.....???.....???




Worksheet4

........A.........B........C.......D........E..... ...F

1.....234.....???.....???.....???.....???.....???

2.....234.....???.....???.....???.....???.....???

3.....234.....???.....???.....???.....???.....???

4.....234.....???.....???.....???.....???.....???

5.....234.....???.....???.....???.....???.....???

6.....234.....???.....???.....???.....???.....???

7.....234.....???.....???.....???.....???.....???




Worksheet1 Results

........A.........B........C.......D........E..... ....F

1.....23a.....???......Y......003.....004.....007

2.....23b.....???......Y......002.....002.....000

3.....23c.....???......Y......001.....000.....000

4.....23d.....???......n.........-.........-..........-

5.....23e.....???......Y......001....WS3#.....WS4#

6.....23f.....???......n.........-.........-..........-

7.....23g.....???......Y......WS2#....WS3#....WS4#




Worksheet2 Results

........A..........B........C........D........E... .....F

1.....23a.....???.....ABC......???.....???.....654

2.....23a.....???.....WER.....???.....???.....234, 798

3.....23a.....???.....XYZ......???.....???.....888

4.....23b.....???.....SDF......???.....???.....???

5.....23b.....???.....JKL.......???.....???.....00 8, 123, 798

6.....23c.....???.....ASD......???.....???.....???

7.....23e.....???.....LMN.....???.....???.....???


I hope I have provided enough info to get the help I am wishing for.


Thanks in Advance and for your Patience,
Rob

  #2  
Old April 8th, 2009, 04:00 AM posted to microsoft.public.excel.worksheet.functions
Sheeloo[_5_]
external usenet poster
 
Posts: 239
Default Multi-Worksheet Sumproduct & Listing

Put this in Col D of Sheet1
=SUMPRODUCT(--(Sheet2!A$1:A$100=Sheet1!A1))
to get the count of cells matching A1 in Sheet2!A$1:A$100

You can use the above to get all the numbers you want by changing the range,
lookup value and formula containing the cell appropriately..

If you want to SUM Col B where Col A matches A1 use
=SUMPRODUCT(--(Sheet2!A$1:A$100=Sheet1!A1),(Sheet2!B$1:B$100))
You can add as many conditions as you want...
Put -- in front of all conditions
Put -- in front of the last set (without a condition) if you want the count.
If you leave it out you will get the sum.

-------------------------------------
Pl. click ''''Yes'''' if this was helpful...



"Rob" wrote:

I'm hoping someone would be able to help me solve a quandry of what I am
trying to do. In Excel 2003 I have four worksheets;

Worksheet 1 has unique values in Col "A" that I want to count in Worksheet 1
Col "D" where they match Worksheet 2 Col "A"
Worksheet 2 has values in Col "C" that I want to count in Worksheet 3 Col
"B" and place the total in Worksheet 1 Col "E" as they relate to Worksheet 1
Col "A" Through Worksheet 2 --- then I'd like to List the individual results
in Worksheet 2 Col "F" as well.
Worksheet 3 Col "A" has values that I want to count from worksheet 4 Col "A"
and place the total in Worksheet 1 Col "F" as they relate to Worksheet 3 Col
"B" & Worksheet 2 Col "C" and back to Worksheet 1 Col "A".

Now that I have confused everyone, I have detailed it in a layout below to
hopefully explain it better than what I could do in words.


Worksheet1

.......A..........B.......C........D...........E.. ..........F

1.....23a.....???......Y......WS2#....WS3#....WS4#

2.....23b.....???......Y......WS2#....WS3#....WS4#

3.....23c.....???......Y......WS2#....WS3#....WS4#

4.....23d.....???......n.........-...........-.............-

5.....23e.....???......Y......WS2#....WS3#....WS4#

6.....23f.....???......n..........-...........-.............-

7.....23g.....???......Y......WS2#....WS3#....WS4#



Worksheet2

.......A.........B........C.........D........E.... ...F

1.....23a.....???.....ABC......???.....???.....???

2.....23a.....???.....WER.....???.....???.....???

3.....23a.....???.....XYZ......???.....???.....???

4.....23b.....???.....SDF......???.....???.....???

5.....23b.....???.....JKL.......???.....???.....?? ?

6.....23c.....???.....ASD......???.....???.....???

7.....23e.....???.....LMN......???.....???.....???



Worksheet3

.......A..........B.........C........D........E... .....F

1.....234.....WER.....???.....???.....???.....???

2.....798.....WER.....???.....???.....???.....???

3.....008.....JKL.......???.....???.....???.....?? ?

4.....123.....JKL.......???.....???.....???.....?? ?

5.....798.....JKL.......???.....???.....???.....?? ?

6.....654.....ABC......???.....???.....???.....???

7.....888.....XYZ......???.....???.....???.....???




Worksheet4

.......A.........B........C.......D........E...... ..F

1.....234.....???.....???.....???.....???.....???

2.....234.....???.....???.....???.....???.....???

3.....234.....???.....???.....???.....???.....???

4.....234.....???.....???.....???.....???.....???

5.....234.....???.....???.....???.....???.....???

6.....234.....???.....???.....???.....???.....???

7.....234.....???.....???.....???.....???.....???




Worksheet1 Results

.......A.........B........C.......D........E...... ...F

1.....23a.....???......Y......003.....004.....007

2.....23b.....???......Y......002.....002.....000

3.....23c.....???......Y......001.....000.....000

4.....23d.....???......n.........-.........-..........-

5.....23e.....???......Y......001....WS3#.....WS4#

6.....23f.....???......n.........-.........-..........-

7.....23g.....???......Y......WS2#....WS3#....WS4#




Worksheet2 Results

.......A..........B........C........D........E.... ....F

1.....23a.....???.....ABC......???.....???.....654

2.....23a.....???.....WER.....???.....???.....234, 798

3.....23a.....???.....XYZ......???.....???.....888

4.....23b.....???.....SDF......???.....???.....???

5.....23b.....???.....JKL.......???.....???.....00 8, 123, 798

6.....23c.....???.....ASD......???.....???.....???

7.....23e.....???.....LMN.....???.....???.....???


I hope I have provided enough info to get the help I am wishing for.


Thanks in Advance and for your Patience,
Rob

  #3  
Old April 8th, 2009, 04:59 PM posted to microsoft.public.excel.worksheet.functions
Rob
external usenet poster
 
Posts: 1,029
Default Multi-Worksheet Sumproduct & Listing

Thanks very much for the reply and attempt to help me!

I think I'm doing something wrong because when I use what you provided I get
the below results:

=SUMPRODUCT(--(Sheet2!$A$2:$A$2003=Sheet1!$C4)) = 2 -- GOOD/Perfect!

=SUMPRODUCT(--(Sheet2!$A$2:$A$2003=Sheet1!$C4),--(Sheet3!B$3:B$2003=Sheet2!$C2)) = Value Error -- Should be 3

I almost wonder if I should be trying to count an indexing result but then
I'm out of my league here. :/



"Sheeloo" wrote:

Put this in Col D of Sheet1
=SUMPRODUCT(--(Sheet2!A$1:A$100=Sheet1!A1))
to get the count of cells matching A1 in Sheet2!A$1:A$100

You can use the above to get all the numbers you want by changing the range,
lookup value and formula containing the cell appropriately..

If you want to SUM Col B where Col A matches A1 use
=SUMPRODUCT(--(Sheet2!A$1:A$100=Sheet1!A1),(Sheet2!B$1:B$100))
You can add as many conditions as you want...
Put -- in front of all conditions
Put -- in front of the last set (without a condition) if you want the count.
If you leave it out you will get the sum.

-------------------------------------
Pl. click ''''Yes'''' if this was helpful...



"Rob" wrote:

I'm hoping someone would be able to help me solve a quandry of what I am
trying to do. In Excel 2003 I have four worksheets;

Worksheet 1 has unique values in Col "A" that I want to count in Worksheet 1
Col "D" where they match Worksheet 2 Col "A"
Worksheet 2 has values in Col "C" that I want to count in Worksheet 3 Col
"B" and place the total in Worksheet 1 Col "E" as they relate to Worksheet 1
Col "A" Through Worksheet 2 --- then I'd like to List the individual results
in Worksheet 2 Col "F" as well.
Worksheet 3 Col "A" has values that I want to count from worksheet 4 Col "A"
and place the total in Worksheet 1 Col "F" as they relate to Worksheet 3 Col
"B" & Worksheet 2 Col "C" and back to Worksheet 1 Col "A".

Now that I have confused everyone, I have detailed it in a layout below to
hopefully explain it better than what I could do in words.


Worksheet1

.......A..........B.......C........D...........E.. ..........F

1.....23a.....???......Y......WS2#....WS3#....WS4#

2.....23b.....???......Y......WS2#....WS3#....WS4#

3.....23c.....???......Y......WS2#....WS3#....WS4#

4.....23d.....???......n.........-...........-.............-

5.....23e.....???......Y......WS2#....WS3#....WS4#

6.....23f.....???......n..........-...........-.............-

7.....23g.....???......Y......WS2#....WS3#....WS4#



Worksheet2

.......A.........B........C.........D........E.... ...F

1.....23a.....???.....ABC......???.....???.....???

2.....23a.....???.....WER.....???.....???.....???

3.....23a.....???.....XYZ......???.....???.....???

4.....23b.....???.....SDF......???.....???.....???

5.....23b.....???.....JKL.......???.....???.....?? ?

6.....23c.....???.....ASD......???.....???.....???

7.....23e.....???.....LMN......???.....???.....???



Worksheet3

.......A..........B.........C........D........E... .....F

1.....234.....WER.....???.....???.....???.....???

2.....798.....WER.....???.....???.....???.....???

3.....008.....JKL.......???.....???.....???.....?? ?

4.....123.....JKL.......???.....???.....???.....?? ?

5.....798.....JKL.......???.....???.....???.....?? ?

6.....654.....ABC......???.....???.....???.....???

7.....888.....XYZ......???.....???.....???.....???




Worksheet4

.......A.........B........C.......D........E...... ..F

1.....234.....???.....???.....???.....???.....???

2.....234.....???.....???.....???.....???.....???

3.....234.....???.....???.....???.....???.....???

4.....234.....???.....???.....???.....???.....???

5.....234.....???.....???.....???.....???.....???

6.....234.....???.....???.....???.....???.....???

7.....234.....???.....???.....???.....???.....???




Worksheet1 Results

.......A.........B........C.......D........E...... ...F

1.....23a.....???......Y......003.....004.....007

2.....23b.....???......Y......002.....002.....000

3.....23c.....???......Y......001.....000.....000

4.....23d.....???......n.........-.........-..........-

5.....23e.....???......Y......001....WS3#.....WS4#

6.....23f.....???......n.........-.........-..........-

7.....23g.....???......Y......WS2#....WS3#....WS4#




Worksheet2 Results

.......A..........B........C........D........E.... ....F

1.....23a.....???.....ABC......???.....???.....654

2.....23a.....???.....WER.....???.....???.....234, 798

3.....23a.....???.....XYZ......???.....???.....888

4.....23b.....???.....SDF......???.....???.....???

5.....23b.....???.....JKL.......???.....???.....00 8, 123, 798

6.....23c.....???.....ASD......???.....???.....???

7.....23e.....???.....LMN.....???.....???.....???


I hope I have provided enough info to get the help I am wishing for.


Thanks in Advance and for your Patience,
Rob

  #4  
Old April 8th, 2009, 05:28 PM posted to microsoft.public.excel.worksheet.functions
Sheeloo[_5_]
external usenet poster
 
Posts: 239
Default Multi-Worksheet Sumproduct & Listing

You are getting an error as the size of the two ranges have to be same (size
of B3:B2003 is different from A2:A2003)...
Use this
=SUMPRODUCT(--(Sheet2!$A$2:$A$2003=Sheet1!$C4),--(Sheet3!B$2:B$2003=Sheet2!$C2))
which will give you the intersection of the count not the union...
in other words it will count the rows where Col A matches C4 AND Col B
matches C2... it will not add the counts...
If you want the additon then use
-------------------------------------
Pl. click ''''Yes'''' if this was helpful...
=SUMPRODUCT(--(Sheet2!$A$2:$A$2003=Sheet1!$C4)) +
SUMPRODUCT(--(Sheet3!B$2:B$2003=Sheet2!$C2))
------------
IF =SUMPRODUCT(--(Sheet2!$A$2:$A$2003=Sheet1!$C4)) then

=SUMPRODUCT(--(Sheet2!$A$2:$A$2003=Sheet1!$C4),--(Sheet3!B$2:B$2003=Sheet2!$C2))
can not be more than 2

"Rob" wrote:

Thanks very much for the reply and attempt to help me!

I think I'm doing something wrong because when I use what you provided I get
the below results:

=SUMPRODUCT(--(Sheet2!$A$2:$A$2003=Sheet1!$C4)) = 2 -- GOOD/Perfect!

=SUMPRODUCT(--(Sheet2!$A$2:$A$2003=Sheet1!$C4),--(Sheet3!B$3:B$2003=Sheet2!$C2)) = Value Error -- Should be 3

I almost wonder if I should be trying to count an indexing result but then
I'm out of my league here. :/



"Sheeloo" wrote:

Put this in Col D of Sheet1
=SUMPRODUCT(--(Sheet2!A$1:A$100=Sheet1!A1))
to get the count of cells matching A1 in Sheet2!A$1:A$100

You can use the above to get all the numbers you want by changing the range,
lookup value and formula containing the cell appropriately..

If you want to SUM Col B where Col A matches A1 use
=SUMPRODUCT(--(Sheet2!A$1:A$100=Sheet1!A1),(Sheet2!B$1:B$100))
You can add as many conditions as you want...
Put -- in front of all conditions
Put -- in front of the last set (without a condition) if you want the count.
If you leave it out you will get the sum.

-------------------------------------
Pl. click ''''Yes'''' if this was helpful...



"Rob" wrote:

I'm hoping someone would be able to help me solve a quandry of what I am
trying to do. In Excel 2003 I have four worksheets;

Worksheet 1 has unique values in Col "A" that I want to count in Worksheet 1
Col "D" where they match Worksheet 2 Col "A"
Worksheet 2 has values in Col "C" that I want to count in Worksheet 3 Col
"B" and place the total in Worksheet 1 Col "E" as they relate to Worksheet 1
Col "A" Through Worksheet 2 --- then I'd like to List the individual results
in Worksheet 2 Col "F" as well.
Worksheet 3 Col "A" has values that I want to count from worksheet 4 Col "A"
and place the total in Worksheet 1 Col "F" as they relate to Worksheet 3 Col
"B" & Worksheet 2 Col "C" and back to Worksheet 1 Col "A".

Now that I have confused everyone, I have detailed it in a layout below to
hopefully explain it better than what I could do in words.


Worksheet1

.......A..........B.......C........D...........E.. ..........F

1.....23a.....???......Y......WS2#....WS3#....WS4#

2.....23b.....???......Y......WS2#....WS3#....WS4#

3.....23c.....???......Y......WS2#....WS3#....WS4#

4.....23d.....???......n.........-...........-.............-

5.....23e.....???......Y......WS2#....WS3#....WS4#

6.....23f.....???......n..........-...........-.............-

7.....23g.....???......Y......WS2#....WS3#....WS4#



Worksheet2

.......A.........B........C.........D........E.... ...F

1.....23a.....???.....ABC......???.....???.....???

2.....23a.....???.....WER.....???.....???.....???

3.....23a.....???.....XYZ......???.....???.....???

4.....23b.....???.....SDF......???.....???.....???

5.....23b.....???.....JKL.......???.....???.....?? ?

6.....23c.....???.....ASD......???.....???.....???

7.....23e.....???.....LMN......???.....???.....???



Worksheet3

.......A..........B.........C........D........E... .....F

1.....234.....WER.....???.....???.....???.....???

2.....798.....WER.....???.....???.....???.....???

3.....008.....JKL.......???.....???.....???.....?? ?

4.....123.....JKL.......???.....???.....???.....?? ?

5.....798.....JKL.......???.....???.....???.....?? ?

6.....654.....ABC......???.....???.....???.....???

7.....888.....XYZ......???.....???.....???.....???




Worksheet4

.......A.........B........C.......D........E...... ..F

1.....234.....???.....???.....???.....???.....???

2.....234.....???.....???.....???.....???.....???

3.....234.....???.....???.....???.....???.....???

4.....234.....???.....???.....???.....???.....???

5.....234.....???.....???.....???.....???.....???

6.....234.....???.....???.....???.....???.....???

7.....234.....???.....???.....???.....???.....???




Worksheet1 Results

.......A.........B........C.......D........E...... ...F

1.....23a.....???......Y......003.....004.....007

2.....23b.....???......Y......002.....002.....000

3.....23c.....???......Y......001.....000.....000

4.....23d.....???......n.........-.........-..........-

5.....23e.....???......Y......001....WS3#.....WS4#

6.....23f.....???......n.........-.........-..........-

7.....23g.....???......Y......WS2#....WS3#....WS4#




Worksheet2 Results

.......A..........B........C........D........E.... ....F

1.....23a.....???.....ABC......???.....???.....654

2.....23a.....???.....WER.....???.....???.....234, 798

3.....23a.....???.....XYZ......???.....???.....888

4.....23b.....???.....SDF......???.....???.....???

5.....23b.....???.....JKL.......???.....???.....00 8, 123, 798

6.....23c.....???.....ASD......???.....???.....???

7.....23e.....???.....LMN.....???.....???.....???


I hope I have provided enough info to get the help I am wishing for.


Thanks in Advance and for your Patience,
Rob

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:18 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.