Skip to content

excel multiple workbook copy paste into single workbook using vba Coding

Notifications You must be signed in to change notification settings

KingLukaSamuel/excel-consolidate-using-vba

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

excel-consolidate-using-vba

excel multiple workbook copy paste into single workbook using vba Coding

below code copy paste your VBA Editor


Sub lume()
Dim fd As FileDialog
Set fd = Application.FileDialog(msoFileDialogOpen)
fd.AllowMultiSelect = True
fd.Filters.Add "Plese select Excel file only", "*.xl*", 1
fd.Show
For i = 1 To fd.SelectedItems.Count
Workbooks.Open fd.SelectedItems(i)
frow = Cells(Rows.Count, 1).End(xlUp).Row
fcol = Cells(1, Columns.Count).End(xlToLeft).Address
findname = Left(fcol, Len(fcol) - 1)
Range("a1:" & findname & frow).Copy
Rowf = ThisWorkbook.Sheets("Sheet1").Cells(Rows.Count, 1).End(xlUp).Row
ThisWorkbook.Sheets("Sheet1").Range("a" & Rowf + 1).PasteSpecial
ActiveWorkbook.Close
Next
MsgBox fd.SelectedItems.Count & " File Completed"
End Sub

About

excel multiple workbook copy paste into single workbook using vba Coding

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published