Transferring data to successive worksheets

Closed
1ne-2wo-3hree Posts 1 Registration date Tuesday September 15, 2015 Status Member Last seen September 15, 2015 - Sep 15, 2015 at 12:44 PM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Sep 17, 2015 at 11:30 AM
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
Related:

1 response

TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 555
Sep 17, 2015 at 11:30 AM
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
0