Hello everybody,
The columns "A", "B", "C", "D" and "E" of "Sheet1" are filled with numbers, from 1 to 49.
I need a macro to classify these rows with 5 numbers the following way:
There are 5 arrays with the numbers:
K = Array(1, 2, 3, 4, 5, 6, 7, 8, 9)
L = Array(10, 11, 12, 13, 14, 15, 16, 17, 18, 19)
M = Array(20, 21, 22, 23, 24, 25, 26, 27, 28, 29)
N = Array(30, 31, 32, 33, 34, 35, 36, 37, 38, 39)
O = Array(40, 41, 42, 43, 44, 45, 46, 47, 48, 49)
I need to write 3 IF / END IF statements so that:
If the 5 numbers of the "Range(Cells(y, 1), Cells(y, 5))" belong to the same array, then copy to "Sheet 2". For example, a row with the numbers "1", "2'', "3", "4" and "5".
and
If the 5 numbers of the "Range(Cells(y, 1), Cells(y, 5))" belong to different arrays, then copy to "Sheet 3". For example, a row with the numbers "1", "10'', "20", "30" and "40".
and
If the "Range(Cells(y, 1), Cells(y, 5)" has 2 numbers in one array, 2 numbers in other array, and 1 number in another array then copy to "Sheet4". For example, a row with the numbers "1", "5", "22", "26" and "40".
Any help is welcome.
Thanks,
John
Bookmarks