You have to include the code in red color to achieve that.....
Private Sub Worksheet_Activate()
Dim ws As Worksheet
Dim rng As Range, cell As Range
Dim lr As Long, lr1 As Long
Application.ScreenUpdating = False
lr1 = Sheets("Pending").Cells(Rows.Count, 1).End(xlUp).Row + 1
Sheets("Pending").Range("A4:A" & lr1).EntireRow.Clear
For Each ws In Worksheets
If ws.Name <> "Pending" And ws.Name <> "Totals" Then
lr = ws.Cells(Rows.Count, 1).End(xlUp).Row
Set rng = ws.Range("A4:A" & lr)
For Each cell In rng
If cell.Offset(0, 13).Value = "" Then
lr1 = Sheets("Pending").Cells(Rows.Count, 1).End(xlUp).Row + 1
ws.Range("A" & cell.Row & ":R" & cell.Row).Copy Sheets("Pending").Range("A" & lr1)
End If
Next cell
End If
Next ws
Sheets("Pending").Activate
Application.ScreenUpdating = True
End Sub
Bookmarks