Cut/Copy in VBA
Solved/Closed
Chamberlyn
Posts
4
Registration date
Sunday 25 November 2012
Status
Member
Last seen
19 December 2013
-
25 Nov 2012 à 21:47
Chamberlyn Posts 4 Registration date Sunday 25 November 2012 Status Member Last seen 19 December 2013 - 26 Nov 2012 à 20:27
Chamberlyn Posts 4 Registration date Sunday 25 November 2012 Status Member Last seen 19 December 2013 - 26 Nov 2012 à 20:27
Related:
- Cut/Copy in VBA
- Vba find - Guide
- Cut the rope download - Download - Puzzle
- How to open vba in excel - Guide
- Vba select case like - Guide
- My cut roommate - Download - Adult games
3 responses
TrowaD
Posts
2921
Registration date
Sunday 12 September 2010
Status
Contributor
Last seen
27 December 2022
555
26 Nov 2012 à 09:34
26 Nov 2012 à 09:34
Hi Chamberlyn,
So you would like to copy your manual selected range and paste it to the next sheet in the first available row.
If this is true then the following code should suffice:
Best regards,
Trowa
So you would like to copy your manual selected range and paste it to the next sheet in the first available row.
If this is true then the following code should suffice:
Sub test()
Sheets("Sheet3").Activate
Selection.Copy Sheets("SAP Report").Range("A" & Rows.Count).End(xlUp).Offset(1, 0)
End Sub
Best regards,
Trowa
Chamberlyn
Posts
4
Registration date
Sunday 25 November 2012
Status
Member
Last seen
19 December 2013
26 Nov 2012 à 16:19
26 Nov 2012 à 16:19
Good Morning TrowaD,
Thank you so much for you reply. I actually need to copy a table which increases each update, to a second worksheet in the same workbook. The copy from the first sheet (sheet 3) will over write any data existing in the second worksheet (SAP Report) but the first line of the copied data will start in row A6:K6 in SAP Reports worksheet.
The actual table data range in ("sheet3") to be copied starts in columns A2:K? as I do not want to copy the headers. In the "SAP Report" worksheet where the data is going the table must start as mentioned above into row A6. I can't do a sheet cut and paste because there are 3 more (L,M,N)columns in the (SAP Report) worksheet which contain formula that I don't want to overwrite. Hope this clarifies the issue.
Kind Regards
Thank you so much for you reply. I actually need to copy a table which increases each update, to a second worksheet in the same workbook. The copy from the first sheet (sheet 3) will over write any data existing in the second worksheet (SAP Report) but the first line of the copied data will start in row A6:K6 in SAP Reports worksheet.
The actual table data range in ("sheet3") to be copied starts in columns A2:K? as I do not want to copy the headers. In the "SAP Report" worksheet where the data is going the table must start as mentioned above into row A6. I can't do a sheet cut and paste because there are 3 more (L,M,N)columns in the (SAP Report) worksheet which contain formula that I don't want to overwrite. Hope this clarifies the issue.
Kind Regards
Chamberlyn
Posts
4
Registration date
Sunday 25 November 2012
Status
Member
Last seen
19 December 2013
26 Nov 2012 à 20:27
26 Nov 2012 à 20:27
For anybody who is interested, I have worked out a solution to my issue
Set tbl = ActiveCell.CurrentRegion
Worksheets("Sheet3").Activate
tbl.Offset(1, 0).Resize(tbl.Rows.Count - 1, _
tbl.Columns.Count).Select
Selection.Copy
Sheets("SAP Report").Select
Range("A6").Select
ActiveSheet.Paste
Sheets("Sheet3").Select
Application.CutCopyMode = False
Thanks for the help though TrowaD, Regards
Set tbl = ActiveCell.CurrentRegion
Worksheets("Sheet3").Activate
tbl.Offset(1, 0).Resize(tbl.Rows.Count - 1, _
tbl.Columns.Count).Select
Selection.Copy
Sheets("SAP Report").Select
Range("A6").Select
ActiveSheet.Paste
Sheets("Sheet3").Select
Application.CutCopyMode = False
Thanks for the help though TrowaD, Regards