Hi Imogen,
Here's a start:
Sub Imogen(): Dim ws As Worksheet, wu As Worksheet, S As Range, F As Range
Dim A As Single, B As Single, C As Single, D As Single, r As Long
Set ws = ActiveWorkbook.Sheets("Summary"): Set S = ws.Range("A:A")
For Each wu In ActiveWorkbook.Worksheets
If wu.Name = ws.Name Then GoTo GetNext
Set F = S.Find(wu.Name)
If Not F Is Nothing Then
r = F.row: GoSub LoadTable
Else
Set F = S.Find("TOTAL"): r = F.row
F.EntireRow.Insert
Range("A" & r) = wu.Name
GoSub LoadTable
End If
GetNext: Next
Exit Sub
LoadTable:
ws.Range("B" & r) = wu.Range("B1"): ws.Range("C" & r) = wu.Range("D5")
ws.Range("D" & r) = wu.Range("C10"): ws.Range("E" & r) = wu.Range("F14")
Return
End Sub
Directions for running the routine(s) just supplied
Copy the code to the clipboard
Press ALT + F11 to open the Visual Basic Editor.
Open a macro-enabled Workbook or save your Workbook As Macro-Enabled
Select “Module” from the Insert menu
Type "Option Explicit" then paste the code under it
And, you should be ready to go
With the cursor between Sub and End Sub press F5 (F8 to Single Step)
OR
Press ALT + Q to close the code window.
Press ALT + F8 then double click on the macro name
Bookmarks