> Or should I just stop being lazy and write a few lines of code?
Yes! That's exactly what you should do.
By the way, one thing which is key to your task, which you will never
get Excel to record in a macro, is ηος to "instruct" it to go down to
the end of existing data, and τηεν one more cell down (effectively, the
first empty one down) - that's because Excel records absolute cell
references rather than actions that got you there. So, assuming your
current active cell is A1, and you want to go the first empty cell in
Column A, you need this line of code:
ActiveCell.End(xlDown).Offset(1, 0).Select
Yet, this will get you into trouble if your active cell is the last
occupied one down, because it will try to go to the last row in the
sheet and then one more down, so it will err. To avoid this, you need
something like:
If IsEmpty(ActiveCell.Offset(1, 0)) Then
ActiveCell.Offset(1, 0).Select
Else
ActiveCell.End(xlDown).Offset(1, 0).Select
End If
You should be able to record most of the rest.
HTH,
Nikos
davegb - 13 Oct 2006 15:22 GMT
> > Or should I just stop being lazy and write a few lines of code?
>
[quoted text clipped - 25 lines]
> HTH,
> Nikos
Thanks for your reply, Nikos. I already knew that how to write the
code. Actually, XL can record relative or absolute addresses, but it
neither will get the data to paste immediately below the existing data.
Was just wondering if there was a simpler way.