+ Reply to Thread
Results 1 to 9 of 9

Selecting the first empty row

Hybrid View

  1. #1
    Registered User
    Join Date
    08-12-2005
    Posts
    5

    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

  2. #2
    Norman Jones
    Guest

    Re: 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" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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. #3
    KC Cheung
    Guest

    Re: Selecting the first empty row

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

    --
    Regards
    KC Cheung
    The Inglewood

    "Norman Jones" <[email protected]> wrote in message
    news:[email protected]...
    > 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" <[email protected]> wrote in
    > message news:[email protected]...
    > >
    > > 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. #4
    Norman Jones
    Guest

    Re: 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" <[email protected]> wrote in message
    news:[email protected]...
    > use Sheets("Sheet2").Range("A65536").End(xlUp) as destination will do
    >
    > --
    > Regards
    > KC Cheung
    > The Inglewood
    >
    > "Norman Jones" <[email protected]> wrote in message
    > news:[email protected]...
    >> 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" <[email protected]> wrote in
    >> message news:[email protected]...
    >> >
    >> > 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. #5
    Registered User
    Join Date
    08-12-2005
    Posts
    5

    Awesome

    This is great!
    Thanks to both you guys!

  6. #6
    Registered User
    Join Date
    08-12-2005
    Posts
    5
    Would you know how to paste the range Transposed ?

    Thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1