Transferring data to successive worksheets

Closed
Report
Posts
1
Registration date
Tuesday September 15, 2015
Status
Member
Last seen
September 15, 2015
-
Posts
2829
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
November 22, 2021
-
Hi
I have a excel workbook containing several worksheets. To keep things simple Sheet 1 contains a column headed Dates listing 36 weekly starting dates: 10-Sept-15, 17-Sept-15 .........and so on. What I would like to do is automatically copy the first date in the column of sheet 1 to cell A2 of sheet 2, the second date to cell A2 of sheet 3, the third date to cell A2 of sheet 3 and so on for all 36 dates. I need a VBA code to do this please. Hopefully, having got the code I will be able to modify it to copy other data similarly. Any expert advice would be greatly appreciated.

1ne-2wo-3hree

1 reply

Posts
2829
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
November 22, 2021
490
Hi 123,

Here is you requested code:
Sub RunMe()
Dim x, sCount As Integer

x = 1
sCount = 1

Sheets("Sheet1").Select

Do
    x = x + 1
    sCount = sCount + 1
    Sheets(sCount).Range("A2").Value = Sheets("Sheet1").Range("A" & x).Value
Loop Until sCount = Sheets.Count
End Sub


Good luck with the modifying.

Best regards,
Trowa