Sum all worksheets to a Single Worksheet

dragonmouse

Board Regular
Joined
May 14, 2008
Messages
129
Office Version
  1. 2016
Platform
  1. Windows
I have multiple worksheets. In cell "M3" they all have the following formula adding up columns within it:

=IF(R3,R3+S3+T3," ")

On the Summary page I have this formula trying to add up all the worksheets but it's returning a VALUE. I want it to return a sum for all the worksheets in that cell (some weeks may NOT have a number). If none of the cells have a value then it should just return a blank cell. What I think should be easy just isn't working

=IF(OR('Week 42'!M3>0,'Week 44'!M3>0,'Week 46'!M3>0,'Week 48'!M3>0,'Week 50'!M3>0,'Week 52'!M3>0),('Week 42'!M3+'Week 44'!M3+'Week 46'!M3+'Week 48'!M3+'Week 50'!M3+'Week 52'!M3)," ")
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Slight change:

Each of my 6 worksheets has a formula:
=IF(OR(R3>0,S3>0,T3>0),(R3+S3+T3), " ")

This formula, IF any of three cells R3, S3, T3 have numbers in them it will add them or it will return a BLANK (it's too late to add to my first POST above)

There are 6 Sheets. The SAME cell on each sheet has this formula. I want to add ALL cells containing a number and consolidate it on a single summary sheet. IF there is NO data then I want it to return a blank.

The formula I tried isn't working. NOTE some sheets may not have data.
 
Upvote 0
Assuming your Summary sheet is either the extreme left sheet tab or the extreme right sheet tab and your other tabs are, left to right.... Sheet2 to Sheet7 or whatever their names then try

=IF(ISERROR(1/SUM(Sheet2:Sheet7!M3)),"",SUM(Sheet2:Sheet7!M3))

Hope that helps.
 
Last edited:
Upvote 0
A few additional notes to Snakehips' post. You can create a 3-D SUM formula like he showed, but the sheets must all be consecutive. It looks like you're trying to add up Week 42, Week 44, etc. If you have a Week 43 in there, your totals will be off, unless you want to rearrange the sheets. Also, check the example in O3 below to see how to code it when the sheet names have spaces in them.
Book1
OPQ
37.5Week 42
47.5Week 44
57.5Week 52
Week 42
Cell Formulas
RangeFormula
O3=SUM('Week 42:Week 52'!M3)
O4=SUMPRODUCT(SUMIF(INDIRECT("'"&$Q$3:$Q$5&"'!M3"),">0"))
O5=IFERROR(1/(1/SUMPRODUCT(SUMIF(INDIRECT("'"&$Q$3:$Q$5&"'!M3"),">0"))),"")


Finally, another option is to list the sheet names you want to include, then use a SUMPRODUCT formula to get the sum from those sheets (formula in O4). This version allows you to use the sheets in any order or position. Finally, another way to get a 0 to appear as an empty cell is shown in O5.

Hope this helps!
 
Upvote 0
Thank you for all your replies.
The following is working perfectly:

=IF(SUM('Week 42:Week 52'!S3)>0,SUM('Week 42:Week 52'!S3)," ")
 
Upvote 0

Forum statistics

Threads
1,214,411
Messages
6,119,360
Members
448,888
Latest member
Arle8907

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