Macro for merging data from multiple sheets
Solved/Closed
Ashwathi V K
-
Jan 23, 2017 at 06:15 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Jan 31, 2017 at 11:23 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Jan 31, 2017 at 11:23 AM
Related:
- Macro for merging data from multiple sheets
- Tmobile data check - Guide
- Gta 5 data download for pc - Download - Action and adventure
- Sheets right to left - Guide
- Transfer data from one excel worksheet to another automatically - Guide
- Allow multiple downloads chrome - Guide
1 response
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 27, 2022
555
Jan 24, 2017 at 12:09 PM
Jan 24, 2017 at 12:09 PM
Hi Ashwathi V K,
That single excel sheet in the code below is called "Main". Every Column B of all the other sheets will be copied to the "Main" sheets first available column based on the data in the first row.
Give it a try:
Best regards,
Trowa
That single excel sheet in the code below is called "Main". Every Column B of all the other sheets will be copied to the "Main" sheets first available column based on the data in the first row.
Give it a try:
Sub RunMe() Dim ws As Worksheet For Each ws In Worksheets If ws.Name <> "Main" Then ws.Select Columns("B:B").Copy Sheets("Main").Cells(1, Columns.Count).End(xlToLeft).Offset(0, 1) End If Next ws End Sub
Best regards,
Trowa
Jan 26, 2017 at 11:47 PM
It is not working. Is says 'Run time error 9' .
Thanking you
With regards
Ashwathi V K
Jan 30, 2017 at 11:33 AM
Do you have a sheet named "Main" in your workbook?
Best regards,
Trowa
Jan 30, 2017 at 11:44 PM
Sorry , I didn't made a separate sheet named 'Main'. That's why it shows error. Now i am able to run. thankyou for solving the problem.
Thankyou
With regards
Ashwathi V K
Jan 31, 2017 at 11:23 AM