![]() |
Selecting first blank row
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 |
Selecting first blank row
Great, thanks! "Don Guillett" wrote in : range("a65536").end(xlup).select or range("a1").end(xldown).select "Audio_freak" wrote in message . 35.158... 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 |
Selecting first blank row
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 -- Regards, Tom Ogilvy Don Guillett wrote in message ... range("a65536").end(xlup).select or range("a1").end(xldown).select "Audio_freak" wrote in message . 35.158... 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 |
Selecting first blank row
Much.
-- Regards. Tom Ogilvy Audio_freak wrote in message . 35.158... "Tom Ogilvy" wrote in news:ub6yUIIdDHA.2112 @TK2MSFTNGP10.phx.gbl: 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 ! |
All times are GMT +1. The time now is 11:56 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com