LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 857
Default macro to hide all rows that have a cell value of "complete"

As an example, the following code will hide/unhide rows where the cell in
column A has "Complete"

Sub toggle_hidden_rows()
Dim c As Range
For Each c In ActiveSheet.Range("A1:A100")
If c.Value = "Complete" Then
With c.EntireRow
.Hidden = Not .Hidden
End With
End If
Next c
End Sub


--
Hope that helps.

Vergel Adriano


"Maax" wrote:

Hello all, I wonder if it is possible to create a macro that would toggle
rows from hidden to unhidden? I would like the button to hide all rows that
have a particular cell as "complete". If this requires 2 seperate buttons
that is not a problem.
I think i may need to have a range in for the row (A1 to M1 for example) as
i have some data already hidden beyond M1 (used in drop down lists).

any help would be much appreciated.

thanks


 
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
How do I get cell="complete" to move user to date cell? Anne Marie[_2_] Excel Worksheet Functions 1 August 25th 09 02:59 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
"Print titles must be contiguos and complete rows or columns?" Juan Diaz L Excel Discussion (Misc queries) 1 January 24th 08 04:47 PM
macro to hide all rows that have a cell value of "complete" Maax Excel Programming 1 March 28th 07 02:19 AM
Using Macro to hide rows that have a "0" quantity value Neil Excel Programming 4 October 27th 06 06:22 PM


All times are GMT +1. The time now is 08:10 PM.

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

About Us

"It's about Microsoft Excel"