Autofill same cells but with multiple worksheets

rickcb

New Member
Joined
Oct 23, 2006
Messages
23
I have 52 identical worksheets (one for every week) and need to create a quick copy of each worksheets' C9:J11 cells. The autofill doesn't quite understand what I'm trying to do as it keeps referencing the same worksheet when I drag the handle across the grid.

Any shortcuts to this or will I have to do this manually ?

Thanks
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Hi
Paste the following codes in the macro window ( Alt F8)

Code:
Sheets.Add.Name = "Summary"
For a = 1 To Sheets.Count
Cells(a * 3, 1) = Worksheets.Name
For b = 3 To 10
For c = 9 To 11
Cells(a * 3 + c - 9,b) = Worksheets(a).Cells(c, b)
Next c
Next b
Next a
run the macro. It will add a sheet called summary and collates all C9 to J11 in it.
Ravi
 
Upvote 0
Information missing

I've tried to run the macro but I get a compile error. I forgot to mention that the worksheets are all named as WK 1, WK 2, WK 3,... WK 52

Thanks
 
Upvote 0
Hi
No need for sheet names in this macro. I found an error in the code I gave. The modified code is

Code:
Sheets.Add.Name = "Summary"
For a = 1 To Sheets.Count
Cells(a * 3, 1) = Worksheets(a).Name
For b = 3 To 10
For c = 9 To 11
Cells(a * 3 + c - 9, b) = Worksheets(a).Cells(c, b)
Next c
Next b
Next a
Ravi
 
Upvote 0

Forum statistics

Threads
1,222,415
Messages
6,165,894
Members
451,993
Latest member
rowebca

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