Using VBA
Using VBA
If you’re comfortable with VBA, you can write a macro to consolidate the data. Here’s an
example of how you can do it:
vba
Copy code
Sub ConsolidateSheets()
Dim ws As Worksheet
Dim wsConsolidate As Worksheet
Dim lastRow As Long
Dim consolidateRow As Long
consolidateRow = 1
1. Open the first sheet, select the data, and copy it.
2. Go to the consolidated sheet, and paste the data.
3. Repeat for each sheet, pasting data below the existing data in the consolidated
sheet.
Dim ws As Worksheet
On Error GoTo 0
wsConsolidate.Name = "Consolidated"
End If
wsConsolidate.Cells.Clear
consolidateRow = 1
End If
Next ws
wsConsolidate.Columns.AutoFit
End Sub
https://chatgpt.com/
i have 15 sheets of excel and its have same type of columns heading and i want to see all data in
single sheet as consolidated data and whenever data is entering in any sheet , it should appear in
consolidated sheet