+ Reply to Thread
Results 1 to 5 of 5

sumproduct and array formulas into VBA

  1. #1
    Registered User
    Join Date
    07-28-2010
    Location
    london, england
    MS-Off Ver
    Excel 2007
    Posts
    91

    sumproduct and array formulas into VBA

    Hi all,

    I have a workbook which is only 2MB in size. However it has 5000 rows of data. Since I added a number of sumproduct formulas to the sheet the processing speed has dropped to unbareable levels when making any changes to the data.

    I was wondering if anyone could help convert these formulas into a single code which I can trigger from a button?

    The formulas are:

    Sheet 1.

    Cell AA5 (and copied down to AA5005).
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Cell AB5 (and copied down to AB5005)
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Cell AC5 (and copied down to AC5005)
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Cell AD5 (and copied down to AD5005)
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Sheet 2

    Cell C5
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Cell C8
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Cell C14
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Cell C17
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Cell C27
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Cell C28
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Cell C29
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    I know this is a big ask, but am hoping that if 1 formula can be converted into vba then they all can easily enough. Where I am completely stuck is whether it can be done with the two arrays in cells C5 and C14 on sheet 2?

    Many Thanks,
    James

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: sumproduct and array formulas into VBA

    Your formula's can be much more simplified if you show the real data with your current formulas.

    Because some of your sumproduct formula's can be converted to sumif(s) and the indirect in sumproducts are another hectic's which consumes more processing time.

    So better show a sample workbook to do changes in formula


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    07-28-2010
    Location
    london, england
    MS-Off Ver
    Excel 2007
    Posts
    91

    Re: sumproduct and array formulas into VBA

    Ok I will try and produce a clean version of the workbook. The other problem I have is that this needs to run on excel2003 or combatibility mode... so speed improving formulas such as countifs can't be used. Hence why I thoguht I could convert to vba.

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: sumproduct and array formulas into VBA

    If so please attach a sample workbook based on that we will suggest the suitable method

  5. #5
    Registered User
    Join Date
    07-28-2010
    Location
    london, england
    MS-Off Ver
    Excel 2007
    Posts
    91

    Re: sumproduct and array formulas into VBA

    I've attached the full dataset, but stripped out any sensitive information and populated some cells to show the formulas working. I'm sure that a lot of my codes/formulas aren't the most efficient as I've pieced them together with help of users of this formum and information I've found elsewhere on the internet.

    Any help speeding this workbook up, would be great.

    Thanks,
    James
    Attached Files Attached Files

+ 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. sumproduct of a number array and a text array starting with 2 numbers
    By Bishonen in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-21-2013, 11:48 AM
  2. SUMPRODUCT Vs ARRAY FORMULAS, which is the best and why?
    By e4excel in forum Excel Formulas & Functions
    Replies: 26
    Last Post: 03-30-2012, 11:40 AM
  3. the use of indirect in array or sumproduct formulas
    By JoshuaSQ in forum Excel General
    Replies: 8
    Last Post: 12-18-2008, 12:09 PM
  4. Replies: 5
    Last Post: 06-14-2006, 07:10 AM
  5. [SOLVED] array formulas-sumproduct and average
    By Becky in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 01-29-2005, 10: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