Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / January 2007

Tip: Looking for answers? Try searching our database.

Hide rows with value "Hours"

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jswilli1@bechtel.com - 05 Jan 2007 22:08 GMT
I would like to toggle rows to hide/unhide based on the value "Hours"
in column B.  I think filtering is an issue to some blank seperator
rows and merged cell headings.  There are no merged cells involving
Column B.  Thanks.
Bob Phillips - 05 Jan 2007 22:26 GMT
Public Sub ProcessData()
Const TEST_COLUMN As String = "B"    '<=== change to suit
Dim i As Long
Dim iLastRow As Long

   With ActiveSheet

       iLastRow = .Cells(.Rows.Count, TEST_COLUMN).End(xlUp).row

       For i = 1 To iLastRow
           .Rows(i).Hidden = .Cells(i, TEST_COLUMN).Value = "Hours"
       Next i

   End With

End Sub

Signature

---
HTH

Bob

(change the xxxx to gmail if mailing direct)

>I would like to toggle rows to hide/unhide based on the value "Hours"
> in column B.  I think filtering is an issue to some blank seperator
> rows and merged cell headings.  There are no merged cells involving
> Column B.  Thanks.
jswilli1@bechtel.com - 05 Jan 2007 22:36 GMT
Thanks Bob......Work Great....John

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.