Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Slow VBA code....Hide/Unhide Loop | Excel Worksheet Functions | |||
Enabling option „Format rows“ to hide/unhide rows using VBA-code? | Excel Discussion (Misc queries) | |||
unhide all rows without loop | Excel Programming | |||
unhide row does not unhide the hidden rows | Excel Worksheet Functions | |||
Loop through worksheets to unhide rows | Excel Programming |