• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

UNIQUE ARRAY

Hi everyone.
I am studying the Random behave of a large numbers so the best real life example is on gambling.
I am looking compare a sets of 6 numbers, so I want to be sure that I don’t have any set
Equal or duplicates in the array located at sheet 2

Example
If I have in the sheet 2 in a row, the number 15 / 17 / 30 / 42 / 44 / 49 / I don’t want this
specific number or row, to be duplicate, in the others array that I have; reason why I remark about row by row,
in other way nothing here is about columns, it is only the 6 numbers by row.

The samples array I have they are Dynamics
Sheet 2 array one. SIZE at this moment is [L2:Q46] this is the array need to be unique.
And array two size at this moment is [S2:X46]

Compare SHEET 2 AGAINST 3 to find duplicates
SHEET 3 SIZE at this moment is (R1:W2577)
START
SHEET2 row(L2:Q2) against [sheet3 (R1:W1)]
IF row L2:Q2 = R1:W1 then
Highlight –Sheet2 ROW L2:Q2
DO the same until find the last row on both arrays
END
NEXT

compare SHEET 2 AGAINST 5 to find duplicates
SHEET5 size at this moment is (B2:G2578)
START
Sheet2 row(L2:Q2) against [sheet5 (B2:G2)]
IF row L2:Q2 = B2:G2 then
Highlight –Sheet2 ROW L2:Q2
If already highlight then next
DO the same until find the last row on both arrays
END
NEXT

SHEET10 size at this moment is(R1:W1448)
START
Sheet2 row(L2:Q2) against [sheet10 (R1:W1)]
IF row L2:Q2 = R1:W1 then
Highlight –Sheet2 ROW L2:Q2
If already highlight then next
DO the same until find the last row on both arrays
END
NEXT

SHEET4 size at this moment is (K2:p2578)
START
Sheet2 row(S2:X2) against [sheet4 (K2:p2)]
IF row S2:X2 = K2:p2 then
Highlight –Sheet2 ROW S2:Q2
If already highlight then next
DO the same until find the last row on both arrays
END

Thank you for the time you expended reading this,
 

Attachments

  • row data combinatorics.xlsx
    255.9 KB · Views: 6
In the attached, on Sheet2, 3 buttons.
I've been lazy with coding because the top left cell of your ranges on each sheet are not in a consistent position (I've used the UsedRange of each sheet). So each sheet must contain ONLY the 6 columns of numbers in one contiguous block - nothing outside. You have already done this in your sample file.
There were no duplicates so I added a couple.
One button also adds clickable hyperlinks on Sheet2 on the first cell the row to where duplicates have first been found on other sheets. Wherever those links take you, there's a return hyperlink to Sheet2.
 

Attachments

  • Chandoo41565row data combinatorics.xlsm
    260.6 KB · Views: 7
Back
Top