Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 63
Default Hiding rows in a range based on TRUE/FALSE value in each row

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.

  #2   Report Post  
Posted to microsoft.public.excel.misc
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.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert rows based on specific value bob Excel Worksheet Functions 6 February 29th 08 07:11 PM
Trying to select a specific range based on the time value of user form input Jitranijam New Users to Excel 8 November 15th 06 12:52 AM
range inside RANK formula based on contents of other cells andy62 Excel Worksheet Functions 3 September 5th 06 07:37 PM
print area selection slows excel, formula for hiding rows?? sbrimley Excel Discussion (Misc queries) 1 March 21st 06 11:26 PM
Row Sequencing Mark Excel Worksheet Functions 8 August 18th 05 06:33 PM


All times are GMT +1. The time now is 10:31 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"