Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
i hate to ask this, because i'm sure it's come up a
million times before, but i've searched high and low and couldn't find anything: how do you select all of the populated cells of a worksheet? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim rng1 as Range, rng2 as Range, rng3 as Range
On Error resume next set rng1 = Activesheet.Cells.SpecialCells(xlconstants) set rng2 = Activesheet.Cells.SpecialCells(xlFormulas) On Error goto 0 if not rng1 is nothing and not rng2 is nothing then set rng3 = Union(rng1,rng2) elseif not rng1 is nothing then set rng3 = rng1 elseif not rng2 is nothing then set rng3 = rng2 End if if not rng3 is nothing then rng3.Select End if -- Regards, Tom Ogilvy "Kevin" wrote in message ... i hate to ask this, because i'm sure it's come up a million times before, but i've searched high and low and couldn't find anything: how do you select all of the populated cells of a worksheet? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Up down arrow keys do not select cells if select locked cells unch | Excel Discussion (Misc queries) | |||
Cells to be populated from an workbook to another. | Excel Discussion (Misc queries) | |||
how do populate empty cells with the contents of populated cells . | Excel Discussion (Misc queries) | |||
Populated cells | Excel Programming | |||
how to find out when a ListBox is populated or select it | Excel Programming |