Select range from ActiveCell do to Lastcell in ColumnA

  • Thread starter Thread starter Aussie Bob C
  • Start date Start date
A

Aussie Bob C

Range("A10:M" & Range("A10000").End(xlUp).Row.Cut
will cut a range from Cell A10 across to Column M and down to last cell in
Column A
How do you replace reference to Cell A10 with ActiveCell in Column A?

--
Thank you

Aussie Bob C
Little cost to carry knowledge with you.
Win XP P3 Office 2007 on Mini Mac using VMware.
 
Dim lRow as long
Dim myRange as Excel.range
Dim aWS as excel.worksheet

set aWS = activesheet
Set myRange = aws.Range("A10")
lRow = aws.cells(aws.rows.count,myrange.row).end(xlup).row
set myrange = myrange.resize(lrow-myrange.row + 1,13)
debug.print myrange.address
 
My mention of cell A10 was an example used in the code.
The ActiveCell could be any Column A cell the user selects.
The range selected from ActiveCell down to last cell containing data in
Column A and include cells straight across to Column M.
Column M may be shorter than A but never longer.
My problem is coding a substitute an ActiveCell for A10 in codecode.
--
Thank you

Aussie Bob C
Little cost to carry knowledge with you.
Win XP P3 Office 2007 on Mini Mac using VMware.
 
Range(ActiveCell, "M" & Cells(Rows.Count, "A").End(xlUp).Row).Cut

OR if the active cell is not in ColA

Range("A" & ActiveCell.Row & ":M" & Cells(Rows.Count, "A").End(xlUp).Row).Cut
 
Back
Top