Hi,
I need to count in the each row 1, X & 2 before the X is finding in the 11th position (and stop counting if breaks with other sign is found). Example is attached
Need VBA solution if possible
Please help!
Thanks
Regards,
Kishan
I need to count in the each row 1, X & 2 before the X is finding in the 11th position (and stop counting if breaks with other sign is found). Example is attached
Book1 | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | |||
1 | Year | Date | P1 | P2 | P3 | P4 | P5 | P6 | P7 | P8 | P9 | P10 | P11 | P12 | P13 | P14 | Empty | Before "X" 11th Position | Before "X" 11th Position | Before "X" 11th Position | ||
2 | Year | Date | P1 | P2 | P3 | P4 | P5 | P6 | P7 | P8 | P9 | P10 | P11 | P12 | P13 | P14 | Empty | Count 1 | Count X | Count 2 | ||
3 | 2013 | 01/12/2013 | 2 | X | 2 | 1 | 1 | 1 | X | 1 | 1 | 1 | 2 | X | 1 | 1 | ||||||
4 | 2013 | 02/12/2013 | 2 | 2 | X | 1 | 2 | 1 | X | X | 2 | 1 | 2 | 1 | 2 | X | ||||||
5 | 2013 | 03/12/2013 | 1 | 1 | 1 | 1 | 1 | X | 1 | X | 1 | 1 | X | X | 1 | 2 | 2 | |||||
6 | 2013 | 04/12/2013 | 1 | 1 | 1 | 2 | 1 | 1 | 1 | 2 | X | 1 | 1 | 1 | X | 1 | ||||||
7 | 2013 | 05/12/2013 | 1 | X | 1 | 1 | X | 1 | 2 | X | 1 | 1 | 1 | 1 | 1 | X | ||||||
8 | 2013 | 06/12/2013 | 1 | 1 | 1 | 2 | 2 | X | 1 | 1 | 1 | X | 1 | 1 | 1 | X | ||||||
9 | 2013 | 07/12/2013 | 1 | 1 | X | 1 | 1 | 1 | 1 | 2 | 1 | X | 1 | 1 | X | 1 | ||||||
10 | 2013 | 08/12/2013 | 1 | 2 | 1 | 1 | 1 | 1 | 2 | 1 | 1 | X | 1 | 1 | 1 | 2 | ||||||
11 | 2013 | 09/12/2013 | 2 | 2 | X | 2 | 1 | 1 | 2 | X | 2 | 1 | 1 | X | 1 | 2 | ||||||
12 | 2013 | 10/12/2013 | 1 | 1 | 1 | X | 1 | 2 | 2 | 1 | 1 | 2 | 1 | X | 1 | 1 | ||||||
13 | 2013 | 11/12/2013 | 1 | 2 | 1 | 1 | X | 1 | 1 | 1 | 1 | X | X | 1 | X | X | 1 | |||||
14 | 2013 | 12/12/2013 | 1 | 1 | 2 | X | 2 | 2 | 1 | 2 | X | 1 | 1 | X | 2 | 1 | ||||||
15 | 2013 | 13/12/2013 | 1 | X | 1 | X | 1 | 2 | 2 | 2 | 1 | 1 | 1 | 2 | 2 | 2 | ||||||
16 | 2013 | 14/12/2013 | X | X | 1 | 1 | 2 | 1 | 1 | 2 | 2 | 2 | X | 1 | 1 | 1 | 3 | |||||
17 | 2013 | 15/12/2013 | 2 | 2 | 2 | 2 | 2 | X | 1 | 1 | 1 | 2 | X | 2 | X | 1 | 1 | |||||
18 | 2013 | 16/12/2013 | X | 1 | 1 | 1 | X | X | X | 1 | 1 | 1 | X | 1 | 2 | 2 | 3 | |||||
19 | 2013 | 17/12/2013 | 2 | 2 | X | 1 | 2 | 1 | 2 | 1 | 2 | 1 | X | 1 | 1 | X | 1 | |||||
20 | 2013 | 18/12/2013 | X | 1 | 1 | 2 | 1 | 1 | 2 | 1 | X | 2 | X | 2 | 2 | 1 | 1 | |||||
21 | 2013 | 19/12/2013 | 1 | 1 | 1 | 2 | 1 | 2 | X | 2 | 2 | X | 1 | 2 | 1 | 1 | ||||||
22 | 2013 | 20/12/2013 | 2 | 1 | 1 | 1 | X | 2 | 1 | 1 | X | 1 | 1 | 1 | 2 | 2 | ||||||
Count 1-X-2 Before "X" 11th Pos |
Need VBA solution if possible
Please help!
Thanks
Regards,
Kishan