Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Sub CopyDataFromWorkbooks()
Dim wbk As Workbook, wks As Worksheet, rng As Range, Cell As Range
Dim wsMaster As Worksheet, lMasterRow As Long
Set wsMaster = ActiveWorkbook.ActiveSheet
For Each wbk In Workbooks
If wbk.Name <> "Master.xls" Then
For Each wks In wkb
Set rng = wbk.Range("A2:M200")
lMasterRow = wsMaster.UsedRange.Rows.Count + 1
For Each Cell In rng
With Cell
wsMaster.Cells(lMasterRow + (Cell.Row - rng.Row), .Column).Value = .Value
End With
Next
Next
End If
Next
End Sub
If wbk.Name <> wsMaster.Parent.Name Then
Sub CopyDataFromWorkbooks()
Dim wbk As Workbook, wks As Worksheet, rng As Range, Cell As Range
Dim wsMaster As Worksheet, lMasterRow As Long
Set wsMaster = ActiveWorkbook.ActiveSheet
For Each wbk In Workbooks
If wbk.Name <> wsMaster.Parent.Name Then
For Each wks In wbk.Worksheets
Set rng = wks.UsedRange
lMasterRow = wsMaster.UsedRange.Rows.Count + 1
For Each Cell In rng
With Cell
wsMaster.Activate
wsMaster.Cells(lMasterRow + (.Row - rng.Row), .Column).Value = .Value
End With
Next
Next
End If
Next
End Sub