Kinger1968
New Member
- Joined
- Oct 3, 2023
- Messages
- 5
- Platform
- Windows
I'm very much a novice at this and have been scouring the internet trying to work out how to do it.
I have a workbook that has worksheets called Week1, Week 2 etc up to Week 52, if I go all year.
They are generated on a weekly basis and I'd like to take 4 cells of data (K11:K14) from each sheet every week and put them in a table on a sheet called "Graphs."
The cells I want to put the data in start at (C8:C:11) on Week1 and Week2 they move to (D8:D11), which is where I'm failing.
I have this code below so far that only puts data in Week1. Every time I try to add loops to index the destination cells I get all sorts of errors.
Sub WeeksLoop()
Dim ws As Worksheet
Application.ScreenUpdating = False
For Each ws In ThisWorkbook.Worksheets
If ws.Name <> "Menu" And ws.Name <> "Graphs" And ws.Name <> "Master" Then
Worksheets("Week1").Range("K11:K14").Copy Destination:=Worksheets("Graphs").Range("C8:C11")
End If
Next ws
Application.ScreenUpdating = True
End Sub
Any help would be greatly appreciated!
Thanks in advance.
I have a workbook that has worksheets called Week1, Week 2 etc up to Week 52, if I go all year.
They are generated on a weekly basis and I'd like to take 4 cells of data (K11:K14) from each sheet every week and put them in a table on a sheet called "Graphs."
The cells I want to put the data in start at (C8:C:11) on Week1 and Week2 they move to (D8:D11), which is where I'm failing.
I have this code below so far that only puts data in Week1. Every time I try to add loops to index the destination cells I get all sorts of errors.
Sub WeeksLoop()
Dim ws As Worksheet
Application.ScreenUpdating = False
For Each ws In ThisWorkbook.Worksheets
If ws.Name <> "Menu" And ws.Name <> "Graphs" And ws.Name <> "Master" Then
Worksheets("Week1").Range("K11:K14").Copy Destination:=Worksheets("Graphs").Range("C8:C11")
End If
Next ws
Application.ScreenUpdating = True
End Sub
Any help would be greatly appreciated!
Thanks in advance.