SUM function over infinite number of sheets?

N

Not2Bright

Hi Folks

I've currently got a workbook with 5 spreadsheets. The first shee
acts as a summary sheet and totals up the values in cell A1 in each o
the remaining four sheets. Here's my formula that sits on sheet 1:

=SUM('Sheet2'!A1+'Sheet3'!A1+'Sheet4'!A1+'Sheet5'!A1)

The thing is, I'm constantly adding new sheets to the workbook (e.g
Sheet6, Sheet7, etc, etc) and, at the moment, I have to manually ad
these to my formula on the summary sheet to get the correct total
e.g.

=SUM('Sheet2'!A1+'Sheet3'!A1+'Sheet4'!A1+'Sheet5'!A1*+'Sheet6'!A1+'Sheet7'!A1*)

Is there anyway in Excel using either a built-in function or VB tha
could allow me to do something like this:

=SUM('*Any sheet other than this one*'!A1)

Any help much appreciated. Cheers
 
D

Dave Peterson

Insert a worksheet to the left and right of your worksheets that get added:

Call the one to the left: Start
call the one to the right: End

then use a formula like:

=sum('start:end'!a1)

in your summary sheet. (keep that summary sheet to the far right or far
left--not between these to sheets.

If you insert a new sheet, just add it between these two.

If you want to see what happens if you got rid of a sheet, just move it from
between the sheets.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top