+ Reply to Thread
Results 1 to 3 of 3

Paste values from table on one page to table on another page

  1. #1
    Registered User
    Join Date
    10-30-2012
    Location
    Missouri, USA
    MS-Off Ver
    Excel 2010
    Posts
    3

    Paste values from table on one page to table on another page

    In excel, I have a page that has a table with some billing values entered into it. I am trying to create a macro that will copy certain values in a specific row in this table (not the entire row), then switch to another page, create a new row at the end of the table that is currently on that page, and paste these values into this new row.

    I used the "record macro" option in the developer tab to try to simulate what I want to do, as I am completely clueless in using VBA or coding for excel. When I tried the macro after I completed the recording, here is the message I got:

    "Run-time error '1004':

    PasteSpecial method of Range class failed"

    I clicked debug, and here is the code that my macro recording had created: The " Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _xlNone, SkipBlanks:=False, Transpose:=False" line was highlighted in yellow.

    Please Login or Register  to view this content.

    I have no clue what any of this code means (which is why i prefer to just record a macro instead of actually typing up the code).

    I'm using Excel 2010. Please any help is appreciated! Thanks!

    -James

  2. #2
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: Paste values from table on one page to table on another page

    My 1st guess is that there is nothing to paste.

    - Moo

  3. #3
    Registered User
    Join Date
    10-30-2012
    Location
    Missouri, USA
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Paste values from table on one page to table on another page

    The table that I am copying from on the first page has values in every cell that I copy except for the first cell. (The first cell could have a value in it, but only for certain rows, as when you put an x in that cell it highlights the entire row) The table has around 20 columns, though I am just trying to copy the first 6 columns.

    For an example of the data in the rows, I have the first column labeled media (place an "x" to highlight if this is a media job), the second row is product, third is Job #, fourth is estimate #, fifth is project title and sixth is Approved Job Estimate.

    When I record the macro, I select the first cell and drag my mouse over to the sixth cell to highlight them, select copy, select the other page, type CTRL+HOME, CTRL+RIGHT ARROW, CTRL+DOWN ARROW, TAB to make sure that I create a new row at the end of the table, then right click -> paste special, values and numbers.

    Why is saying that I don't have data selected to copy when I do?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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