+ Reply to Thread
Results 1 to 7 of 7

What's faster? Formula's linked to external sheets or copy/paste via VBA?

  1. #1
    Registered User
    Join Date
    12-23-2010
    Location
    usa
    MS-Off Ver
    Excel 2010
    Posts
    66

    What's faster? Formula's linked to external sheets or copy/paste via VBA?

    Hello,

    Conceptually, I want to have a workbook that pulls data from another workbook. What is the fastest way to pull data from that workbook to this workbook on a regular basis (say every minute)?

    1) Just having a VBA code update the formulas every minute? The formulas themselves will be linked to data in another closed workbook.
    2) Using a VBA code that opens in the other worksheet in the background, copies the data to clipboard, pastes it into the current workbook, and then closes that workbook?
    3) Is there an even faster way?

    The goal is so that the workbook have minimal calculation time, so the user can still do stuff in it and data updates just occur in the background every minute.

    Thanks!

  2. #2
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: What's faster? Formula's linked to external sheets or copy/paste via VBA?

    Formulas are definitely faster than copy/paste, but if you are measuring efficiency, then you need to evaluate what the effects of obtaining data via formula v. VBA is. The formula is going to give you the current value from the other workbook and that is all that can be in that dependent cell. Anything else in that cell and the data is then corrupt or lost. With VBA the data only goes into the cell based on the conditions laid out in the code and the value in the cell is dependent on the code or manual input as the user determines. If speed is the only criteria, the formulas would be hard to beat.
    Any code provided by me should be tested on a copy or a mock up of your original data before applying it to the original. Some events in VBA cannot be reversed with the undo facility in Excel. If your original post is satisfied, please mark the thread as "Solved". To upload a file, see the banner at top of this page.
    Just when I think I am smart, I learn something new!

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: What's faster? Formula's linked to external sheets or copy/paste via VBA?

    Something else to consider is that not all formulas work on closed workbooks.

    In the past, I have worked with huge data sets that took minutes (ages) to calce. So I set up the larger files with manual calcs, then used summary files that simply referenced answers or criteria-related values from the larger file/s. The larger files were only opened to update data, then closed (which calc'd the file). The summary/management files were the only 1's used by management, they were small and nimble, but I used no VBA in any of them.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: What's faster? Formula's linked to external sheets or copy/paste via VBA?

    If the other workbook is closed, how are its values updating?
    Rory

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: What's faster? Formula's linked to external sheets or copy/paste via VBA?

    Rory, if it's anything like what I have previously dealt with, the data file gets updated with new data, then closed. The summary file is then (probably) opened, and updated with the new data?

  6. #6
    Registered User
    Join Date
    09-09-2013
    Location
    Kennesaw, GA, USA
    MS-Off Ver
    Excel 2013
    Posts
    42

    Re: What's faster? Formula's linked to external sheets or copy/paste via VBA?

    Are there more efficient formulas to minimize calc time? I had been using a sumif formula to update a table from a list that I kept adding to and it would freeze up for 5 minutes before the results would come through. Someone here recommended using a pivot table and even though I was adding a step to move the list into a pivot table, the getdata formula populated my preexisting table almost immediately. It was a big efficiency save.

    Day to day I have a large file of unit sales plans with information per model per month covering 2 years of history and projecting out 3 years. Those sales plans are automated to react to changing production plans and then the resulting sales plan is linked to anther spreadsheet where the units and $s are multiplied to create my financial forecast.

    I have tried direct links, and indirect links. but so far if I have the three linked spreadsheets open (the third for the balance sheet data) I am constantly watching the calculation %s climb slowly with my hands tied. I have an i9 computer and it doesn't seem to help. are there known highly efficient formulas I should be looking to adopt?

  7. #7
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: What's faster? Formula's linked to external sheets or copy/paste via VBA?

    Hi grasstoe,

    Administrative Note:

    We are happy to help; however, while you feel your request is similar to this thread, we still request you create your own thread..

    Please start a new thread - See Forum rule #4

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread
    HTH
    Regards, Jeff

+ 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. Need faster way to copy and paste row from one sheet to another
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-03-2016, 04:55 PM
  2. Faster Way to Copy and Paste Values
    By mpjennings25 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-08-2013, 11:10 AM
  3. [SOLVED] How do I copy and paste a linked formula?
    By mrssteelerhall in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-15-2013, 11:17 AM
  4. How can I make this copy paste function faster???
    By just_helping in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-02-2012, 11:49 AM
  5. make faster copy paste or formula to assist in copy
    By gill389 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-15-2010, 02:07 AM
  6. quick way to copy-paste a formula linked to cells in another file
    By iniakupake in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-25-2005, 10:56 PM
  7. Copy and Paste Formula Without the linked file path
    By KevinB in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-24-2005, 07:06 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