![]()
Sub SUM_WBs() Dim FileNameXls As Variant, i As Integer, wb As Workbook 'ChDir = "C:\Temp\" 'Default directory FileNameXls = Application.GetOpenFilename(filefilter:="Excel Files, *.xl*", MultiSelect:=True) If Not IsArray(FileNameXls) Then Exit Sub ' User cancelled Application.ScreenUpdating = False For i = LBound(FileNameXls) To UBound(FileNameXls) Set wb = Workbooks.Open(FileNameXls(i)) wb.Sheets(1).Range("D4:S21").Copy ThisWorkbook.Sheets(1).Range("D4:S21").PasteSpecial Paste:=xlPasteValues, Operation:=xlAdd, SkipBlanks:=True, Transpose:=False Application.CutCopyMode = False wb.Close SaveChanges:=False Next i Application.ScreenUpdating = True End Sub
So here is the situation copying workbook i have it but what i want is to fill in the blank.
Exemple: workbook 1 has part numbers and workbook 2 the same and i want to sum them in workbook total. as you can see i can not only copy paste.Attachment 292807Attachment 292808Attachment 292809
Bookmarks