Excel Lotto - How to find duplicate 6-number groups from result database?


Joined
Nov 20, 2019
Messages
2
Reaction score
1
My database contains 1150 Lotto results from weekly draws over a 23-year period.
I want to check the 1150 entries to see if any combo has won more than once.
Such a combo, if any exist, will almost certainly be in a different order.
Ex: 7 13 21 30 35 39 could also appear as 21 39 13 7 30 35. Or 35 13 39 7 21 30.
Is it possible to query the database and have it show such entries? In color perhaps?
Or, if none exist, say, 'NONE'?
 
Ad

Advertisements

Joined
Mar 14, 2018
Messages
609
Reaction score
197
This is just pseudo code to give you an idea of what you will have to do:
FOREACH row IN worksheet[1]
SELECT comboRow FROM worksheet[1] WHERE num2 = row.num1 OR num3 = row.num1
INSERT comboRow INTO worksheet[2]
END FOREACH

So basically you select all the rows, and then you loop through them testing if the first number is equal to the other columns. Then you insert the matching row into a new worksheet. :user:
 
  • Like
Reactions: Ian
Ad

Advertisements


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

Similar Threads


Top