+ Reply to Thread
Results 1 to 3 of 3

Macro to extend a table range

  1. #1
    Registered User
    Join Date
    10-04-2011
    Location
    Windsor, England
    MS-Off Ver
    Excel 2010
    Posts
    69

    Macro to extend a table range

    Hi everyone,

    I have a table in excel which i need to add extra lines on the bottom as and when they arise from another lot of source data.

    I've written a macro that does this but the problem is that because i'm copying and pasting the data in my excel table range doesn't extend to the new rows and I don't know how to extend it.

    This is what i've got so far...

    Please Login or Register  to view this content.
    Is there anything I can add in at the end which will extend my table range?

    Hopefully that is clear, I can try and upload a sample workbook but i'll have to take out all the confidential stuff.

    Thanks,

    Alice

  2. #2
    Valued Forum Contributor
    Join Date
    06-17-2009
    Location
    Chennai,India
    MS-Off Ver
    Excel 2003,excel 2007
    Posts
    678

    Re: Macro to extend a table range

    understood onlypartially

    suppose you want to paste the copied data only from A2 of sheet tracker or after the existing data in the sheet tracker
    then this code will suffice
    worksheets("tracker").cells(rows.count,"A").end(xlup).offset(1,0).pastespecial

    try this code (instead of your secod part of the macro) in an EXPERIMENTAL FILE and get convinced it is ok and then use in your oriogial file..

    no need to "select" so many times. without selection you can copy
    I am not an expert. better solutions may be available
    [email protected]

  3. #3
    Forum Contributor
    Join Date
    04-26-2013
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    167

    Re: Macro to extend a table range

    can you upload the file?

+ 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