![]() |
|
#11
|
|||
|
|||
|
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
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Sum based on multiple criteria (one of the criteria is not unique) until a threshold is reached.
|
phillipsdp | Excel | 1 | 11-09-2016 12:53 AM |
Filter Mail Merge based on a list of filter criteria
|
AusSteelMan | Mail Merge | 2 | 05-09-2016 03:35 PM |
| Auto fill drops down using VBA code based on selection | AgilityJS | Word VBA | 5 | 11-03-2015 07:50 PM |
| Forgotten Sort and Filter Criteria | rbdmg | Mail Merge | 0 | 10-31-2011 09:14 PM |
| Modify vba code to print based on name in the InputBox | OTPM | Project | 0 | 05-25-2011 02:03 AM |