Locating last row of data in worksheet


Posted by Garry on October 25, 1999 5:20 AM

I'm new to vb.
I have a large worksheet which at month end I copy
(values only) to another worksheet.

My problem is having the macro locate the last row
of data in the latter worksheet which increases in
size each month.
I need to have current month data copied to the
next row

Garry


Garry




Posted by Chris on October 25, 1999 9:29 AM

Garry,

If the data is contiguous, you can use something like the following to select the last cell:

Range("A1").end(xldown).select
or
activecell.end(xldown).select

It sounds like you want the first empty cell, in which case you could use:

activecell.end(xldown).offset(1,0).select

HTH,
Chris