Using Excel 2010
I have some set of 6 numbers in the range A2:F24 I want to find groups of consecutive numbers (2, 3, 4, 5 and 6) in the range H2:L2 and then highlight groups in different colours in the range A2:F24. Need a VBA solution.
Regards,
Moti
I have some set of 6 numbers in the range A2:F24 I want to find groups of consecutive numbers (2, 3, 4, 5 and 6) in the range H2:L2 and then highlight groups in different colours in the range A2:F24. Need a VBA solution.
n1 | n2 | n3 | n4 | n5 | n6 | Count Consequtives Group of 2 Numbers | Count Consequtives Group of 3 Numbers | Count Consequtives Group of 4 Numbers | Count Consequtives Group of 5 Numbers | Count Consequtives Group of 6 Numbers | |
1 | 2 | 3 | 4 | 5 | 6 | 1 | |||||
1 | 2 | 10 | 12 | 22 | 35 | 1 | |||||
1 | 2 | 3 | 34 | 36 | 38 | 1 | |||||
1 | 8 | 20 | 24 | 33 | 35 | ||||||
1 | 10 | 14 | 24 | 28 | 35 | ||||||
1 | 11 | 16 | 17 | 29 | 33 | 1 | |||||
2 | 12 | 33 | 34 | 35 | 36 | 1 | |||||
14 | 15 | 18 | 19 | 34 | 35 | 3 | |||||
16 | 17 | 18 | 22 | 23 | 24 | 2 | |||||
2 | 19 | 20 | 21 | 22 | 36 | 1 | |||||
4 | 27 | 29 | 31 | 36 | 38 | ||||||
5 | 7 | 10 | 17 | 21 | 32 | ||||||
5 | 7 | 15 | 16 | 17 | 39 | 1 | |||||
6 | 8 | 12 | 18 | 20 | 27 | ||||||
8 | 9 | 10 | 22 | 24 | 36 | 1 | |||||
8 | 10 | 16 | 25 | 26 | 39 | 1 | |||||
8 | 11 | 17 | 20 | 22 | 34 | ||||||
8 | 9 | 10 | 11 | 12 | 37 | 1 | |||||
12 | 19 | 23 | 28 | 36 | 39 | ||||||
13 | 16 | 25 | 28 | 36 | 38 | ||||||
16 | 19 | 28 | 30 | 31 | 38 | 1 | |||||
17 | 21 | 26 | 27 | 34 | 36 | 1 | |||||
18 | 34 | 35 | 36 | 37 | 39 | 1 |
Regards,
Moti