Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 395
Default Ideas for an alternate (faster) approach to sumproduct?

I have a colleague's workbook (XL07) that had about 15K sumproduct formulas,
each referencing a sheet of raw data that has about 80K rows (and grows by
20K rows per month, so it will only get slower).

I removed the sumproduct formulas, thinking that untimely recalculations
might be part of what slows down the overall workbook. I replaced it with
application.evaluate(sumproduct(my conditions)) then pasted the resulting
value into the target cells. This eliminates any possible recalculation of
those cells outside of the macro.

Unfortunately, running that macro is slower than molasses, so I'm looking
for a better approach. I *do* turn off calculation and screenupdating at the
top of the macro. My next step is to load the source data into two arrays and
do my comparisons there (it should save me some time), but I'm not sure it
will be as fast as I'd like. I could pre-sort the raw data so that all the
target data for each sumproduct is co-located, but I'd still have to figure
out the range of rows to feed into the sumproduct - maybe use a match
statement to figure out where to start, but how to figure out the last row to
use for that data set?

I appreciate any ideas you might have!
Thank you,
Keith
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Ideas for an alternate (faster) approach to sumproduct?

I'd do some experiments with pivottables.

In fact, I'd do some basic experiments with helper columns and plain (non-array
entered) formulas.



ker_01 wrote:

I have a colleague's workbook (XL07) that had about 15K sumproduct formulas,
each referencing a sheet of raw data that has about 80K rows (and grows by
20K rows per month, so it will only get slower).

I removed the sumproduct formulas, thinking that untimely recalculations
might be part of what slows down the overall workbook. I replaced it with
application.evaluate(sumproduct(my conditions)) then pasted the resulting
value into the target cells. This eliminates any possible recalculation of
those cells outside of the macro.

Unfortunately, running that macro is slower than molasses, so I'm looking
for a better approach. I *do* turn off calculation and screenupdating at the
top of the macro. My next step is to load the source data into two arrays and
do my comparisons there (it should save me some time), but I'm not sure it
will be as fast as I'd like. I could pre-sort the raw data so that all the
target data for each sumproduct is co-located, but I'd still have to figure
out the range of rows to feed into the sumproduct - maybe use a match
statement to figure out where to start, but how to figure out the last row to
use for that data set?

I appreciate any ideas you might have!
Thank you,
Keith


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
new approach Darrell_Sarrasin via OfficeKB.com Excel Programming 4 June 22nd 09 07:56 PM
Which is faster sum(if) as an array or sumproduct? Neophyte New Users to Excel 3 March 28th 07 03:28 PM
Which is faster? SUMPRODUCT or VLOOKUP, or another alternative? SteveC Excel Worksheet Functions 6 May 26th 06 01:57 PM
New approach davegb Excel Programming 6 December 6th 05 04:31 PM
Can faster CPU+larger/faster RAM significantly speed up recalulati jmk_li Excel Discussion (Misc queries) 2 September 28th 05 10:24 AM


All times are GMT +1. The time now is 12:42 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"