karthikgoel
New Member
I have macro that merges data from different worksheets into Master sheet all the sheets have the same columns.
the macro works fine when there are no merged rows in worsheets. but with merged cells in some worksheets it does not pull all the records (it only pulls one record) from the worksheet. Have included the macro code below and also attached the file. how do I ensure that all the data is copied from all worksheets into Master sheet ?
(note: row 1 & 2 are headers)
the macro works fine when there are no merged rows in worsheets. but with merged cells in some worksheets it does not pull all the records (it only pulls one record) from the worksheet. Have included the macro code below and also attached the file. how do I ensure that all the data is copied from all worksheets into Master sheet ?
(note: row 1 & 2 are headers)
Code:
Sub SummurizeSheets()
Dim ws As Worksheet
Application.ScreenUpdating = False
Sheets("Master").Activate
'Optional Clears the specific range in the Master sheet except header
Sheets("Master").Range("A3:G150").Clear
For Each ws In Worksheets
If ws.Name <> "Master" Then
ws.Range("A3:G150").Copy
ActiveSheet.Paste Range("A65536").End(xlUp).Offset(1, 0)
End If
Next ws
End Sub