How to consolidate data in excel from multiple worksheets using VBA

preview_player
Показать описание
how to consolidate data in excel from multiple worksheets using VBA?
In this video, you will learn how to consolidate data in excel from multiple worksheets using VBA.

Sub CombineData()
Dim iRow As Integer
Dim lRow As Integer
Dim sh_Count As Integer

For sh_Count = 2 To Sheets.Count
iRow = Sheet1.Cells(Rows.Count, "A").End(xlUp).Row + 1

'i am using this CurrentRegion.Offset(1, 0) for ignore headers
Sheets(sh_Count).Range("A1").CurrentRegion.Offset(1, 0).Copy
Sheet1.Range("A" & iRow).PasteSpecial xlPasteValues

Application.CutCopyMode = False

Next sh_Count
MsgBox "Master sheet has been updated", vbInformation
End Sub

Website name
AVIT Guru

Website URL

Registration Form

Course URL
Advanced Excel & MIS

VBA MAcro Automation

MS Access Database
Рекомендации по теме