Creating a summary table from a large number of worksheets

Glove303

Board Regular
Joined
Dec 18, 2010
Messages
65
Hi,

I have over 100 worksheets that have the same table (same dimensions, in the same location), and I want to create a summary table on another worksheet that sums each cells value.

Looping through the worksheets is far too slow, and I'm sure there is a better solution.

Outside of VBA I could use SUM('WS1:WS2'!R1C1), but I have tried replacing the WS1 with variables and it doesn't work. I'd prefer to do it with VBA anyway if possible, so that I can delete the workheet and create it again, rather than having to leave it there.

Any help would be greatly received.

James.
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
For example:

Code:
Sub test()
'
    hini = "sheet1"     'name of your initial sheet.
    hfin = "Sheet3"     'name of your final sheet
    cell1 = "G4"        'cell with result
    cell2 = "A2"        'cell with the values to be added
    With Sheets("summary").Range(cell1)
        .Formula = "=SUM(" & hini & ":" & hfin & "!" & cell2 & ")"
        .Value = .Value
    End With
End Sub
 
Upvote 0

Forum statistics

Threads
1,216,108
Messages
6,128,872
Members
449,475
Latest member
Parik11

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