You are welcome, thanks for the reps. Don't worry, we are always ready to eradicate crimes. 
Here is the code to exclude blank sheets :
Sub Test()
Dim arrData, arrSheet, i As Long, j As Long, rngHeader As Range
ReDim arrSheet(1 To Worksheets.Count, 1 To 2)
With Sheets("Data")
Set rngHeader = Intersect(.Rows("1:5"), .Columns("A:G"))
For i = 1 To Worksheets.Count
arrSheet(i, 1) = Worksheets(i).Name 'Set sheet's name
Set arrSheet(i, 2) = rngHeader 'Set header
Next i
arrData = .Range("A1:G" & .Cells(.Rows.Count, "A").End(xlUp).Row)
For i = 6 To UBound(arrData, 1)
For j = 1 To UBound(arrSheet, 1)
If arrSheet(j, 1) = arrData(i, 7) Then
Set arrSheet(j, 2) = Union(arrSheet(j, 2), Intersect(.Rows(i), Columns("A:G"))) 'For matched item, union this row with previous value
Exit For
End If
Next j
Next i
For i = 1 To UBound(arrSheet, 1)
If arrSheet(i, 2).Address <> rngHeader.Address Then
arrSheet(i, 2).Copy Worksheets(arrSheet(i, 1)).Range("A1") 'Copy to corresponding sheet
End If
Next i
End With
End Sub
Regards
Bookmarks