Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 55
Default Simplifying/speeding up this formula

Is there a way to change the following formula from
=if(calculation result 0, calculate it again, "") to =if(calculation result
0, use that result, "") ?


=IF(SUMPRODUCT(('Raw Data'!$A$2:$A$30000=$C5)*1,('Raw
Data'!$B$2:$B$30000=I$1)*1)0,SUMPRODUCT(('Raw
Data'!$A$2:$A$30000=$C5)*1,('Raw Data'!$B$2:$B$30000=I$1)*1),"")

Just thinking if there is a clever way to do this, it would cut worksheet
calculation time in half...but I'm not sure how Excel calculates and stores
this data, so my assuption may be incorrect anyway...

Thanks,
Keith


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Simplifying/speeding up this formula

Use 2 cells The first for the sumproduct the second for the if
--
Gary''s Student - gsnu200737


"Keith R" wrote:

Is there a way to change the following formula from
=if(calculation result 0, calculate it again, "") to =if(calculation result
0, use that result, "") ?


=IF(SUMPRODUCT(('Raw Data'!$A$2:$A$30000=$C5)*1,('Raw
Data'!$B$2:$B$30000=I$1)*1)0,SUMPRODUCT(('Raw
Data'!$A$2:$A$30000=$C5)*1,('Raw Data'!$B$2:$B$30000=I$1)*1),"")

Just thinking if there is a clever way to do this, it would cut worksheet
calculation time in half...but I'm not sure how Excel calculates and stores
this data, so my assuption may be incorrect anyway...

Thanks,
Keith



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 55
Default Simplifying/speeding up this formula

Doh! (slaps forehead).

Interestingly, I made other minor modifications to the sheet, and I'm not
sure what I did, but the whole thing is recalculating an order of magnitude
slower than before (independent of the 2-cell solution below). Looks like I
have some more troubleshooting to do :(

Thanks!

"Gary''s Student" wrote in message
...
Use 2 cells The first for the sumproduct the second for the if
--
Gary''s Student - gsnu200737


"Keith R" wrote:

Is there a way to change the following formula from
=if(calculation result 0, calculate it again, "") to =if(calculation
result
0, use that result, "") ?


=IF(SUMPRODUCT(('Raw Data'!$A$2:$A$30000=$C5)*1,('Raw
Data'!$B$2:$B$30000=I$1)*1)0,SUMPRODUCT(('Raw
Data'!$A$2:$A$30000=$C5)*1,('Raw Data'!$B$2:$B$30000=I$1)*1),"")

Just thinking if there is a clever way to do this, it would cut worksheet
calculation time in half...but I'm not sure how Excel calculates and
stores
this data, so my assuption may be incorrect anyway...

Thanks,
Keith





  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Simplifying/speeding up this formula

Or you could eliminate the IF statement completely
=SUMPRODUCT(('Raw Data'!$A$2:$A$30000=$C5)*1,('Raw Data'!$B$2:$B$30000=I$1)*1)

and use a custom number format (Format/Cells/Custom) of 0;; or #,###;; to
display a blank for zero values (and negative values, but you should not get
any negatives w/this formula).




"Keith R" wrote:

Is there a way to change the following formula from
=if(calculation result 0, calculate it again, "") to =if(calculation result
0, use that result, "") ?


=IF(SUMPRODUCT(('Raw Data'!$A$2:$A$30000=$C5)*1,('Raw
Data'!$B$2:$B$30000=I$1)*1)0,SUMPRODUCT(('Raw
Data'!$A$2:$A$30000=$C5)*1,('Raw Data'!$B$2:$B$30000=I$1)*1),"")

Just thinking if there is a clever way to do this, it would cut worksheet
calculation time in half...but I'm not sure how Excel calculates and stores
this data, so my assuption may be incorrect anyway...

Thanks,
Keith



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,231
Default Simplifying/speeding up this formula

"JMB" wrote...
Or you could eliminate the IF statement completely
=SUMPRODUCT(('Raw Data'!$A$2:$A$30000=$C5)*1,
('Raw Data'!$B$2:$B$30000=I$1)*1)

....

Or eliminate a few unnecessary characters,

=SUMPRODUCT(('Raw Data'!$A$2:$A$30000=$C5)*('Raw Data'!$B$2:$B$30000=I$1))




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Simplifying/speeding up this formula

Yep, I certainly overlooked that!

"Harlan Grove" wrote:

"JMB" wrote...
Or you could eliminate the IF statement completely
=SUMPRODUCT(('Raw Data'!$A$2:$A$30000=$C5)*1,
('Raw Data'!$B$2:$B$30000=I$1)*1)

....

Or eliminate a few unnecessary characters,

=SUMPRODUCT(('Raw Data'!$A$2:$A$30000=$C5)*('Raw Data'!$B$2:$B$30000=I$1))



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
Simplifying a formula MartinW Excel Worksheet Functions 3 June 19th 06 11:50 AM
Simplifying Formula (part 1) PaulW Excel Discussion (Misc queries) 2 April 21st 06 06:52 PM
Simplifying Formula (Part 2) PaulW Excel Discussion (Misc queries) 0 April 21st 06 04:53 PM
Simplifying formula m.cain Excel Discussion (Misc queries) 1 March 24th 06 11:35 AM
Simplifying array formula which evaluates as error. Richard Buttrey Excel Worksheet Functions 5 September 30th 05 02:35 AM


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