Excel Macro to combine data from Multiple Worksheets of a Workbook is explained in this video.

VBA code to combine data from Multiple Worksheets of an Excel Workbook
Sub Combine_WorkSheets()
Dim sRow, sCol, lRow, lCol As Long
Dim hdrs As Range
For Each Sheet In ActiveWorkbook.Worksheets
If Sheet.Name = "Master" Then
Application.DisplayAlerts = False
Worksheets("Master").Delete
Application.DisplayAlerts = True
End If
Next Sheet
Sheets.Add.Name = "Master"
Set mtr = Worksheets("Master")
Set wb = ActiveWorkbook
Set hdrs = Application.InputBox("Select the headers", Type:=8)
hdrs.Copy mtr.Range("A1")
sRow = hdrs.Row + 1
sCol = hdrs.Column
Debug.Print sRow, sCol
For Each ws In wb.Worksheets
If ws.Name (not equal to, replace with angled brackets) "Master" Then
ws.Activate
lRow = Cells(Rows.Count, sCol).End(xlUp).Row
lCol = Cells(sRow, Columns.Count).End(xlToLeft).Column
Range(Cells(sRow, sCol), Cells(lRow, lCol)).Copy _
mtr.Range("A" & mtr.Cells(Rows.Count, 1).End(xlUp).Row + 1)
End If
Next ws
Worksheets("Master").Activate
ActiveWindow.Zoom = 115
End Sub

Top 25 Microsoft Word Tips and Tricks - https://youtu.be/l25Evu4ohKg
7 Most Important Tools in Excel - https://youtu.be/Pc88LGWNO70
Download my free eBook on Excel Macros - http://eepurl.com/gpT0RD
Check these Books on Excel - https://xlncad.com/excel-resources/
Read my articles on Excel - https://xlncad.com/

If you’ve found my videos helpful or enjoyable, consider supporting me with a coffee!
buymeacoffee.com/ajayanand

Subscribe to @XLnCADMalayalam for Excel, Word, PowerPoint, Access, Python and Power BI Tutorials in Malayalam.
https://www.youtube.com/c/XLnCADMalayalam

Disclaimer: If you click on my affiliates links, I am going to receive a tiny commission. The products that I advertise are the ones I believe in.
My Running Kit for Hyderabad Marathon 2025
https://amzn.to/44IILeG
Think Like an Analyst: Books That Helped Me
https://amzn.to/3SNy6bi
Mind-Opening Reads You Can’t Miss
https://amzn.to/43tM2fu

#excelmacro #vbatutorial #combineworksheets