Is there any way to modify the folloiwng code so that it will hide the empty cells with formula (as the following code does) and in additon to that it should filter data based on Cell G5 value?
Code:
Sub HideRowsMissingData()
Dim cl As Range, i As Integer
Application.ScreenUpdating = False
With Sheets("Sheet1")
For Each cl In .Range("A4:A502")
If cl.Value = "" Then
.Rows(cl.Row).Hidden = True
Else
For i = 1 To 4
If cl.Offset(, i).Value = "" Then
.Rows(cl.Row).Hidden = True
Exit For
End If
Next i
End If
Next cl
End With
Application.ScreenUpdating = True
End Sub