No video

Macro to combine data from Multiple Excel Worksheets

  Рет қаралды 7,613

Ajay Anand

Ajay Anand

Күн бұрын

Excel Macro to combine data from Multiple Worksheets of a Workbook is explained in this video.
🍐Join my online course on Excel Tables
www.udemy.com/...
🍓Download my free eBook on Excel Macros
eepurl.com/gpT0RD
🍇Check these Books on Excel
xlncad.com/exc...
🍉Read my articles on Excel
xlncad.com/
🍏Playlist for Shorts on Excel
• Short videos on Excel ...
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
#excelmacro #vbatutorial #combineworksheets

Пікірлер: 5
@serdargn3873
@serdargn3873 Ай бұрын
Hello. Respect man.
@MohAboAbdo
@MohAboAbdo 6 ай бұрын
Thank you so much
@cadphilpo1564
@cadphilpo1564 5 ай бұрын
thanks, you are a hero. If you could please share a macro code where you want to copy the autosum from a Column to a different worksheet
@laisonkc
@laisonkc 11 ай бұрын
Can you share the VBA code mentioned in the video, I am unable to copy the same from the description box. Thank you very much for the efforts to create the code. This video will help me more , presently I am doing as mannual mode.
@Arun.123.
@Arun.123. 10 ай бұрын
How to connect 2sheets in excel with if conditional format like if sheet1B118=20-10-2023,Sheet2C118=Sheet1B17.kindly reply.
Challenge matching picture with Alfredo Larin family! 😁
00:21
BigSchool
Рет қаралды 43 МЛН
Кадр сыртындағы қызықтар | Келінжан
00:16
How to Combine Multiple Excel Files using VBA
19:06
Excel Macro Mastery
Рет қаралды 33 М.
VBA code to consolidate data from multiple sheets to one Excel sheet (Only 8 Line code)
5:55
VBA Automation tutorial point
Рет қаралды 3,2 М.
AWESOME Excel trick to combine data from multiple sheets
7:27
Chandoo
Рет қаралды 1,1 МЛН
Make Pivot Table from Multiple Sheets in Excel
12:35
Kevin Stratvert
Рет қаралды 293 М.
Paste Data into Filtered Columns in Excel (Clever Tricks)
10:02
TrumpExcel
Рет қаралды 33 М.
Combine Files from a Folder with Power Query the RIGHT WAY!
10:18
MyOnlineTrainingHub
Рет қаралды 148 М.
Say Goodbye to IF Statements in Excel with SWITCH
7:45
Teacher's Tech
Рет қаралды 498 М.
Excel - Merge Data from Multiple Sheets Based on Key Column
9:05
Learn Google Sheets & Excel Spreadsheets
Рет қаралды 582 М.