Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Selecting the first empty row


How do I select the first empty row in a worksheet?

I'd like to copy a certain range form wksheet 1 and then past that
range into the next available row in wksheet 2.

Thanks!
Weber


--
webba
------------------------------------------------------------------------
webba's Profile: http://www.excelforum.com/member.php...o&userid=26250
View this thread: http://www.excelforum.com/showthread...hreadid=395463

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Selecting the first empty row

Hi Webba,

Try something like:

Dim srcRng As Range
Dim destRng As Range

Set srcRng = Sheets("Sheet1").Range("A10:H15")

Set destRng = Sheets("Sheet2"). _
Cells(Rows.Count, "A").End(xlUp)(2)

srcRng.Copy Destination:=destRng

---
Regards,
Norman



"webba" wrote in
message ...

How do I select the first empty row in a worksheet?

I'd like to copy a certain range form wksheet 1 and then past that
range into the next available row in wksheet 2.

Thanks!
Weber


--
webba
------------------------------------------------------------------------
webba's Profile:
http://www.excelforum.com/member.php...o&userid=26250
View this thread: http://www.excelforum.com/showthread...hreadid=395463



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Selecting the first empty row

use Sheets("Sheet2").Range("A65536").End(xlUp) as destination will do

--
Regards
KC Cheung
The Inglewood

"Norman Jones" wrote in message
...
Hi Webba,

Try something like:

Dim srcRng As Range
Dim destRng As Range

Set srcRng = Sheets("Sheet1").Range("A10:H15")

Set destRng = Sheets("Sheet2"). _
Cells(Rows.Count, "A").End(xlUp)(2)

srcRng.Copy Destination:=destRng

---
Regards,
Norman



"webba" wrote in
message ...

How do I select the first empty row in a worksheet?

I'd like to copy a certain range form wksheet 1 and then past that
range into the next available row in wksheet 2.

Thanks!
Weber


--
webba
------------------------------------------------------------------------
webba's Profile:
http://www.excelforum.com/member.php...o&userid=26250
View this thread:

http://www.excelforum.com/showthread...hreadid=395463





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Selecting the first empty row

Hi KC,

use Sheets("Sheet2").Range("A65536").End(xlUp) as destination will do


Two points:

(1) Your suggestion returns the last populated cell in column A and would
result in some of the OP's data being overwritten.

(2) Suggesting the hardcoded 'Range("A65536").' rather than:

Cells(Rows.Count, "A").


does not strike me as an improvement. However, unless and untlil MS increase
worksheet specifications, it is equivalent.


---
Regards,
Norman



"KC Cheung" wrote in message
...
use Sheets("Sheet2").Range("A65536").End(xlUp) as destination will do

--
Regards
KC Cheung
The Inglewood

"Norman Jones" wrote in message
...
Hi Webba,

Try something like:

Dim srcRng As Range
Dim destRng As Range

Set srcRng = Sheets("Sheet1").Range("A10:H15")

Set destRng = Sheets("Sheet2"). _
Cells(Rows.Count, "A").End(xlUp)(2)

srcRng.Copy Destination:=destRng

---
Regards,
Norman



"webba" wrote in
message ...

How do I select the first empty row in a worksheet?

I'd like to copy a certain range form wksheet 1 and then past that
range into the next available row in wksheet 2.

Thanks!
Weber


--
webba
------------------------------------------------------------------------
webba's Profile:
http://www.excelforum.com/member.php...o&userid=26250
View this thread:

http://www.excelforum.com/showthread...hreadid=395463







  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Selecting the first empty row


This is great!
Thanks to both you guys!


--
webba
------------------------------------------------------------------------
webba's Profile: http://www.excelforum.com/member.php...o&userid=26250
View this thread: http://www.excelforum.com/showthread...hreadid=395463



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Selecting the first empty row


Would you know how to paste the range Transposed ?

Thanks

--
webb
-----------------------------------------------------------------------
webba's Profile: http://www.excelforum.com/member.php...fo&userid=2625
View this thread: http://www.excelforum.com/showthread.php?threadid=39546

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
Selecting occupied cell over empty ones Rich Excel Discussion (Misc queries) 0 March 28th 07 02:53 AM
Selecting occupied cell over empty ones Rich Excel Discussion (Misc queries) 0 March 28th 07 12:05 AM
selecting next empty cell ASU Excel Discussion (Misc queries) 9 September 18th 06 02:36 PM
Automatically selecting the next empty row Alec H Excel Discussion (Misc queries) 2 March 1st 06 09:21 AM
selecting a non-empty range of cells Mourinho Excel Programming 3 October 22nd 04 03:44 PM


All times are GMT +1. The time now is 10:27 AM.

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

About Us

"It's about Microsoft Excel"