ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How select/define cells with FIND method (maybe together with SpecialCells) (https://www.excelbanter.com/excel-programming/318953-how-select-define-cells-find-method-maybe-together-specialcells.html)

Marie J-son[_5_]

How select/define cells with FIND method (maybe together with SpecialCells)
 
I have seen a snippet somewhere to fast and easy select cells and cell areas
by using Find method. Maybe it was in combination with Specialcells. Are
there any of you having a snippet of this on the shelf? Or in your head?

I need to define a PrintArea for all the pages containing cells.visible =
True and think maybe I can do this by specify the area as all cells where
xlCellTypeVisible = False

/Regards



Jason Morin

How select/define cells with FIND method (maybe together with SpecialCells)
 
Dim rng As Range
Set rng = ActiveSheet.Cells.SpecialCells _
(xlCellTypeVisible)

HTH
Jason
Atlanta, GA

-----Original Message-----
I have seen a snippet somewhere to fast and easy select

cells and cell areas
by using Find method. Maybe it was in combination with

Specialcells. Are
there any of you having a snippet of this on the shelf?

Or in your head?

I need to define a PrintArea for all the pages

containing cells.visible =
True and think maybe I can do this by specify the area

as all cells where
xlCellTypeVisible = False

/Regards


.


Tom Ogilvy

How select/define cells with FIND method (maybe together with SpecialCells)
 
Dim rng as Range
On error resume next
set rng = Activesheet.UsedRange.SpecialCells(xlVisible)
On Error goto 0

msgbox rng.Address

--
Regards,
Tom Ogilvy

"Marie J-son" wrote in message
...
I have seen a snippet somewhere to fast and easy select cells and cell

areas
by using Find method. Maybe it was in combination with Specialcells. Are
there any of you having a snippet of this on the shelf? Or in your head?

I need to define a PrintArea for all the pages containing cells.visible =
True and think maybe I can do this by specify the area as all cells where
xlCellTypeVisible = False

/Regards






All times are GMT +1. The time now is 02:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com