Quantcast
Channel: Excel Help Forum - Excel Programming / VBA / Macros
Viewing all articles
Browse latest Browse all 50018

Lottery Lines: Matching values in a table

$
0
0
Hi everyone,

If I have a table of values with five columns and 20 rows, each row is an individual set with five distinct elements. The possible range of values in each cell is from 1 to 99. I am trying to generate row 21, in such a way as to have unique combination of numbers such that there is no duplicate pairs. For example:

1 2 3 4 5
6 7 8 9 10
...
96 97 98 99 1

For row 21, I want to generate five columns of data, with no duplicate pairs. The next row could be 6 12 18 24 30 (but not 6 2 3 11 16, because the pair 2 3 already exist in the very first row). It feels like a MATCH problem, but I can't work out how to set this up. Sure row 21 is straightforward, but row 121 will not be. I'd like to be able to generate this list without having to pick through it.

Thanks for your help (in advance),

Robin

Viewing all articles
Browse latest Browse all 50018

Trending Articles