Hello,
You helped me solve many problems already. I found similar questions but I could not apply it to my issue.
I would appreciate any help or suggestions. I did review Macro to open each workbook and copy specific cell to master book with no luck. I pasted that code
I have 3 identically structured workbooks. Let’s say they are named A, B and C (All on my desktop). They are all .xlsx files
Each workbook is sent to me with specific ranges filled in. (see below ranges)
Each workbook has 5 identically named sheets but the information is unique.
I would like to copy the below ranges to “Master” (On my Desktop):
Workbook A Ranges: B22:G36 & B43:G51 & B58:G66 & B93:G107 & B114:G122 & B129:G137
Workbook B Ranges: B37:G40 & B52:G55 & B67:G68 & B108:G111 & B123:G126 & B138:G139
Workbook C Ranges: B41:G42 & B56:G57 & B69:G69 & B112:G113 & B127:G128 & B140:G140
I want to Paste all values (.PasteSpecial xlpasteValues)
Paste all values in workbook named “Master”. A workbook with 5 identical sheets. I assume I would run the code while "MASTER" is open
Thanks in advance for any help
You helped me solve many problems already. I found similar questions but I could not apply it to my issue.
I would appreciate any help or suggestions. I did review Macro to open each workbook and copy specific cell to master book with no luck. I pasted that code
VBA Code:
Sub CopySheet()
Application.ScreenUpdating = False
Dim FileName As Variant, wkbSource As Workbook, wkbDest As Workbook
Set wkbDest = ThisWorkbook
FileName = Application.GetOpenFilename("Excel Files (*.xls*),*.xls*", , "Select Excel Files", , True)
If Not IsArray(FileName) Then
MsgBox "No File Selected"
Exit Sub
End If
For i = LBound(FileName) To UBound(FileName)
Set wkbSource = Workbooks.Open(FileName(i))
With wkbSource
.Sheets("Source").Range("C6:AP" & .Range("C" & .Rows.Count).End(xlUp).Row).Copy
wkbDest.Sheets("MASTER").Cells(wkbDest.Sheets("MASTER").Rows.Count, "C").End(xlUp).Offset(1, 0).PasteSpecial xlPasteValues
Application.CutCopyMode = False
wkbSource.Close savechanges:=False
End With
Next i
Application.ScreenUpdating = True
End Sub
I have 3 identically structured workbooks. Let’s say they are named A, B and C (All on my desktop). They are all .xlsx files
Each workbook is sent to me with specific ranges filled in. (see below ranges)
Each workbook has 5 identically named sheets but the information is unique.
I would like to copy the below ranges to “Master” (On my Desktop):
Workbook A Ranges: B22:G36 & B43:G51 & B58:G66 & B93:G107 & B114:G122 & B129:G137
Workbook B Ranges: B37:G40 & B52:G55 & B67:G68 & B108:G111 & B123:G126 & B138:G139
Workbook C Ranges: B41:G42 & B56:G57 & B69:G69 & B112:G113 & B127:G128 & B140:G140
I want to Paste all values (.PasteSpecial xlpasteValues)
Paste all values in workbook named “Master”. A workbook with 5 identical sheets. I assume I would run the code while "MASTER" is open
Thanks in advance for any help