LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 247
Default Count...Sum...Faster...improvemens...; Have a good end of YEAR

HI all , and a good end of year

I try to explain a history : I have a hobby with lotto
draws , and I made an VBA program which autogenerate
some combinations ;
first time , I was must to built myself this formulas (
millions of them ... long stuff here .. I don't fall in more
details ) , but , then , I have found the way to autogenerate
this functions ( every function being a combination ) ;

now , only problem is to have the speedest formula
which to calculate in fastest mode ( lot stuff and here ...
I don't fall in more details , too ) ;

First , I had this formula :
( 1 ) = AND(COUNT(A1:A5;A7)<2;COUNT(B1:B5;B7)<2;COUNT(C1:C 5;C7)<2;COUNT
(D1:D5;D7)<2;COUNT(E1:E5;E7)<2)

Thanks to great Harlan Grove , I get the perfect equivalent for
this formula , an array formula :
( 2 ) =AND(MMULT(TRANSPOSE(ROW(A1:E7))^0;ISNUMBER(A1:E7) *{1|1|1|1|1|0|
1})<2)
( with ctrl_sh_enter , and in my local sintax ) , and in US formula
sintax
=AND(MMULT(TRANSPOSE(ROW(A1:E7))^0,ISNUMBER(A1:E7) *{1;1;1;1;1;0;1})
<2)
{ This formula was very good for me in that time ... when I must to
made myself millions of functions ( hard to describe .. doesn't
matter .. ) } ;

With first ( 1 ) formula I was able to do the query in a database of
250.000.000 combinations ; second formula , from great Harlan,
being an array formula , work slower ;

Then , I have found another formula , which work faster then first :
= AND(SUM(A1:A5;A7)<2;SUM(B1:B5;B7)<2;SUM(C1:C5;C7)< 2;SUM(D1:D5;D7)
<2;SUM(E1:E5;E7)<2)
(I realised that I can use SUM instead of COUNT , and I found that
work faster then COUNT function ) ; with this new formula , my
database was of 400.000.000 function ;

Well , last week , in a morning , I get up from sleep ( really!!)
with a new solution : a new kind of formula ;
this is my nocturne brain produce :

= IF(AND(SUM(A1:A5;A7)<2;SUM(B1:B5;B7)<2);AND(SUM(C1 :C5;C7)<2;SUM
(D1:D5;D7)<2;SUM(E1:E5;E7)<2);"WRONG")

Indeed , it work faster than previous formula , because it
calculate the second AND function only if first AND function is TRUE
(if the condition of IF function is satisfied ) ;
In this way , now , my database is of 550.000.000 functions

* * *
Can somebody find a better solution , a better kind of formula ?
Can for this functions to make an equivalent useing MATCH
function ? Why I ask this ? an ideea from here , comment
of Doug Jenkins :
http://www.dailydoseofexcel.com/arch...mance-monitor/

Have a great end of year , how all of you are : great !
 
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
count total month per year Brie Excel Discussion (Misc queries) 2 October 23rd 07 11:04 AM
How do I get the filter mode to show the good row count? vera Excel Worksheet Functions 2 March 6th 07 03:24 PM
Worksheet looks good in print, not so good on-screen Betsy Excel Discussion (Misc queries) 6 February 9th 07 02:16 AM
Can faster CPU+larger/faster RAM significantly speed up recalulati jmk_li Excel Discussion (Misc queries) 2 September 28th 05 10:24 AM
Count returns for a period - year Saintsman Excel Worksheet Functions 1 August 3rd 05 04:49 PM


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