Sum of same cell on multiple sheets

Kamolga

Well-known Member
Joined
Jan 28, 2015
Messages
1,185
Hi,

I have this formula that works
Code:
=SUM('ETU1:ETU9'!G30)
but I need the 9 to be dynamic. Its value is in cell F19 of the same sheet.

I therefore try to get

Code:
[LEFT][CODE][COLOR=#222222][FONT=Verdana]=SUM(indirect("'ETU1:ETU"&F19&"'!G30"))[/FONT][/COLOR]
but that does not work. Can you spot what is wrong?[/LEFT]
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Re: Pls help with Formula: Sum of same cell on multiple sheets

INDIRECT doesn't work with a 3D Reference

INDIRECT won't accept a 3D sheet reference. Default solution is using sheets named "start" and "end" which are empty and does not be changed or deleted at all. Then a =SUM(start:end!A1) will sum all values A1 of all sheets placed between the sheets named "start" and "end"

is one solution.

Another solution here

https://www.mrexcel.com/forum/excel-questions/666334-3d-sum-indirect-problem.html
 
Last edited:
Upvote 0
Re: Pls help with Formula: Sum of same cell on multiple sheets

Default solution is using sheets named "start" and "end" which are empty and does not be changed or deleted at all. Then a =SUM(start:end!A1) will sum all values A1 of all sheets placed between the sheets named "start" and "end"is one solution.

Thank you. At first I did not like that much the option as the file is a template populating pages with variables already and I feared having to go through my codes to hide and unhide the right pages. But then I simply changed my copying macro to

Code:
For i = 1 To Range("RngPages").Value - 1
ShETU.Copy before:=ShStop
        ActiveSheet.Name = "ETU" & i
Next i
and my ShStart and ShStop stay very hidden all the time, so I can completely forget about them :) So sum start-end array works perfectly, even when delete pages
Thanks again for the input, I did search for long and that would have never come to my mind.
 
Upvote 0

Forum statistics

Threads
1,216,750
Messages
6,132,499
Members
449,730
Latest member
SeanHT

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