Try this code - dont you want the name of the project (sheet name) to also show up in the summary?
Option Explicit
Sub update_summary()
Dim i As Long, j As Long, lrow As Long, lastrow As Long
Application.ScreenUpdating = False
Worksheets("Summary").Cells.Delete
Worksheets("Summary").Range("A1").Value = "Overdue"
For i = 1 To Worksheets.Count
With Worksheets(i)
If .Name <> "Summary" Then
lrow = .Range("A" & .Rows.Count).End(xlUp).Row
If Worksheets("Summary").Range("A2").Value = "" Then .Rows(1).Copy Worksheets("Summary").Range("A2")
For j = 2 To lrow
If .Range("F" & j).Value < Date And .Range("G" & j).Value <> "Complete" Then _
.Rows(j).Copy Worksheets("Summary").Range("A" & Rows.Count).End(xlUp).Offset(1, 0)
Next j
End If
End With
Next i
lastrow = Worksheets("Summary").Range("A" & Rows.Count).End(xlUp).Row
Worksheets("Summary").Range("A" & lastrow + 2).Value = "Due this week"
For i = 1 To Worksheets.Count
With Worksheets(i)
If .Name <> "Summary" Then
lrow = .Range("A" & .Rows.Count).End(xlUp).Row
If Worksheets("Summary").Range("A" & lastrow + 3).Value = "" Then .Rows(1).Copy Worksheets("Summary").Range("A" & lastrow + 3)
For j = 2 To lrow
If .Range("F" & j).Value >= Date And .Range("F" & j).Value <= Date + 6 And .Range("G" & j).Value <> "Complete" Then _
.Rows(j).Copy Worksheets("Summary").Range("A" & Rows.Count).End(xlUp).Offset(1, 0)
Next j
End If
End With
Next i
MsgBox "Done"
Application.ScreenUpdating = True
End Sub
Copy the Excel VBA code
Select the workbook in which you want to store the Excel VBA code
Hold the Alt key, and press the F11 key, to open the Visual Basic Editor
Choose Insert | Module
Where the cursor is flashing, choose Edit | Paste
To run the Excel VBA code:
Choose View | Macros
Select a macro in the list, and click the Run button
Bookmarks