how to combine all work sheets into one sheets in excel
VBA code
Sub CombineWorksheets() Dim ws As Worksheet Dim destWs As Worksheet Dim lastRow As Long Dim copyRange As Range ' Create a new worksheet for combined data Set destWs = ThisWorkbook.Sheets.Add(After:=ThisWorkbook.Sheets(ThisWorkbook.Sheets.Count)) destWs.Name = "Combined" ' Loop through each worksheet in the workbook For Each ws In ThisWorkbook.Worksheets If ws.Name <> destWs.Name Then lastRow = destWs.Cells(destWs.Rows.Count, 1).End(xlUp).Row + 1 Set copyRange = ws.UsedRange copyRange.Copy destWs.Cells(lastRow, 1) End If Next ws End Sub