Youseepooo
New Member
- Joined
- Feb 5, 2019
- Messages
- 37
hello
i have a code that works fine but id like to adjust it to add another criteria. I want to hide rows in Column "F5:F171" if they read "Inactive". It is currently hiding based on Yes/no in Column G just fine . I just want to hide based on 2 conditions.
Thanks
i have a code that works fine but id like to adjust it to add another criteria. I want to hide rows in Column "F5:F171" if they read "Inactive". It is currently hiding based on Yes/no in Column G just fine . I just want to hide based on 2 conditions.
Thanks
Code:
Sub sort_updated()
'removes No from Column G
Sheets("Log").Select
Dim xRg As Range
Application.ScreenUpdating = False
For Each xRg In Range("g5:g420")
If xRg.Value = "No" Then
xRg.EntireRow.Hidden = True
Else
xRg.EntireRow.Hidden = False
End If
Next xRg
Application.ScreenUpdating = True
End Sub