Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 92
Default Invert a range? - I wish SpecialCells(xlCellTypeHIDDEN) exist ...

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Invert a range? - I wish SpecialCells(xlCellTypeHIDDEN) exist ...

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Does specific value exist in a range coloradoprof Excel Worksheet Functions 3 November 25th 06 07:00 PM
range name does not exist scory Excel Discussion (Misc queries) 1 September 12th 06 01:17 PM
specialcells(xlLastCell) and method global range error [email protected] Excel Programming 0 July 25th 06 09:51 PM
Compare a selected Range with a Named range and select cells that do not exist PCLIVE Excel Programming 1 October 18th 05 07:09 PM
Function to invert Range-selection Lore Leuneog Excel Programming 1 October 24th 04 03:39 PM


All times are GMT +1. The time now is 12:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"