+ Reply to Thread
Results 1 to 3 of 3

Consolidating from multiple workbooks - copying final data, not formulas

  1. #1
    Registered User
    Join Date
    03-07-2012
    Location
    West Des Moines, IA
    MS-Off Ver
    Excel 2007
    Posts
    18

    Consolidating from multiple workbooks - copying final data, not formulas

    I've been working on this macro to consolidate multiple workbooks, everyone on here has helped me a lot. I have one last thing (hopefully) that I can't seem to figure out.

    In the source workbooks, I'm only copying the data from 1 sheet, however, that data references a table in a separate sheet in the same source workbook. When I copy the data, the formula that looks up the data in the table is copied and just shows a "N/A". Instead, I would just like the final values as once I consolidate the data, I no longer need the connection to the table, just the data.

    This is the code I'm using
    Please Login or Register  to view this content.
    The formula I'm using in the source workbook to look up the table values is

    Please Login or Register  to view this content.
    I actually have another cell (W10) on the same source worksheet that references another table on the same (different) worksheet as the formula above. If that first formula (the one below) returns "PCPM" then the first formula above looks up a value on the second table. This first formula (below) seems to consolidate to the master workbook just fine.

    Please Login or Register  to view this content.
    Any ideas?

  2. #2
    Valued Forum Contributor AlvaroSiza's Avatar
    Join Date
    09-19-2007
    Location
    Staffordshire
    MS-Off Ver
    2007
    Posts
    591

    Re: Consolidating from multiple workbooks - copying final data, not formulas

    If I'm reading this right, you just need values in the wsMaster, correct? If so, make a copy of your workbook and test the following:

    Amend:
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    Perhaps it was the Noid who should have avoided me...
    If you are satisfied with my solution click the small star icon on the left. Thanks
    1. Make a copy of your workbook and run the following code on your copy (just in case)
    2. With excel open, press ALT+F11 to open the Visual Basic Editor (VBE). From the "Insert" menu, select "Module".
    3. Paste the code from above into the empty white space. Close the VBE.
    4. From the developer tab, choose "Macros", select the Sub Name, and click "Run".

  3. #3
    Registered User
    Join Date
    03-07-2012
    Location
    West Des Moines, IA
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Consolidating from multiple workbooks - copying final data, not formulas

    I tried your suggestion, but it gives me a syntax error and highlights that part of the code in red.

    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