Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks, Peter. I had read some reference material about 'entire row', but
obviously didn't understand its use with 'range' and rows. Again, thanks!! "Peter T" wrote: Range("98:103,116:121,180:185").EntireRow.Hidden = True Regards, Peter T "Paige" wrote in message ... Can someone help me with how to designate multiple sets of rows to hide? I have the following code, but it errors out with 'Invalid use of property' or 'Unable to set the hidden property'; there is no protection set. I've used the following variations and nothing works; I'm trying to get away from using separate lines to designate rows 98:103, rows 116:121, and rows 180:185, and instead group them together: Thanks for any help! Variation #1: If Target.Address = "$C$16" Or Target.Address = "$C$14" Then If Range("$C$16") = "x" Then If Range("$C$14") = 12 Then Rows("21:92").Hidden = False Range("98:103,116:121,180:185").Hidden End If End If End If Variation #2: If Target.Address = "$C$16" Or Target.Address = "$C$14" Then If Range("$C$16") = "x" Then If Range("$C$14") = 12 Then Rows("21:92").Hidden = False Range("98:103,116:121,180:185").Hidden = True End If End If End If Variation #3: If Target.Address = "$C$16" Or Target.Address = "$C$14" Then If Range("$C$16") = "x" Then If Range("$C$14") = 12 Then Range("21:92").Hidden Range("98:103,116:121,180:185").Hidden End If End If End If Variation #4: If Target.Address = "$C$16" Or Target.Address = "$C$14" Then If Range("$C$16") = "x" Then If Range("$C$14") = 12 Then Range("21:92").Hidden = False Range("98:103,116:121,180:185").Hidden = True End If End If End If |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I hide multiple rows under one row IN EXCEL? | Excel Worksheet Functions | |||
Macro code to hide rows and not calculate hidden rows | Excel Discussion (Misc queries) | |||
Enabling option „Format rows“ to hide/unhide rows using VBA-code? | Excel Discussion (Misc queries) | |||
Hide Rows - copy and paste only rows that show | Excel Worksheet Functions | |||
Macro to hide multiple rows | Excel Programming |