Count Numerous Matches Only Once

P

Paul Black

Hi Everyone,

I would like to be Able to Achieve this Using VB Please.
I have a List of Six Columns and Quite a Few Rows in the Range "B2:G?".

Each Row has Six Unique Numbers Within it.
What I would like to do, is Cycle through EVERY Combination of 3
Numbers from 24 Numbers ( 2,024 Combinations ), and Check if ANY of the
Rows in "B2:G?" Contain ANY of the 2,024 Combinations. For Example, if
the First Combination of 1,2,3 was Found in 5 Rows, I Only want it
Counted as 1 Match NOT 5 Matches. So Basically, as Soon as it Finds a
Match in ANY of my Rows "B2:G?" it Counts it as One and Exits the Loop
and Continues to the Next Combination and so on. I would then Like the
Total Number of the 2,024 Combinations ( 333 for Example ) that were
Matched Underneath the Last Entry in Column "B" But One.

Many Thanks in Advance.
All the Best.
Paul
 
P

Paul Black

Hi Everybody,

Basically, there are 2,024 Combinations of 3 Numbers from 24 Numbers [
Combin(24,3) ] :-

01 02 03
01 02 04
01 02 05
01 02 06
....
21 22 23
21 22 24
21 23 24
22 23 24

I want to Cycle through EACH of the 2,024 Combinations and Check if ANY
of the Combinations are Included in ANY of the Combinations in Cells
"B2:G?". As Soon as there is a Match ( 01 02 03 in the First
Combination of 01 02 03 04 05 06 for Example ), Add One to the Total,
and Stop Checking that Particular Combination in the Rest of the Cells
"B2:G?" and Continue with the Next Combination in the List ( 01 02 04
etc ) and so on.
Has Anybody got ANY Suggestions on how to Achieve this Please.

Many Thanks in Advance.
All the Best.
Paul
 
P

Paul Black

Hi Everybody,

Basically, there are 2,024 Combinations of 3 Numbers from 24 Numbers [
Combin(24,3) ] :-

01 02 03
01 02 04
01 02 05
01 02 06
....
21 22 23
21 22 24
21 23 24
22 23 24

I want to Cycle through EACH of the 2,024 Combinations and Check if ANY
of the Combinations are Included in ANY of the Combinations in Cells
"B2:G?". As Soon as there is a Match ( 01 02 03 in the First
Combination of 01 02 03 04 05 06 for Example ), Add One to the Total,
and Stop Checking that Particular Combination in the Rest of the Cells
"B2:G?" and Continue with the Next Combination in the List ( 01 02 04
etc ) and so on.
Has Anybody got ANY Suggestions on how to Achieve this Please.

Many Thanks in Advance.
All the Best.
Paul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top