Copying rows with data from multiple sheets to one master sheet
Closed
comeecoco
-
Jul 26, 2017 at 12:24 AM
vcoolio Posts 1411 Registration date Thursday July 24, 2014 Status Moderator Last seen September 6, 2024 - Jul 26, 2017 at 03:15 AM
vcoolio Posts 1411 Registration date Thursday July 24, 2014 Status Moderator Last seen September 6, 2024 - Jul 26, 2017 at 03:15 AM
Related:
- Copying rows with data from multiple sheets to one master sheet
- Master royale - Download - Strategy
- Google sheet right to left - Guide
- Windows network commands cheat sheet - Guide
- Yu-gi-oh master duel download pc without steam - Download - Strategy
- Transfer data from one excel worksheet to another automatically - Guide
1 response
vcoolio
Posts
1411
Registration date
Thursday July 24, 2014
Status
Moderator
Last seen
September 6, 2024
262
Jul 26, 2017 at 03:15 AM
Jul 26, 2017 at 03:15 AM
Hello Comeecoco,
Try the following code placed in a standard module and assigned to a button:-
I'm assuming that you are using "<>0" (is not equal to zero) as the criteria to filter on. You can change this to suit yourself.
I'm also assuming that your Master sheet has the sheet code of Sheet1 (line 13 in the code above).
The code will filter Column Q of each sheet for the criteria ("<>0") and then transfer the relevant rows of data from each sheet to the Master sheet.
I hope that this helps.
Cheerio,
vcoolio.
Try the following code placed in a standard module and assigned to a button:-
Sub TransferData() Dim ws As Worksheet Application.ScreenUpdating = False For Each ws In Worksheets If ws.Name <> "Master" Then With ws.Range("Q1", ws.Range("Q" & ws.Rows.Count).End(xlUp)) .AutoFilter 1, "<>0" .Offset(1).EntireRow.Copy Sheet1.Range("A" & Rows.Count).End(3)(2).PasteSpecial xlPasteValues End With ws.[Q1].AutoFilter End If Next ws Application.CutCopyMode = False Application.ScreenUpdating = True End Sub
I'm assuming that you are using "<>0" (is not equal to zero) as the criteria to filter on. You can change this to suit yourself.
I'm also assuming that your Master sheet has the sheet code of Sheet1 (line 13 in the code above).
The code will filter Column Q of each sheet for the criteria ("<>0") and then transfer the relevant rows of data from each sheet to the Master sheet.
I hope that this helps.
Cheerio,
vcoolio.