Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default unhide all rows without loop

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default unhide all rows without loop

thanks but this doesn't work - runtime error
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default unhide all rows without loop

thanks, this works great and is also fast
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
Slow VBA code....Hide/Unhide Loop Tami Excel Worksheet Functions 2 August 4th 09 01:53 AM
unhide all rows without loop Jim Cone[_2_] Excel Programming 0 April 17th 09 04:19 AM
unhide all rows without loop Gary Keramidas[_2_] Excel Programming 0 April 17th 09 04:18 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 11:58 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"