Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
TMK TMK is offline
external usenet poster
 
Posts: 2
Default Array or SumProduct or other?

This is my issue:

Excel 2007:
Formula in question:
=SUMPRODUCT((Unique!$E:$E=C$2)*(Unique!$E:$E<D$2) *(Unique!$J:$J=$A3)*(Unique!$G:$G="Closed"))

or

{=SUM((Unique!$E:$E=C$2)*(Unique!$E:$E<D$2)*(Uniq ue!$J:$J=$A3)*(Unique!$G:$G="Closed"))}

Scenario: I have somewhere around 100 similar formulas traversing about 60K
unique values. When I hit calculate my AMD 64 x2 Processor hits 100% on both
processors making the machine virtually unusable until the calculation
completes. Is there a more efficient way to get at my data? Is there a more
efficient formula that I could/should be using?

Please let me know if you need more specifics about the data, but it's
really a basic count of instances of entries with conditions to be satisfied
in order to be counted.

TIA

Cheers!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Array or SumProduct or other?

Do you need to reference the entire columns? In Excel 2007 that's 1,048,576
cells per referenced range * 4 referenced ranges per formula * 100
formulas.

So, your formulas are processing 419,430,400 cells.

Use the smallest range that you can get away with.

See this for efficiency tips:

http://www.decisionmodels.com/

--
Biff
Microsoft Excel MVP


"TMK" wrote in message
...
This is my issue:

Excel 2007:
Formula in question:
=SUMPRODUCT((Unique!$E:$E=C$2)*(Unique!$E:$E<D$2) *(Unique!$J:$J=$A3)*(Unique!$G:$G="Closed"))

or

{=SUM((Unique!$E:$E=C$2)*(Unique!$E:$E<D$2)*(Uniq ue!$J:$J=$A3)*(Unique!$G:$G="Closed"))}

Scenario: I have somewhere around 100 similar formulas traversing about
60K
unique values. When I hit calculate my AMD 64 x2 Processor hits 100% on
both
processors making the machine virtually unusable until the calculation
completes. Is there a more efficient way to get at my data? Is there a
more
efficient formula that I could/should be using?

Please let me know if you need more specifics about the data, but it's
really a basic count of instances of entries with conditions to be
satisfied
in order to be counted.

TIA

Cheers!



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,231
Default Array or SumProduct or other?

TMK wrote...
This is my issue:

Excel 2007:
Formula in question:
=SUMPRODUCT((Unique!$E:$E=C$2)*(Unique!$E:$E<D$2 )
*(Unique!$J:$J=$A3)*(Unique!$G:$G="Closed"))

or

{=SUM((Unique!$E:$E=C$2)*(Unique!$E:$E<D$2)
*(Unique!$J:$J=$A3)*(Unique!$G:$G="Closed"))}

Scenario: I have somewhere around 100 similar formulas traversing
about 60K unique values. When I hit calculate my AMD 64 x2 Processor
hits 100% on both processors making the machine virtually unusable
until the calculation completes. Is there a more efficient way to
get at my data? Is there a more efficient formula that I
could/should be using?

....

I'll assume Unique!J:J is sorted in ascending order. If not, the basic
step in making anything like this more efficient is sorting into
convenient groups.

Limit your conditional counts to just the rows that matter. Try this
array formula.

=SUM(--(MMULT(--(INDEX(Unique!G:G,MATCH(TRUE,Unique!E:E=C$2,0))
:INDEX(Unique!J:J,MATCH(TRUE,Unique!E:E=D$2,0)-1)={"Closed","","",""}
&LEFT($A3,{0,0,0,32267})),{1;0;0;1})=2))

Better still, don't use entire column ranges. Yes, Excel 2007 LETS you
use them, but you've now discovered why that's not necessarily a good
thing.
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
TMK TMK is offline
external usenet poster
 
Posts: 2
Default Array or SumProduct or other?

Thanks guys, I was being lazy trying to keep my formula generic so I
wouldn't have to modify it if it grew outside of a static peramiter, but lost
site that I could still do that just with a smaller "buffer". Much faster now.

Thanks again.
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 w/ Array & criteria azjames Excel Worksheet Functions 0 September 20th 07 11:48 PM
Which is faster sum(if) as an array or sumproduct? Neophyte New Users to Excel 3 March 28th 07 03:28 PM
Sumproduct Excluding Array ~L Excel Worksheet Functions 6 December 20th 06 09:07 PM
Sumproduct Fourth Array Rob Excel Worksheet Functions 2 December 5th 06 07:29 AM
Another SUMPRODUCT array anomaly Jerry W. Lewis Excel Worksheet Functions 6 May 13th 05 06:42 PM


All times are GMT +1. The time now is 04:07 PM.

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

About Us

"It's about Microsoft Excel"