Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default 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





  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default 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









  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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









  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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 !




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Index/match - make blank cells return a blank value. diaare Excel Worksheet Functions 3 May 3rd 23 03:44 AM
Can I delete blank rows from excel without selecting them? rgtest Excel Worksheet Functions 9 February 14th 09 03:12 PM
Average Formula to display blank cell if named range is blank Rachael F Excel Worksheet Functions 3 February 22nd 08 05:05 PM
Selecting non-blank cells Dave Excel Discussion (Misc queries) 3 November 2nd 06 08:51 PM
Selecting the first non blank cell in Range VBA Noob Excel Worksheet Functions 2 July 24th 06 07:39 PM


All times are GMT +1. The time now is 03:54 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"