![]() |
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 |
All times are GMT +1. The time now is 05:18 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com