+ Reply to Thread
Results 1 to 3 of 3

Paste certain formulas as formulas and others as values to a new workbook

  1. #1
    Registered User
    Join Date
    01-02-2017
    Location
    Norway
    MS-Off Ver
    2013
    Posts
    3

    Paste certain formulas as formulas and others as values to a new workbook

    Hello,

    I'm currently working on an old project that collects data from our accounting software and exports it to a file in excel that contains formatting and formulas for budgeting.

    The problem i'm facing is that if you transfer this file from our remote desktop environment, the formulas no longer work since they are a reference to a macro that utilizes a db connection.

    What i have tried to do is make a script that copies some set ranges to paste values and others to paste the formulas into a new workbook. This have proven to be difficult if we want to add lines to the budget itself then we have to add lines to the module too.

    Another problem is since the file contains so much information, i have to set the ranges really low to be able to copy without encountering errors.

    I'm currently trying to make a two dimensional array that scans each sheet for cells containing formulas. Copying the text information is working, however i'm not able to figure out how to do a check to see if a cell contains a certain formula.

    Is there an other way to do this which is smarter?

    For reference; the formulas i want to seperate are either SUM-formulas or IF-formulas with a long string behind them.

    Sincerely

  2. #2
    Registered User
    Join Date
    01-02-2017
    Location
    Norway
    MS-Off Ver
    2013
    Posts
    3

    Re: Paste certain formulas as formulas and others as values to a new workbook

    I think i'm on to solving it using a double for searching through the sheets and a function:

    Please Login or Register  to view this content.
    However, its very slow. Any tips on how to speed it up, or another solution that would work better?

  3. #3
    Registered User
    Join Date
    01-02-2017
    Location
    Norway
    MS-Off Ver
    2013
    Posts
    3

    Re: Paste certain formulas as formulas and others as values to a new workbook

    Nevermind. This doesn't work. Apparently i'm not able to search the formula for text. Tried casting the cell to a String, however it only returns 2015 error. Any ideas on how to do this?

+ 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. How do I copy and paste formulas to new workbook
    By taylorsm in forum Excel General
    Replies: 4
    Last Post: 07-16-2016, 11:35 PM
  2. Replies: 9
    Last Post: 12-04-2015, 05:19 PM
  3. Copy Formulas and Paste into the Last Set # of Rows Only & Paste Values
    By Mr. Ice in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-23-2014, 07:48 AM
  4. [SOLVED] Changing Current Code from Paste Formulas to Paste Values
    By freybe06 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-24-2013, 12:33 PM
  5. Replies: 2
    Last Post: 07-12-2013, 02:34 AM
  6. paste formulas from closed workbook
    By omarq in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-25-2011, 01:04 PM
  7. [SOLVED] How to copy formulas to a new workbook? Paste Special is different
    By MS-Requestor in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-10-2006, 05:25 PM

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