+ Reply to Thread
Results 1 to 2 of 2

macro

  1. #1
    antonov
    Guest

    macro

    hello, I would like to know if it is possible to create a macro to select
    the LAST WRITTEN row of a worksheet and then paste it at the end of another
    sheet
    thanks for any help



  2. #2
    Ardus Petus
    Guest

    Re: macro

    Sub MoveIt()
    Dim srcRng As Range
    Dim destRng As Range
    Set srcRng = Worksheets("Sheet1").Cells(Rows.Count, "A").End(xlUp).EntireRow
    Set destRng = Worksheets("Sheet2").Cells(Rows.Count,
    "A").End(xlUp).Offset(1, 0)
    srcRng.Copy destRng
    End Sub

    Warning: fails if column A in either Sheet1 or Sheet2 is empty

    HTH
    --
    AP

    "antonov" <[email protected]> a écrit dans le message de
    news:[email protected]...
    > hello, I would like to know if it is possible to create a macro to select
    > the LAST WRITTEN row of a worksheet and then paste it at the end of

    another
    > sheet
    > thanks for any help
    >
    >
    >




+ 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