Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
chris
 
Posts: n/a
Default Optimize SumProduct

Hi,

I have a sheet with many sumproducts and it takes forever to
recalculate.

Here is the basic idea, I want to calculate the number of KGS and
Dollars for each company in my list. There are dozens of companies and
the bank of sales they are looking at has 5000 rows.

both of the calculations are essentially the same except for the final
column to sum, is there a way to check the conditions I have once, then
use that calculation for both the final sums?

here is an example of the formula for KGS:
=SUMPRODUCT(('Total Pole Sales'!$C$2:$C$5412=$A$1)*('Total Pole
Sales'!$J$2:$J$5412=2004)*('Total Pole Sales'!$E$2:$E$5412='Summary
Table'!C2)*('Total Pole Sales'!G$2:G$5412))

FOR REV: =SUMPRODUCT(('Total Pole Sales'!$C$2:$C$5412=$A$1)*('Total
Pole Sales'!$J$2:$J$5412=2004)*('Total Pole
Sales'!$E$2:$E$5412='Summary Table'!C2)*('Total Pole
Sales'!H$2:H$5412))

As you can see, they are the same except for the final argument.
Any suggestions?

thanks!

  #2   Report Post  
Frank Kabel
 
Posts: n/a
Default

Hi
the following would be slightly faster:
=SUMPRODUCT(--('Total Pole Sales'!$C$2:$C$5412=$A$1),--('Total Pole
Sales'!$J$2:$J$5412=2004),--('Total Pole Sales'!$E$2:$E$5412='Summary
Table'!C2),--('Total Pole Sales'!G$2:G$5412))

But in your case I would consider using a pivot table instead:
http://www.cpearson.com/excel/pivots.htm
http://peltiertech.com/Excel/Pivots/pivotstart.htm
http://www.contextures.com/xlPivot02.html
http://www.ozgrid.com/Excel/excel-pivot-tables.htm
http://www.techonthenet.com/excel/pivottbls/index.htm
http://www.dicks-blog.com/archives/2...simple-pivot-t
able/trackback/

--
Regards
Frank Kabel
Frankfurt, Germany

"chris" schrieb im Newsbeitrag
...
Hi,

I have a sheet with many sumproducts and it takes forever to
recalculate.

Here is the basic idea, I want to calculate the number of KGS and
Dollars for each company in my list. There are dozens of companies

and
the bank of sales they are looking at has 5000 rows.

both of the calculations are essentially the same except for the

final
column to sum, is there a way to check the conditions I have once,

then
use that calculation for both the final sums?

here is an example of the formula for KGS:
=SUMPRODUCT(('Total Pole Sales'!$C$2:$C$5412=$A$1)*('Total Pole
Sales'!$J$2:$J$5412=2004)*('Total Pole Sales'!$E$2:$E$5412='Summary
Table'!C2)*('Total Pole Sales'!G$2:G$5412))

FOR REV: =SUMPRODUCT(('Total Pole Sales'!$C$2:$C$5412=$A$1)*('Total
Pole Sales'!$J$2:$J$5412=2004)*('Total Pole
Sales'!$E$2:$E$5412='Summary Table'!C2)*('Total Pole
Sales'!H$2:H$5412))

As you can see, they are the same except for the final argument.
Any suggestions?

thanks!


  #3   Report Post  
Tushar Mehta
 
Posts: n/a
Default

In addition to Frank's suggestion about a PivotTable, you might also
want to look at
Create a data subset for further analysis
http://www.tushar-mehta.com/excel/ti...ted_subset.pdf

It is a draft of one segment of a much longer document. I expedited
its creation in response to your post. This segment deals with the
creation and use of parameterized queries.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article ,
says...
Hi,

I have a sheet with many sumproducts and it takes forever to
recalculate.

Here is the basic idea, I want to calculate the number of KGS and
Dollars for each company in my list. There are dozens of companies and
the bank of sales they are looking at has 5000 rows.

both of the calculations are essentially the same except for the final
column to sum, is there a way to check the conditions I have once, then
use that calculation for both the final sums?

here is an example of the formula for KGS:
=SUMPRODUCT(('Total Pole Sales'!$C$2:$C$5412=$A$1)*('Total Pole
Sales'!$J$2:$J$5412=2004)*('Total Pole Sales'!$E$2:$E$5412='Summary
Table'!C2)*('Total Pole Sales'!G$2:G$5412))

FOR REV: =SUMPRODUCT(('Total Pole Sales'!$C$2:$C$5412=$A$1)*('Total
Pole Sales'!$J$2:$J$5412=2004)*('Total Pole
Sales'!$E$2:$E$5412='Summary Table'!C2)*('Total Pole
Sales'!H$2:H$5412))

As you can see, they are the same except for the final argument.
Any suggestions?

thanks!


  #4   Report Post  
David
 
Posts: n/a
Default

Chris,
I had a similar problem - Large database, many SP formulas, took over 30
minutes to recalculate. I'm now uising SUMIF with concatination The same
workbook recalculates in less than 5 minutes. Here's how:

For example, your original database has fields: A, B, code, quantity
Add a helper concatinated field AB (=RC[-2]&RC[-1]).
Apply a range name to each column field (use the field headers as names)
Now you're ready..
How many blues were sold in 2004? ... =SUMIF(AB,"=2004")
You might only want to sum items having code 2. You can sort the data so
that the code 2s appear at the top of the list, then re-set the range names
so that only the code 2s are included, then recalculate. Using a mix of these
techniques you can process your large databases in a fraction of the time
taken by SUMPRODUCT methods

A B AB code Quantity
Blue 2004 Blue2004 1 530,123
Red 2003 Red2003 1 23,456
Blue 2004 Blue2004 2 12,894

HTH

"chris" wrote:

Hi,

I have a sheet with many sumproducts and it takes forever to
recalculate.


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
Sumproduct ... Empty Cells vs Spaces? Ken Excel Discussion (Misc queries) 9 December 17th 04 08:03 PM
Optimize SumProduct Christopher Kennedy Excel Discussion (Misc queries) 9 December 10th 04 04:47 PM
Sumproduct function not working Scott Summerlin Excel Worksheet Functions 12 December 4th 04 05:15 AM
adding two sumproduct formulas together ski2004_2005 Excel Worksheet Functions 1 November 12th 04 09:08 PM
Sumproduct in Excel Spreadsheet to read Access db table Jules Excel Worksheet Functions 1 November 9th 04 02:50 PM


All times are GMT +1. The time now is 05:28 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"