+ Reply to Thread
Results 1 to 3 of 3

Copy paste table into new worksheet macro

  1. #1
    Registered User
    Join Date
    07-30-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    20

    Copy paste table into new worksheet macro

    Hi everyone,

    I've recorded this macro in excel that copies data from one table into another on a different worksheet:

    Sub CopyPasteIress()
    '
    ' CopyPasteIress Macro
    '

    '
    Sheets("IRESS Stock").Select
    ActiveWindow.SmallScroll Down:=-231
    Range("A4").Select
    Range(Selection, Selection.End(xlToRight)).Select
    Range(Selection, Selection.End(xlDown)).Select
    Selection.Copy
    Sheets("IRESS Options").Select
    Range("A5").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
    End Sub


    However, the table data that I am copying will change, i.e. The number of columns will stay the same but the number of rows will fluctuate, hence, I would like the macro to be able to adjust accordingly.

    Can anybody help me modify the code accordingly?

    Thx so much in advance!
    Last edited by Mr ZN; 07-31-2013 at 02:00 AM.

  2. #2
    Registered User
    Join Date
    07-30-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Copy paste table into new worksheet macro

    Any ideas?

    I know there has to be a way to do this....

    Any help appreciated.

  3. #3
    Forum Expert Debraj Roy's Avatar
    Join Date
    09-27-2012
    Location
    New Delhi,India
    MS-Off Ver
    Excel 2013
    Posts
    1,469

    Re: Copy paste table into new worksheet macro

    Please Login or Register  to view this content.
    above 2 lines re enough to take care.. of incresing Row/Column.. if you dont left a blank row/column.. in between..
    above will work fine..
    Regards!
    =DEC2HEX(3563)

    If you like someone's answer, click the star to give them a reputation point for that answer...

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Copy and paste from one worksheet to another worksheet macro problem
    By Kerbazee in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-19-2013, 04:15 AM
  2. Macro to copy a table and paste in another table (based on certain conditions)
    By acsishere in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-22-2013, 01:14 PM
  3. Macro to copy data from one worksheet and paste to another worksheet
    By robertmiller in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-01-2013, 09:56 AM
  4. Copy, Find and paste between pivot table and worksheet
    By afgi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-20-2010, 01:47 PM
  5. A macro to cut data from one table and paste it onto another worksheet
    By dandavis1 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-22-2008, 07:45 AM

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