sum all sheets cell in master sheet

nikko50

Board Regular
Joined
Mar 3, 2004
Messages
155
I want to sum all of the b8 cells of the hundrend or so sheets I have into cell a1 of the "Master" sheet. How can I do this?
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Select your first sheet and press 'Shift' and select your last sheet, to select all your sheets;

Code:
=SUM(First:Last!B8)

HTH
Colin
 
Upvote 0
You need a 3D formulae, eg.

=SUM(Sheet2:Sheet3!B8)

All the sheets to be added need to be contiguous, i.e. adjacent to each other.
 
Upvote 0
try this:

Code:
Sub test()
Dim ws As Worksheet

For Each ws In Worksheets
    Sheet1.Range("A1").Value = Sheet1.Range("A1").Value + Sheets(ws.Name).Range("B8").Value
Next ws

End Sub
 
Upvote 0
Add New Sheet(s) between the First Sheet and the Last one, then these will be automaticaly be included in the 3D SUM.
 
Upvote 0

Forum statistics

Threads
1,214,833
Messages
6,121,868
Members
449,053
Latest member
Mesh

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