+ Reply to Thread
Results 1 to 3 of 3

Copy from named range down until lastrow?

  1. #1
    Forum Contributor
    Join Date
    12-08-2005
    Location
    Silicon Valley, CA USA
    MS-Off Ver
    2013 - Using 64 bit system
    Posts
    275

    Copy from named range down until lastrow?

    Hi,
    I have a named range in my worksheet. Now from that range (In col A) I like to select down until lastrow (which I have already dimmed as lastRow as object) and copy. How can I do that in code. Please help.
    thank you
    Jaz

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Response

    Try this as an example

    Sub Test()
    Dim LastRow As Object
    Set LastRow = Cells(24, 1)
    Range(Cells(Range("MyRangeName").Row, 1), Cells(LastRow.Row, 1)).Copy
    End Sub
    Martin

  3. #3
    Forum Contributor
    Join Date
    12-08-2005
    Location
    Silicon Valley, CA USA
    MS-Off Ver
    2013 - Using 64 bit system
    Posts
    275
    Thank you Mrice.
    Jaz

+ 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