View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 1,726
Default Hiding rows in a range based on TRUE/FALSE value in each row

Public Sub ProcessData()
Const TEST_COLUMN As String = "A" '<=== change to suit
Dim i As Long
Dim iLastRow As Long

Application.ScreenUpdating = False

With ActiveSheet

iLastRow = .Cells(.Rows.Count, TEST_COLUMN).End(xlUp).Row
For i = iLastRow To 2 Step -1
.Rows(i).Hidden = .Cells(i, TEST_COLUMN).Value = False
Next i

End With

Application.ScreenUpdating = True

End Sub


--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"michaelberrier" wrote in message
ups.com...
Sheet name: "Education"
Reference Range: A1:A100

I need to hide every entire row in that range if the value in that row
is FALSE. The user will have a checkbox linked to the cells in that
range, and if the box is not checked, the value will be FALSE.

In other words, if the value of A16 is FALSE, that row would be hidden,
and so forth.

I've tried to apply many solutions I've found and none seem to do
exactly that

Thanks.