Copy entire row(s) from multiple sheets to a master sheet in the same wookbook

Wedgy253

New Member
Joined
Feb 22, 2018
Messages
1
I have multiple expense sheets (one for each community managed), I need to copy the expense details from these sheets to a master expense sheet. Each expense sheet totals monthly and YTD, and I don't need those rows copied. Thank you in advance for any help!
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
This will consolidate the date from each sheet to the "Master" sheet

Code:
Sub MM1()
Dim r As Long, lr1 As Long, lr2 As Long, ws As Worksheet
lr1 = Sheets("Master").Range("A" & Rows.Count).End(xlUp).Row
    For Each ws In Worksheets
        If ws.Name <> "Master" Then
        lr2 = ws.Range("A" & Rows.Count).End(xlUp).Row
            For r = 1 To lr2
                    ws.Rows(r).Copy Sheets("Master").Range("A" & lr1 + 1)
                    lr2 = ws.Range("A" & Rows.Count).End(xlUp).Row
                lr1 = Sheets("Master").Range("A" & Rows.Count).End(xlUp).Row
            Next r
        End If
    Next ws
End Sub
You will need to give us more info on how / what defines the monthtly / YTD rows !!
 
Upvote 0

Forum statistics

Threads
1,216,222
Messages
6,129,586
Members
449,520
Latest member
TBFrieds

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top