View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson[_3_] Dave Peterson[_3_] is offline
external usenet poster
 
Posts: 2,824
Default special cell selection

or

With ActiveSheet
Intersect(.Range("b:b").SpecialCells(xlCellTypeVis ible), _
.UsedRange).Select
End With

(and watch out. if there are no visible cells, then you'll get an error.)


raj wrote:

NEVERMIND. I figured it out (duh):

Application.Intersect(Range("B:B") _
.SpecialCells(xlCellTypeVisible), _
Range(ActiveSheet.UsedRange.Address)).Select

-----Original Message-----
Hello. I hope someone can help me with this please.

I would like to be able to select the visible cells in

the
used range of column "B" in a sheet.

Ideally, it would do so in a single line of VBA code.
Your example code would be most appreciated. Thanks in
advance.
.


--

Dave Peterson