Excel- How do I auto transfer rows of data to another worksheet
Closed
dpirovich
Posts
1
Registration date
Wednesday 9 March 2016
Status
Member
Last seen
9 March 2016
-
9 Mar 2016 à 04:19
TrowaD Posts 2921 Registration date Sunday 12 September 2010 Status Contributor Last seen 27 December 2022 - 10 Mar 2016 à 11:24
TrowaD Posts 2921 Registration date Sunday 12 September 2010 Status Contributor Last seen 27 December 2022 - 10 Mar 2016 à 11:24
Related:
- Excel- How do I auto transfer rows of data to another worksheet
- Transfer data from one excel worksheet to another automatically - Guide
- How to transfer free fire account to another google account - Guide
- Excel move data from one sheet to another - Guide
- How to copy data from one excel sheet to another - Guide
- Export data from excel - Guide
1 response
TrowaD
Posts
2921
Registration date
Sunday 12 September 2010
Status
Contributor
Last seen
27 December 2022
555
10 Mar 2016 à 11:24
10 Mar 2016 à 11:24
Hi Dpirovich,
The following code can be run from any sheet. It also doesn't matter how many forms you might add (if the need arrises).
Here is the code:
And in case you don't know:
How to implement and run a code:
- From Excel hit Alt + F11 to open the “Microsoft Visual Basic” window.
- Go to the top menu in the newly opened window > Insert > Module.
- Paste the code in the big white field.
- You can now close this window.
- Back at Excel, hit Alt + F8 to display the available macro’s.
- Double-click the macro you wish to run.
NOTE: macro’s cannot be reversed using the blue arrows. Always make sure you save your file before running a code, so you can re-open your file if something unforeseen happens or you want to go back to the situation before the code was run.
Best regards,
Trowa
The following code can be run from any sheet. It also doesn't matter how many forms you might add (if the need arrises).
Here is the code:
Sub RunMe()
Dim ws As Worksheet
For Each ws In Worksheets
If ws.Name <> "Final Scores" Then
ws.Select
Range("A2:C" & Range("C" & Rows.Count).End(xlUp).Row).Copy _
Sheets("Final Scores").Range("A" & Rows.Count).End(xlUp).Offset(1, 0)
Range("G2:G" & Range("G" & Rows.Count).End(xlUp).Row).Copy _
Sheets("Final Scores").Range("D" & Rows.Count).End(xlUp).Offset(1, 0)
End If
Next ws
Sheets("Final Scores").Select
Range("A1").CurrentRegion.Sort key1:=Range("D1"), order1:=xlDescending, Header:=xlYes
End Sub
And in case you don't know:
How to implement and run a code:
- From Excel hit Alt + F11 to open the “Microsoft Visual Basic” window.
- Go to the top menu in the newly opened window > Insert > Module.
- Paste the code in the big white field.
- You can now close this window.
- Back at Excel, hit Alt + F8 to display the available macro’s.
- Double-click the macro you wish to run.
NOTE: macro’s cannot be reversed using the blue arrows. Always make sure you save your file before running a code, so you can re-open your file if something unforeseen happens or you want to go back to the situation before the code was run.
Best regards,
Trowa