An easy one - sums across worksheets

bend01

New Member
Joined
Jan 3, 2007
Messages
16
I am adding up the same cell on 18 different worksheets within one workbook (there are some worksheets not included in the sums). Is there a quick way of doing this? I have done quite a few so far and have a lot more to go! It is getting a little repetitive as you can imagine?

Your help as alsways is appreciated.
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
This macro will sum the values of B1 on every sheet in the workbook and place it in cell A1 on Sheet1. Does that help you at all?
Code:
Sub SumSheets()
Dim sh As Worksheet
Dim wb As Workbook
Set wb = ThisWorkbook
For Each sh In wb.Worksheets
    Sheets("Sheet1").Range("A1") = Sheets("Sheet1").Range("A1") + sh.Range("B1")
Next sh
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,545
Messages
6,120,128
Members
448,947
Latest member
test111

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