Hello,
I am looking VBA solution for specific task look up in row constant occurrences
Data got in cells C5:P22, "1" is filled with red colour and white fonts, "X" is filled with dark green colour and white fonts, "2" is filled with blue colour and white fonts,
Results shown in R6 AF22
Example for row 6...
C6 = X count constant occurrence =1, Result cell R6 =1 as it is "X" so fill dark green colour and white fonts
D6 = 1 count constant occurrence =1, Result cell S6 =1 as it is "1" so fill red colour and white fonts
E, F, G 6 = 2 count constant occurrence = 3, Result cell T6 =3 as it is "2" so fill blue colour and white fonts
Resume: count constant occurrence and after counts, result colour cells as per filled in data range
Thank you all
Excel 2000
Regards,
Moti
I am looking VBA solution for specific task look up in row constant occurrences
Data got in cells C5:P22, "1" is filled with red colour and white fonts, "X" is filled with dark green colour and white fonts, "2" is filled with blue colour and white fonts,
Results shown in R6 AF22
Example for row 6...
C6 = X count constant occurrence =1, Result cell R6 =1 as it is "X" so fill dark green colour and white fonts
D6 = 1 count constant occurrence =1, Result cell S6 =1 as it is "1" so fill red colour and white fonts
E, F, G 6 = 2 count constant occurrence = 3, Result cell T6 =3 as it is "2" so fill blue colour and white fonts
Book1 | |||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | AA | AB | AC | AD | AE | AF | AG | |||
1 | |||||||||||||||||||||||||||||||||||
2 | |||||||||||||||||||||||||||||||||||
3 | |||||||||||||||||||||||||||||||||||
4 | |||||||||||||||||||||||||||||||||||
5 | P1 | P2 | P3 | P4 | P5 | P6 | P7 | P8 | P9 | P10 | P11 | P12 | P13 | P14 | P1 | P2 | P3 | P4 | P5 | P6 | P7 | P8 | P9 | P10 | P11 | P12 | P13 | P14 | P15 | ||||||
6 | X | 1 | 2 | 2 | 2 | 1 | 1 | 1 | 1 | X | 1 | 1 | 2 | 2 | 1 | 1 | 3 | 4 | 1 | 2 | 2 | ||||||||||||||
7 | 2 | 2 | 1 | X | 1 | X | 2 | X | X | 1 | 2 | X | 2 | 1 | 2 | 1 | 1 | 1 | 1 | 1 | 2 | 1 | 1 | 1 | 1 | 1 | |||||||||
8 | X | X | 1 | 2 | 1 | 2 | X | 1 | 1 | 2 | X | X | X | 1 | 2 | 1 | 1 | 1 | 1 | 1 | 2 | 1 | 3 | 1 | |||||||||||
9 | 2 | 2 | 1 | 1 | X | 2 | X | 1 | X | 1 | 2 | X | X | 2 | 2 | 2 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 2 | 1 | ||||||||||
10 | 1 | 2 | X | 1 | X | 1 | 1 | 1 | 1 | X | 1 | 1 | 1 | 2 | 1 | 1 | 1 | 1 | 1 | 4 | 1 | 3 | 1 | ||||||||||||
11 | 1 | 2 | 2 | X | 1 | 2 | 1 | 1 | 2 | 2 | 1 | 1 | 1 | 1 | 1 | 2 | 1 | 1 | 1 | 2 | 2 | 4 | |||||||||||||
12 | X | X | 1 | 2 | X | X | 2 | 2 | 1 | 1 | 1 | 1 | X | 2 | 2 | 1 | 1 | 2 | 2 | 4 | 1 | 1 | |||||||||||||
13 | 2 | 1 | 1 | 2 | 1 | X | 1 | 1 | 1 | 1 | 1 | 2 | 1 | 1 | 1 | 2 | 1 | 1 | 1 | 5 | 1 | 2 | |||||||||||||
14 | 1 | 2 | 2 | 2 | 2 | 2 | 1 | 2 | 1 | 2 | 1 | 1 | 1 | 1 | 1 | 5 | 1 | 1 | 1 | 1 | 4 | ||||||||||||||
15 | 2 | X | 2 | 2 | 2 | 1 | 1 | 1 | X | 1 | X | 1 | 1 | 2 | 1 | 1 | 3 | 3 | 1 | 1 | 1 | 2 | 1 | ||||||||||||
16 | 1 | 1 | 1 | 2 | 1 | 1 | 1 | 1 | 2 | X | 1 | X | 1 | 1 | 3 | 1 | 4 | 1 | 1 | 1 | 1 | 2 | |||||||||||||
17 | 2 | 2 | 1 | 2 | X | 2 | X | 1 | X | 1 | 1 | 1 | X | 2 | 2 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 3 | 1 | 1 | ||||||||||
18 | 2 | 2 | 1 | X | 1 | 2 | 2 | 1 | 1 | X | 1 | 1 | X | 1 | 2 | 1 | 1 | 1 | 2 | 2 | 1 | 2 | 1 | 1 | |||||||||||
19 | X | 2 | 2 | 2 | 2 | 2 | 1 | 2 | 1 | 1 | 1 | 1 | 2 | X | 1 | 5 | 1 | 1 | 4 | 1 | 1 | ||||||||||||||
20 | 1 | 2 | 1 | 1 | 2 | 1 | 1 | 1 | 1 | X | X | 2 | X | 1 | 1 | 1 | 2 | 1 | 4 | 2 | 1 | 1 | 1 | ||||||||||||
21 | X | X | X | X | X | X | X | X | X | X | X | X | X | 1 | 13 | 1 | |||||||||||||||||||
22 | 1 | 1 | 1 | 1 | 1 | 1 | X | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 6 | 1 | 7 | ||||||||||||||||||
23 | |||||||||||||||||||||||||||||||||||
24 | |||||||||||||||||||||||||||||||||||
Sheet5 |
Resume: count constant occurrence and after counts, result colour cells as per filled in data range
Thank you all
Excel 2000
Regards,
Moti