How to combine sheets in Excel

kamus45

New Member
Joined
Nov 17, 2017
Messages
16
Hi, I'm new in the forum and I have this question about how to combine sheets in Excel

I got a file with sheets "A1, B1, C1... J1" with data in column A and need to combine it in "Final" sheet, searching in google I find this post:

http://www.mrexcel.com/forum/excel-...e-columns-multiple-sheets-into-one-sheet.html

But don't know how to use it to get what I need.

Code:
Sheets("Final").ActivateColumns("A:A").Select
Selection.EntireRow.Delete

Dim ws As Worksheet
For Each ws In Sheets(Array("A1", "B1", "C1", "D1", "E1", "F1", "G1", "H1", "I1", "J1"))
  With ws
    .Range("A:A" & .Cells(Rows.Count, 1).End(xlUp).Row).Copy Sheets("Final").Cells(Rows.Count, "A").End(xlUp).Offset(1)
  End With
Next ws
Sheets("Final").Activate

Thanks for your help
 
Something weird, i copy the Sheets to a new file and the error stop, but only copy the data of A1 Sheets and ignores the rest, I try recording a macro and the work is done but in a very rustic mode

Code:
https://www.mediafire.com/file/tlb43139npagtaw/Macros%20-%20Columnas2.xlsm

Thanks for help me
 
Upvote 0

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
See how this one goes.

Code:
Sub CombineSheets()
  Dim lr As Long
  Dim ws As Worksheet
  
  Sheets("Final").UsedRange.Clear
  For Each ws In Sheets(Array("A1", "B1", "C1", "D1", "E1", "F1", "G1", "H1", "I1", "J1"))
    With ws
      lr = .Columns("A").Find(What:="*", After:=.Range("A1"), LookIn:=xlValues, SearchDirection:=xlPrevious, SearchFormat:=False).Row
      .Range("A1:A" & lr).Copy Destination:=Sheets("Final").Cells(Rows.Count, "A").End(xlUp).Offset(1)
    End With
  Next ws
  Sheets("Final").Activate
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,467
Messages
6,124,984
Members
449,201
Latest member
Lunzwe73

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