SUMPRODUCT for multiple sheets

nikkis

New Member
Joined
Apr 21, 2011
Messages
3
Hi,

I have created a sumproduct that works for a single sheet:
=SUMPRODUCT(--(A4:A30="Clouds EASY"), C4:C30)

However, I have 40 plus sheets that I need to apply this function to (and over 200 effects). Currently the formula for three sheets (760, 236 and 980) is:

=SUM(SUMPRODUCT(--('760'!A4:A30="Clouds EASY"), '760'!C4:C30), SUMPRODUCT(--('980'!A4:A30="Clouds EASY"), '980'!C4:C30),SUMPRODUCT(--('236'!A4:A30="Clouds EASY"), '236'!C4:C30))

This works fine but is incredibly time consuming, especially since I have to do this for EVERY sheet and every effect in my document. Any recommendations on a solution?

Thanks!!

Nikki
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Hello Nikki,

If you just have one condition, use SUMIF instead of SUMPRODUCT.

In your all sheets, let's say in E1 enter,

=SUMIF(A4:A30,"Clouds EASY",C4:C30)

Then you can simply use SUM like,

=SUM('FirstSheet:LastSheet'!E1)

Or,

Enter your all sheet names in a range, let's say E2:E40, then try

=SUMPRODUCT(SUMIF(INDIRECT("'"&E2:E40&"'!A4:A30"),"Clouds EASY",INDIRECT("'"&E2:E40&"'!C4:C30")))
 
Upvote 0
Thank you for your reply Haseeb!

Could you explain the range a little bit further for me? Right now each sheet is named after a scene number in the movie. The three sheets I am practicing on are: 760, 236, 980 (in that order). So the range would be 760:980.

When I entered:

=SUMPRODUCT(SUMIF(INDIRECT("'"&760:980&"'!A4:A30"),"Clouds EASY",INDIRECT("'"&760:980&"'!C4:C30")))

#Ref error appeared. Any idea what I'm doing wrong?
 
Upvote 0
Enter sheet names in,

E2, 760
E3, 236
E4, 980

Then,

=SUMPRODUCT(SUMIF(INDIRECT("'"&E2:E4&"'!A4:A30"),"Clouds EASY",INDIRECT("'"&E2:E4&"'!C4:C30")))
 
Upvote 0
IT WORKS!!! Thank you sooooo much!!! I have literally spent the last two days trying to figure this thing out!!
 
Upvote 0

Forum statistics

Threads
1,224,599
Messages
6,179,828
Members
452,946
Latest member
JoseDavid

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top