Selecting first blank row

  • Thread starter Thread starter Audio_freak
  • Start date Start date
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
 
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
 
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 !
 
Back
Top