How calculate these combinations ?

The Wraith

New Member
Joined
Nov 12, 2005
Messages
12
:unsure:
Me again, still counting combinations..
till now every given info here to me is working
and i learned a lot... but still not smart enough to find the next result..

so.. :oops:

-- Got list lotto combinations (A1 till F3000)
-- List of 6 nr each line
-- All numbers from (1 to 42)

Now ...how can i calculate how much times off the 3000 lines these kind of combinations exists..

-- combination of 2 numbers
-- combi of 3 and 4 numbers

i think it's maybe to complex to make such a kind of program...
but maybe possible to calculate the combi of 2 numbers and
a (input cell) to check manualy for combi's of a 3th or 4th number ...out of the list


It would be kind of the one who knows a good solution to my problem
Greetings...
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
hello, The Wraith,
Now ...how can i calculate how much times off the 3000 lines these kind of combinations exists..

-- combination of 2 numbers
-- combi of 3 and 4 numbers Hello,
can yo clarify a bit please
can you provide an example ?
or would this do ?
Code:
                            Find
3   4   6   7   8   10      8   9
3   4   6   8   9   11      RESULT
4   6   8   9   10  12      2
4   7   8   10  11  12
kind regards,
Erik
 
Upvote 0
This is a good idee , but how to start to make vba

it looks ok , but where do i start to create the vba or code to realize the count...

something that analyse each row ,number by number and count if each nr together with another nr exist more as 1 time in the total list of 3000 rows...even when 3 same numbers exists more times together...and 4 and 5....it is maybe to complex for all thes countings ?

greetings...
 
Upvote 0
No, not to complex using a sumproductformula :)

F12: =SUMPRODUCT(--($A$3:$G$8=$A$12),--($B$3:$H$8=$B$12))
F13: =SUMPRODUCT(--($A$3:$F$8=$A$13),--($B$3:$G$8=$B$13),--($C$3:$H$8=$C$13))
F14: =SUMPRODUCT(--($A$3:$E$8=$A$14),--($B$3:$F$8=$B$14),--($C$3:$G$8=$C$14),--($D$3:$H$8=$D$14))


when you use a named range the formulas are more "readable" and easier to check for typos
H12: =SUMPRODUCT(--(data=$A$12),--(OFFSET(data,0,1)=$B$12))
H13: =SUMPRODUCT(--(data=$A$13),--(OFFSET(data,0,1)=$B$13),--(OFFSET(data,0,2)=$C$13))
H14: =SUMPRODUCT(--(data=$A$14),--(OFFSET(data,0,1)=$B$14),--(OFFSET(data,0,2)=$C$14),--(OFFSET(data,0,3)=$D$14))

BUT you can get wrong results if you leave blank one criteria with the "data"formula
therefore you can fill in some "impossible" data as I did "|@|" or define your named range according to the formulas ...

perhaps difficult to understand what I mean here, just try out you will see!

of course these formulas won't tell you where you can find those items
surely that can be done to...
the wraith.xls
ABCDEFGHIJK
2DATA
3aabbcAABBCCAABB|@||@||@|
4abcd8910AA|@||@||@|
5AABB91011AABBCC|@||@||@|
6ab891011AABB|@||@||@|
7cd891011aa|@||@||@|
8cd891011aa|@||@||@|
9
10
11criteriaRESULTRESULT
12AABB66
13AABB00
1489101133
the wraith


kind regards,
Erik
 
Upvote 0
Is not working perfect.. but was good tip

i tried it out , but offset was not really working in my excel 2000..

But it does not give me all the couples of 2 and 3 and 4 and 5 by them self when i want to use these code formules...

I still have to put the couples manually in it , so that this can count them after..gives me to much typing work i guess

but what i search is a kind of vba maybe that analyzes my list nr by nr and count how many times together with the other nrs they exists in the rows..

any tip to put a nice vba together is welcom..

Greetz
 
Upvote 0
But it does not give me all the couples of 2 and 3 and 4 and 5 by them self when i want to use these code formules...
that's not what you asked
Now ...how can i calculate how much times off the 3000 lines these kind of combinations exists..
just no time left now ... I'll come back ASAP
 
Upvote 0
but what i search is a kind of vba maybe that analyzes my list nr by nr and count how many times together with the other nrs they exists in the rows..
seems you want to get a list of all numbers in a table and find how many times they are combined with others ...

to be sure what you really would like to get
let us see what would be the output if this is the table to start with
Map1
ABCD
11234
21345
31245
42345
Blad1

"let us see" means:
please post a sheet with results
use Colo's HTML Maker utility for displaying your Excel Worksheet on the board

On the "Excel Questions" main page there is a link to HTML Maker FAQ. You'll find out how to post correctly.
On the main page of the Forum there is a link to a Test here forum and a link to About this Board - to ask questions about HTLMMaker ...

best regards,
Erik
 
Upvote 0
sorry it came over this bad...

but if you look good u see ne next items..

-- L/H u see my list down to 3000 with all the rows off 6 nr's
-- Then a list of 2 colums (where the VBa has to put his calculation of all combinations for 2 nr's in and (X times counted in my list)

same for 3 nr combins -- 4 nrs combins and -- 5 ...

so a VBA that can count the combinations for all 1 to 42 nrs in there combinations with eachother by 2 and 3 and 4 and 5 and then count how many times they apears in my list...

It seems so complex to me that iself can't find a good solution...

i hope you see what i mean...

greetz
 
Upvote 0

Forum statistics

Threads
1,214,638
Messages
6,120,676
Members
448,977
Latest member
moonlight6

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top