I have a table of cells located from A1 to I9. The table is broken down into 9 named ranges. range1, range2 ect. Each range is a 3x3 cell block. I have code that populates a random amount of cells in each range with a random number. My goal is to detect any duplicates not only in each range but by column and by row for each range.
Example.
x = a blank cell
x 5 4
4 x x
x x x
x 5 x
2 2 x
x x x
The first 3x3 block of cells is range1. Range2 is the second. Range1 has two 4's in the same range. It also has two 5's in the same Column of the 2nd range. And two 2's in the same row.
Basically I can only have one of the same number in a row and in a column.
I need a code that will run my code until that condition is met.
Thanks in advance for any insight.
Bookmarks