Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks to help from Nigel yesterday, I now have a macro which detects empty
cells in C2-C10 and hides those rows leaving other rows alone. I should like to toggle that so is there a code for "are any rows hidden" without going from row to row throughout the database? If Rows.hidden = true then Rows.unhide Else HideEmptyRows 'the macro to hide empty rows Endif Any suggestions - thanks Camlad |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
maybe this Range("C2:C10").EntireRow.Hidden = False then your code to hide empty rows Mike "camlad" wrote: Thanks to help from Nigel yesterday, I now have a macro which detects empty cells in C2-C10 and hides those rows leaving other rows alone. I should like to toggle that so is there a code for "are any rows hidden" without going from row to row throughout the database? If Rows.hidden = true then Rows.unhide Else HideEmptyRows 'the macro to hide empty rows Endif Any suggestions - thanks Camlad |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Mike - easy when you know how.
Camlad "Mike H" wrote in message ... Hi, maybe this Range("C2:C10").EntireRow.Hidden = False then your code to hide empty rows Mike "camlad" wrote: Thanks to help from Nigel yesterday, I now have a macro which detects empty cells in C2-C10 and hides those rows leaving other rows alone. I should like to toggle that so is there a code for "are any rows hidden" without going from row to row throughout the database? If Rows.hidden = true then Rows.unhide Else HideEmptyRows 'the macro to hide empty rows Endif Any suggestions - thanks Camlad |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Oh! No Mike, it is not right now I have tried it.
Sub ToggleHideUnhideRows() If Range("C2:C10").EntireRow.Hidden = False Then OpenUp Else HideBlankDates End If End Sub Open up works all the time even if they ARE open so the toggle (HideBlankDates) is never run. "If Range("C2:C10").EntireRow.Hidden = False" should be false if no rows are hidden. Thinking about it "C2:C10" is irrelevant. We want to test if ANY row in the sheet is hidden. Can you do that? Camlad "Mike H" wrote in message ... Hi, maybe this Range("C2:C10").EntireRow.Hidden = False then your code to hide empty rows Mike "camlad" wrote: Thanks to help from Nigel yesterday, I now have a macro which detects empty cells in C2-C10 and hides those rows leaving other rows alone. I should like to toggle that so is there a code for "are any rows hidden" without going from row to row throughout the database? If Rows.hidden = true then Rows.unhide Else HideEmptyRows 'the macro to hide empty rows Endif Any suggestions - thanks Camlad |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can get this without using a loop.
ActiveSheet.Rows.Count - Range("A1:A" & ActiveSheet.Rows.Count).Rows.SpecialCells(xlCellTy peVisible).Count If this post is helpful click Yes ------------- Jacob Skaria |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
opening a group but keep hidden rows hidden | Excel Discussion (Misc queries) | |||
Hidden rows columns won't stay hidden | Excel Worksheet Functions | |||
Rows hidden by Autofilter vs hidden by changing the Hidden property | Excel Programming | |||
Formula or Code to keep Hidden Rows Hidden | Excel Worksheet Functions | |||
I need my Hidden Rows to stay hidden when I print the sheet. | Excel Discussion (Misc queries) |