View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
TH[_3_] TH[_3_] is offline
external usenet poster
 
Posts: 38
Default Pasting on next empty cell

Byron,

Use the End Property. Here's the description from HELP:

Returns a Range object that represents the cell at the end of the region
that contains the source range. Equivalent to pressing END+UP ARROW,
END+DOWN ARROW, END+LEFT ARROW, or END+RIGHT ARROW. Read-only.

Syntax
expression.End(Direction)
expression Required. An expression that returns a Range object.
Direction Required Long. The direction in which to move. Can be one of the
following XlDirection constants: xlToLeft, xlToRight, xlUp, or xlDown.
-------------
So, you can get to the last EMPTY cell in the current column by doing:
Cells(ActiveCell.End(xlDown).Row + 1, ActiveCell.Column).Paste
-------------
On 4/15/04 17:21, in article
, "Byron"
wrote:

How do I tell my macro to look for the next empty cell before pasting.