Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
count total month per year | Excel Discussion (Misc queries) | |||
How do I get the filter mode to show the good row count? | Excel Worksheet Functions | |||
Worksheet looks good in print, not so good on-screen | Excel Discussion (Misc queries) | |||
Can faster CPU+larger/faster RAM significantly speed up recalulati | Excel Discussion (Misc queries) | |||
Count returns for a period - year | Excel Worksheet Functions |