Hi
Hope this makes sense?
I’m using =INDEX($A$1:$J$1,RANK(A2,$A$2:$J$2)) to generate a random set of numbers in cells A4:E4
Looking for a macro that can continually generate random sets of numbers until the set in cells A4:E4 match the number set in cells F8:J8 (number order not import), then record in cell L8 how many sets (ie 1325) of numbers were generated from the beginning until a match was made.
Then continue generating random sets of numbers until a match (A4:E4) is made to the set of numbers in cells F9:J9 (number order not important), recording in cell L9 how many sets of numbers (ie 1644) it took for the match to happen AFTER the numbers in cells F8:J8 were matched. (ie 1325 sets of numbers were generated until the number set in cells F8:J8 was matched. Then it took another 1644 sets of numbers to be generated until the numbers in cells F9:J9 were matched)
Then continue generating random sets until a match (A4:E4) is made to the set of numbers in cell F10:J10, recording in cell L10 how many sets of numbers (ie 1644) it took to match AFTER the numbers in cells F9:J9 were matched.
If the recorded amount in cell L9 & L10 match (ie 1644) then generate that many more sets (1644) of numbers and record the numbers of the final set in cells F12:J12 and the value of cell L10 into cell L12.
Then reset the recorded values in cell L8:L10 and start process over recording next match values into cells F13:J13 and L13 and so forth.
Alternatively, once the number set in cells F10:J10 has been matched, if the recorded value in cell L9 & L10 don’t match, reset L8:L10 and have the process start over.
Bookmarks