Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I try another angle to solve my last question, becauser of lack of answers Any suggestion how all hidden values become "100%" as soon as the rows become hidden. (... by my code "Columns("AE:AE").SpecialCells(xlCellTypeFormu las, 4).EntireRow.Hidden = True" in a routine. ) Range("P20:Y100").SpecialCells(xlCellTypeVisible). Value = "100%" would be greate to use, if I could change it to "xlCellTypeHidden" instead, but ... Any idea how to "invert" a selection, maybe? I have a larger range and one range with xlCellTypeVisible identified - how to find out the hidden cells? Any ideas? /Regards Tskogstrom |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
As you have discovered, xlCellTypeVisible are easy to select because they are
a defined special type. This is how to select or define the "invisible" cells in a range: Sub find_invisible() Dim r As Range, r_loop As Range Dim r_visible As Range Dim r_invisible As Range Set r = Selection Set r_visible = r.SpecialCells(xlCellTypeVisible) Set r_invisible = Nothing For Each r_loop In r If Intersect(r_loop, r_visible) Is Nothing Then If r_invisible Is Nothing Then Set r_invisible = r_loop Else Set r_invisible = Union(r_invisible, r_loop) End If End If Next MsgBox (r_visible.Address) If r_invisible Is Nothing Then Else MsgBox (r_invisible.Address) End If End Sub -- Gary's Student "tskogstrom" wrote: Hi, I try another angle to solve my last question, becauser of lack of answers Any suggestion how all hidden values become "100%" as soon as the rows become hidden. (... by my code "Columns("AE:AE").SpecialCells(xlCellTypeFormu las, 4).EntireRow.Hidden = True" in a routine. ) Range("P20:Y100").SpecialCells(xlCellTypeVisible). Value = "100%" would be greate to use, if I could change it to "xlCellTypeHidden" instead, but ... Any idea how to "invert" a selection, maybe? I have a larger range and one range with xlCellTypeVisible identified - how to find out the hidden cells? Any ideas? /Regards Tskogstrom |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Does specific value exist in a range | Excel Worksheet Functions | |||
range name does not exist | Excel Discussion (Misc queries) | |||
specialcells(xlLastCell) and method global range error | Excel Programming | |||
Compare a selected Range with a Named range and select cells that do not exist | Excel Programming | |||
Function to invert Range-selection | Excel Programming |