+ Reply to Thread
Results 1 to 3 of 3

Use array to speed up UDF calculations

  1. #1
    Registered User
    Join Date
    01-30-2013
    Location
    Norway
    MS-Off Ver
    Excel 2010
    Posts
    5

    Use array to speed up UDF calculations

    Hi

    I am quit new with working with VBA.

    I have a lot of UDF in my sreadsheet and it is working very slow.

    Therefore I am looking for a way to read inn all the input data in an array, calculate the functions
    in vba and then print the results back to another spreadsheet. I guess this would be much faster,but
    I have trouble understanding arrays....

    This is the code I have come up with so far, but it is not working at all rather than printing some text back to the spreadsheet.

    Please Login or Register  to view this content.
    Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #3 requires code tags. I have added them for you this time because you are a new member. Well, you're not new, but you only have 2 posts. --6StringJazzer




    Thanks for any help.
    Attached Files Attached Files
    Last edited by 6StringJazzer; 06-19-2015 at 09:05 PM.

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,863

    Re: Use array to speed up UDF calculations

    Try (I trued to change as little, as possible - just enough to get desired result):
    Please Login or Register  to view this content.
    suggested reading: ways to pass arguments between fynctions/subroutines, scope of variables declaration, differences between subroutines and function - for instance there is no need to have Readmembers as function - shall be sub
    Last edited by Kaper; 06-22-2015 at 05:39 AM.
    Best Regards,

    Kaper

  3. #3
    Registered User
    Join Date
    01-30-2013
    Location
    Norway
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Use array to speed up UDF calculations

    Thank you very much Kasper.

+ 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. Replies: 2
    Last Post: 06-21-2014, 03:11 PM
  2. Speed up VBA with 2.5 billion calculations
    By bubleeshaark in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-09-2013, 11:34 PM
  3. Speed Up calculations - sumproduct
    By Risels7 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-03-2013, 11:51 PM
  4. Speed up spreadsheet calculations
    By mcinnes01 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 11-23-2010, 11:20 AM
  5. Speed calculations
    By ABSTRAKTUS in forum Excel General
    Replies: 3
    Last Post: 05-21-2010, 05:46 PM

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