In your actual sheet:
1) open the VBEditor (Alt-F11)
2) Insert an empty module (Insert > Module)
3) Paste in this macro code
Option Explicit
Sub CollectData()
Dim ws As Worksheet
Dim wsDest As Worksheet: Set wsDest = ThisWorkbook.Sheets("Overall sheet")
Dim LR As Long
Application.ScreenUpdating = False
wsDest.Range("A2:A" & Rows.Count).EntireRow.Clear
For Each ws In ThisWorkbook.Worksheets
If InStr(ws.Name, "Pegatron") > 0 Then
LR = ws.Range("A" & Rows.Count).End(xlUp).Row
ws.Range("D2:F" & LR & ",H2:H" & LR & ",J2:J" & LR).Copy
wsDest.Range("A" & Rows.Count).End(xlUp).Offset(1).PasteSpecial xlPasteValuesAndNumberFormats
End If
Next ws
Application.ScreenUpdating = True
End Sub
4) Open the ThisWorkbook module and paste in this code:
Private Sub Workbook_Open()
Call CollectData
End Sub
5) Open the Overall Sheet module and paste in this code:
Private Sub Worksheet_Activate()
Call CollectData
End Sub
6) Close the editor and save your workbook
Now every time you open the workbook or bring up the Overall Sheet onscreen the data will refresh from every other sheet with the word "Pegatron" in the sheet name.
Bookmarks