Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
In article ,
"Chip Pearson" wrote: That has bitten me in the ass a few times. I think the design decision to default to the whole sheet is one of the dumber decisions MS has made for Excel in quite a while. Agreed - in my apps the only way I use SpecialCells on a Selection (which is admittedly very rarely) is to wrap it with the Intersect method - usually in a function, so I don't forget, e.g.: Public Function SelectionSpecialCells( _ ByVal nType As Long, _ Optional ByVal vValue As Variant = Empty) As Range Dim rTest As Range If TypeOf Selection Is Excel.Range Then With Selection If IsEmpty(vValue) Then Set rTest = Intersect(.Cells, .SpecialCells(nType)) Else Set rTest = Intersect(.Cells, .SpecialCells(nType, vValue)) End If End With End If Set SelectionSpecialCells = rTest End Function |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I change case to sentence case in groups in excel? | Excel Discussion (Misc queries) | |||
How to change mixed case to upper case in Excel for all cells | Excel Discussion (Misc queries) | |||
Excel: How do I change all upper case ss to proper case? | Excel Worksheet Functions | |||
Change the text from lower case to upper case in an Excel work boo | Excel Discussion (Misc queries) | |||
How do I change a column in Excel from upper case to lower case? | Excel Worksheet Functions |