Need help Copying dynamic row ranges
Find bottlenecks in your Excel workbooks
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: Need help Copying dynamic row ranges

  1. #1
    New Member
    Join Date
    Apr 2002
    Location
    Adam
    Posts
    9
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    I am currently working on a project that
    requires me to select a range of rows based on the last un used cell in one column which is linked to an access database. This data range changes dailly. When I try to do this it only allows me to select and copy either the top or bottom row of the data .Can someone help me figure this out . Thanks
    The last formula I tried is:

    Sub SELECT_ROW()
    Rows("3:3").Select
    Lastrow = Range("A65536").End(xlUp).Row
    Rows(Lastrow & ":" & Lastrow).Select
    Rows("3:3").Select
    Lastrow = Range("A65536").End(xlUp).Row
    Rows(Lastrow & ":" & Lastrow).Activate
    Selection.Copy
    End Sub

  2. #2
    MrExcel MVP Tom Urtis's Avatar
    Join Date
    Feb 2002
    Location
    San Francisco, California USA
    Posts
    11,136
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    See if something like this is what you're after, if I understand you correctly:

    Sub SelectRows()
    Range([A3], [A65536].End(xlUp)).EntireRow.Select
    End Sub

    Since you are copying the rows, you can replace the word "Select" with the word "Copy", to save a step.

    Any help?

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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

 

 
DMCA.com