Copy list to every next WS


Posted by Linda on July 26, 2000 2:40 AM

Is there a way to copy a cell goto 2nd worksheet paste into a cell (A1) then go back to 1st sheet drop down a row copy the cell and paste onto the 3rd sheet etc and continue until no more cells of data in the 1st sheet.

eg:

Sheet1 (column A, starting Row 1)
Jan
Feb
March
April
May

Sheet2 would have in cell A1 = Jan
Sheet3 = Feb
Sheet4 = March
Sheet5 = April
Sheet6 = May ......etc.

Can this be done?

Thanxs in adv.

Linda

Posted by Ada on July 26, 0100 3:36 AM


Linda
I have assumed that you are starting with only one sheet and you want the macro to add sheets and then copy/paste the months.

Check whether the following macro does what you need. If not, post again.

Sub CopyMonths()
Dim Mnth As Range, x As Integer
Set Mnth = Sheets(1).Range("A1")
x = 1
Do Until Mnth = ""
Sheets.Add After:=Sheets(x)
x = x + 1
Mnth.Copy Destination:=Sheets(x).Range("A1")
Set Mnth = Mnth.Offset(1, 0)
Loop
End Sub

Ada


Posted by Linda on July 26, 0100 4:44 AM

No months just text

I'm sorry, I only used the months as examples of text.

The text can vary, so basically I need to copy whats in the cells (from A1 down to end).

The other sheets are already there so there is no need to add sheets.

Thanxs,

Linda

Posted by Ada on July 26, 0100 5:31 AM

Re: No months just text


Linda

Try this :-

Sub CopyWhatever()
Dim Mnth As Range, x As Integer
Set Mnth = Sheets(1).Range("A1")
x = 2
Do Until Mnth = ""
Mnth.Copy Destination:=Sheets(x).Range("A1")
x = x + 1
Set Mnth = Mnth.Offset(1, 0)
Loop
End Sub

Ada




Posted by Linda on July 26, 0100 8:26 AM

Thanxs

Thanxs Ada,

It works a treat.

Sorry I thought that Mnth = Month but seems to work on anything.

Thanxs once again,

Linda