Flani,
As the number of columns varies, I used rows copy and a result the code is slighly slower than If I were to copy the entire columns. Your file is too large to be uploaded on this site. Run this code, but change the name of the Master Tab (sheet) in to "Master"
Sub Exporting_Data()
Dim i As Long, LR&, ms As Worksheet
Application.ScreenUpdating = False
Application.DisplayAlerts = False
If Not Evaluate("ISREF(Master!A1)") Then
Worksheets.Add(After:=Worksheets(Worksheets.Count)).Name = "Master"
Else
Set ms = Sheets("Master")
Worksheets("Master").Range("A2:DB" & Rows.Count).ClearContents
End If
For i = 1 To Worksheets.Count
With Worksheets(i)
If .Name <> "Master" Then
LR = .Cells.Find("*", , , , xlByRows, xlPrevious).Row
For k = 2 To LR
.Rows(k).Copy
ms.Range("A" & Rows.Count).End(xlUp).Offset(1, 0).PasteSpecial (xlPasteValuesAndNumberFormats)
Next k
End If
End With
Application.CutCopyMode = False
Next i
ms.Cells.Columns.EntireColumn.AutoFit
Application.ScreenUpdating = True
Application.DisplayAlerts = 1
End Sub
Bookmarks