Selecting first blank row

A

Audio_freak

Hi there,

From my source file I wish to copy two rows to my target file. They should
however not be copied starting at cell A1, but for instance starting at
cell A22, if that is the first blank row.

What should I write instead of Range ("A1").Select ????

Thanks!




Rows("6:7").Select
Selection.Copy
Workbooks.Open Filename:="c:\Target file.xls"
Windows("Target file.xls").Activate
---> Range("A1").Select
ActiveSheet.Paste
 
T

Tom Ogilvy

these will select the last filled row - you want the row one below that
(unless you want to overwrite the last row of data).

range("a65536").end(xlup)(2).select
or
range("a1").end(xldown)(2).select
 
T

Tom Ogilvy

Much.

--
Regards.
Tom Ogilvy

Audio_freak said:
it was indeed the last filled row. i solved it by making a fake last row,
and insert the copied data before that row. but this is of course better.

THanks !
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top