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: 364
Default unhide all rows without loop

one way

worksheets("Sheet1").rows("11:20000").hidden=false

--


Gary

"Saladin Andreas" wrote in
message ...
using "hide rows" instead of autofilter (which works not so well) gives a
problem if you wanna see all rows again. How can you do that without
looping
trough all possible rows (given that you don't know whether there are 100
or
30'000).

How can you find out about how many rows there are (if you have to do it
with a loop you should not loop endlessly) When hiding it is easy to leave
the loop when empty rows occur.

For hiding the rows I use this macro:

Sub Hide_completed()

Dim x As Integer

For x = 11 To 20000

If Cells(x, 4).Value = "" Then
Exit For
Else

If Cells(x, 11).Value Like "*completed*" Then
Cells(x, 11).EntireRow.Hidden = True
Else

If Cells(x, 11).Value = "" Then
Cells(x, 11).Value = "still_to_do"
End If


Cells(x, 11).EntireRow.Hidden = False
End If
End If
Next x

End Sub


 
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
Slow VBA code....Hide/Unhide Loop Tami Excel Worksheet Functions 2 August 4th 09 01:53 AM
Enabling option „Format rows“ to hide/unhide rows using VBA-code? ran58 Excel Discussion (Misc queries) 0 July 28th 09 03:46 PM
unhide all rows without loop Jim Cone[_2_] Excel Programming 0 April 17th 09 04:19 AM
unhide row does not unhide the hidden rows nikita Excel Worksheet Functions 4 May 24th 08 02:59 PM
Loop through worksheets to unhide rows Punsterr Excel Programming 4 February 21st 06 04:10 AM


All times are GMT +1. The time now is 05:41 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"