+ Reply to Thread
Results 1 to 4 of 4

Copy Paste Dynamic Range Unknown Number of Columns And Rows

  1. #1
    Forum Contributor
    Join Date
    01-07-2004
    Posts
    314

    Copy Paste Dynamic Range Unknown Number of Columns And Rows

    Hi all,

    Using Excel 2007.
    How do I specify range to copy when the range is dynamic in both column and row?
    My start point is always $A$1.
    But my columns and rows will vary with any .csv file I am working with.
    In my current test file there are 91 columns
    Please Login or Register  to view this content.
    And 25,319 rows
    Please Login or Register  to view this content.
    Also, is there a fater approach to determining the last column at run-time, appears to be a little slow.

    thx
    w
    Kind regards,
    w

    http://dataprose.org

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

    Re: Copy Paste Dynamic Range Unknown Number of Columns And Rows

    Try

    Please Login or Register  to view this content.
    Martin

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Copy Paste Dynamic Range Unknown Number of Columns And Rows

    Take a look at CurrentRegion in the VBA help
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  4. #4
    Forum Contributor
    Join Date
    01-07-2004
    Posts
    314

    Re: Copy Paste Dynamic Range Unknown Number of Columns And Rows

    Thanks,

    mrice,
    Presently no header row in the .csv/.txt file so I do not know if I can rely on perfect data in row 1

    RoyUK,

    Thanks for the pointer, here is what I came up with
    Not tested yet
    Please Login or Register  to view this content.

+ 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