Combining excel worksheets in a workbook onto 1 sheet

I have a macro I am trying to get to work. It's in a workbook with 7 worksheets labeled Greschner, Vodnick, Mello, Goodrich, Fasino, Cooke and Canavan. The columns A-M are identical on all worksheets. Problem is when I run the macro which makes a new worksheet labeled COMBINED, it does not copy everything from the other 7 worksheets, specifically, the first worksheet Greschner copies fine, and the last worksheet Canavan copies fine, but the worksheets in the middle are all missing their LAST ROW of data. I cannot tell why this is happening. I have attached a notepad file of the macro.
thx experts...
BobR
combine.txt
bobrossi56Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

FlysterCommented:
You forgot to add the offset to your other sheets. So it was going to the last used row and starting there, instead of dropping down one. This one seems to work:
Sheets.Add After:=Sheets(Sheets.Count)
    Dim wks As Worksheet
    Dim lastrow As Long

   Set wks = Sheets(Sheets.Count)
   wks.Name = "Combined"

   With Sheets("Greschner")
    lastrow = .Range("A" & .Rows.Count).End(xlUp).Row
    .Range("A1:M" & lastrow).Copy wks.Range("A" & wks.Rows.Count).End(xlUp)
   End With

   With Sheets("Vodnick")
    lastrow = .Range("A" & .Rows.Count).End(xlUp).Row
    .Range("A1:M" & lastrow).Copy wks.Range("A" & wks.Rows.Count).End(xlUp).Offset(1)
   End With

  With Sheets("Mello")
    lastrow = .Range("A" & .Rows.Count).End(xlUp).Row
    .Range("A1:M" & lastrow).Copy wks.Range("A" & wks.Rows.Count).End(xlUp).Offset(1)
   End With
 
   With Sheets("Goodrich")
    lastrow = .Range("A" & .Rows.Count).End(xlUp).Row
    .Range("A1:M" & lastrow).Copy wks.Range("A" & wks.Rows.Count).End(xlUp).Offset(1)
   End With
   
   With Sheets("Fasino")
    lastrow = .Range("A" & .Rows.Count).End(xlUp).Row
    .Range("A1:M" & lastrow).Copy wks.Range("A" & wks.Rows.Count).End(xlUp).Offset(1)
   End With

   With Sheets("Cooke")
    lastrow = .Range("A" & .Rows.Count).End(xlUp).Row
    .Range("A1:M" & lastrow).Copy wks.Range("A" & wks.Rows.Count).End(xlUp).Offset(1)
   End With

   With Sheets("Canavan")
    lastrow = .Range("A" & .Rows.Count).End(xlUp).Row
    .Range("A1:M" & lastrow).Copy wks.Range("A" & wks.Rows.Count).End(xlUp).Offset(1)
   End With
   
End Sub

Open in new window

Flyster

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
bobrossi56Author Commented:
Works great, thanks so much
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.