Insert Data from one sheet to another

Closed
AhmedRhab
Posts
3
Registration date
Saturday January 11, 2014
Status
Member
Last seen
January 12, 2014
- Jan 11, 2014 at 06:45 PM
venkat1926
Posts
1864
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
- Jan 13, 2014 at 11:37 PM
Hi Guys

am new to Macro and looking for some help. i was trying to create a sheet to be entry data and the data to be saved in another tab without deleting the previous entered datam please find what i'm using bellow

Sub Save()

Range("A6:I6").Select
Selection.Copy
Sheets("Sheet2").Select
Range("A2:I2").Select
ActiveSheet.Paste
End Sub

5 replies

venkat1926
Posts
1864
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
805
Jan 12, 2014 at 12:19 AM
try this (whichever sheet is active)
Sub Save()
'Range("A6:I6").Select
'Selection.Copy
'Sheets("Sheet2").Select
'Range("A2:I2").Select
'ActiveSheet.Paste
With Worksheets("sheet1")
.Range("A16:I16").Copy
With Worksheets("sheet2")
.Range("A1").PasteSpecial
End With
End With
End Sub

0
AhmedRhab
Posts
3
Registration date
Saturday January 11, 2014
Status
Member
Last seen
January 12, 2014

Jan 12, 2014 at 03:04 AM
Hi

I gave it a try but its still deleting the old data and paste the new one, what am looking for is every time i press the button the new data in sheet1 go to a new row in sheet2

Regards
Ahmed
0
venkat1926
Posts
1864
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
805
Jan 12, 2014 at 06:26 AM
did you remove tose lines with single apostrophe in the beginnbinbg and kept the rest.
ok I hgave modified the macro

Sub Save()

With Worksheets("sheet1")
.Range("A16:I16").Copy
With Worksheets("sheet2")
.cells(rows.count,"A").end(xlup).offset(1,0)


End With
End With
End Sub
0
AhmedRhab
Posts
3
Registration date
Saturday January 11, 2014
Status
Member
Last seen
January 12, 2014

Jan 12, 2014 at 11:00 AM
well, this time am getting Syntax error, i believe no paste command in the macro at all?
0

Didn't find the answer you are looking for?

Ask a question
venkat1926
Posts
1864
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
805
Jan 13, 2014 at 11:37 PM
SORRY you are3 right I have missed (this is because I have not tested-usually I test)

modify

.cells(rows.count,"A").end(xlup).offset(1,0) .pastespecial
0