P
Peter
Hi,
Can anyone please help with a problem I'm having copying data from one
worksheet to another?
On sheet1 I have date in cells AT1 and AT2. What I am trying do do is
copy this data from these two cells into cells in the next free row in
columns A and D in sheet2, i.e. A2 and D2, then next time A3 & D3.
The cde i'm using is:
Sheets("sheet1").Select
Range("AT1").Activate
Selection.Copy
Sheets("sheet2").Activate
Set rng = Cells(Rows.Count, "A").End(xlUp)(2)
rng.Value = Text
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone,
SkipBlanks:=False, Transpose:=False
Sheets("sheet1").Select
Range("AT2").Activate
Selection.Copy
Sheets("sheet").Activate
Set rng = Cells(Rows.Count, "D").End(xlUp)(2)
rng.Value = Text
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone,
SkipBlanks:=False, Transpose:=False
Sheets("sheet1").Select
The problem I'm encountering is that the data from sheet1 AT2 is
always copied into sheet 2 A2 - no sign of the data from AT1 and it
always overwrites, it doesn't copy to the next free row.
Any help/advice/suggestions would be much appreciated.
--
Cheers
Peter
Remove the INVALID to reply
Can anyone please help with a problem I'm having copying data from one
worksheet to another?
On sheet1 I have date in cells AT1 and AT2. What I am trying do do is
copy this data from these two cells into cells in the next free row in
columns A and D in sheet2, i.e. A2 and D2, then next time A3 & D3.
The cde i'm using is:
Sheets("sheet1").Select
Range("AT1").Activate
Selection.Copy
Sheets("sheet2").Activate
Set rng = Cells(Rows.Count, "A").End(xlUp)(2)
rng.Value = Text
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone,
SkipBlanks:=False, Transpose:=False
Sheets("sheet1").Select
Range("AT2").Activate
Selection.Copy
Sheets("sheet").Activate
Set rng = Cells(Rows.Count, "D").End(xlUp)(2)
rng.Value = Text
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone,
SkipBlanks:=False, Transpose:=False
Sheets("sheet1").Select
The problem I'm encountering is that the data from sheet1 AT2 is
always copied into sheet 2 A2 - no sign of the data from AT1 and it
always overwrites, it doesn't copy to the next free row.
Any help/advice/suggestions would be much appreciated.
--
Cheers
Peter
Remove the INVALID to reply