Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
select cells
Hi, how can i select with a macro all cells with data below activecell?
Thanks! |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
select cells
This macro should do what you want...
Sub SelectNonEmptyCellsBelowActiveCell() Dim LastCell As Range On Error Resume Next Set LastCell = Cells(Rows.Count, ActiveCell.Column).End(xlUp) Range(ActiveCell.Offset(1), LastCell).SpecialCells( _ xlCellTypeConstants).Select End Sub -- Rick (MVP - Excel) "puiuluipui" wrote in message ... Hi, how can i select with a macro all cells with data below activecell? Thanks! |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
select cells
In any column or only the activecell's column??
-- Gary''s Student - gsnu200908 "puiuluipui" wrote: Hi, how can i select with a macro all cells with data below activecell? Thanks! |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
select cells
To select cells below the active cell with data in them:
Sub WithData() Set r = Range(ActiveCell.Offset(1, 0), Cells(Rows.Count, ActiveCell.Column)) Set r = Intersect(r, ActiveSheet.UsedRange) Set rSelect = Nothing For Each rr In r If IsEmpty(rr) Then Else If rSelect Is Nothing Then Set rSelect = rr Else Set rSelect = Union(rSelect, rr) End If End If Next rSelect.Select End Sub -- Gary''s Student - gsnu200908 "puiuluipui" wrote: Hi, how can i select with a macro all cells with data below activecell? Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Up down arrow keys do not select cells if select locked cells unch | Excel Discussion (Misc queries) | |||
Macro to select cells without a certain value and select a menu it | Excel Worksheet Functions | |||
Using formulas to select cells (Ex: Select every nth cell in a col | Excel Discussion (Misc queries) | |||
how do you "select locked cells" w/o "select unlocked cells"? | Excel Discussion (Misc queries) | |||
Why aren't my cells highlighted when I select multiple cells? | Setting up and Configuration of Excel |