Hi. I am looking to hide rows based on the data in cell Q. I want to hide all data greater than 99 but less than 106. Thanks for your help.
Hi. I am looking to hide rows based on the data in cell Q. I want to hide all data greater than 99 but less than 106. Thanks for your help.
Something likeshould do the job!![]()
Sub HideRowsIF() Dim ws1 As Worksheet Dim cRng As Range, oC As Range Set ws1 = Worksheets("Sheet1") Set cRng = ws1.Range(ws1.Cells(2, 17), ws1.Cells(ws1.Rows.Count, 17).End(xlUp)) For Each oC In cRng If oC.Value > 99 And oC.Value < 106 Then oC.EntireRow.Hidden = True End If Next oC End Sub
If you're happy with someone's help, click that little star at the bottom left of their post to give them Reps.
---Keep on Coding in the Free World---
FWIW.
![]()
Sub eorydc() Range("Q2:Q" & ActiveSheet.UsedRange.Rows.Count).AutoFilter 1, "<99", xlOr, ">106" End Sub
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks