View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Select range from ActiveCell do to Lastcell

Hi,

Try this with the usual caveat that it is very unlikely you need to select
the range to do what you want. The last line could simply be

MyRangeA.ClearContents


Dim MyRangeA As Range
Dim LastRowA As Long
LastRowA = Cells(Cells.Rows.Count, "A").End(xlUp).Row
Set MyRangeA = Range("A" & ActiveCell.Row & ":N" & LastRowA)
MyRangeA.Select
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Aussie Bob C" wrote:

From Leith Ross 2/7/2006

Dim EndCell As Range
Set EndCell = ActiveSheet.Cells(Rows.Count, "A").End(xlUp)
ActiveSheet.Range(ActiveCell, EndCell).ClearContents

If I change the A to an N it selects a range from ActiveCell down to last
entry in Column N.
My ActiveCell is in Column A but Column N may not have data down to the
last cell as in Column A

How do I select a range of cells from an ActiveCell in column A across to
Column N and down to last data cell 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.