Using Excel 2000
Hi,
I need a macro, which look cycle for "1X2" within 4 rounds if not found go to next row and search within 4 next rounds
Data are in cells C6:C82
Step1-code start searching cycle for "1X2" in cells C6:C9 if cycle for "1X2" does not find continue to step-2
Setp-2 go to next 4 cycles in cells C7:C10 if cycle for "1X2" find insert 4 in to cell E7 and colour cells C7:C10 in green
Setp-3 go to next 4 cycles in cells C8:C11 if cycle for "1X2" does not find continue to step-4
Setp-4 go to next 4 cycles in cells C9:C12 if cycle for "1X2" find insert 4 in to cell E9 and colour cells C9:C12 in yellow (overleaping the colour C9:C10 cell will be change in yellow too)
And continue so on till end of the column c
Data example...
Thank you in advance
Regards,
Kishan
Hi,
I need a macro, which look cycle for "1X2" within 4 rounds if not found go to next row and search within 4 next rounds
Data are in cells C6:C82
Step1-code start searching cycle for "1X2" in cells C6:C9 if cycle for "1X2" does not find continue to step-2
Setp-2 go to next 4 cycles in cells C7:C10 if cycle for "1X2" find insert 4 in to cell E7 and colour cells C7:C10 in green
Setp-3 go to next 4 cycles in cells C8:C11 if cycle for "1X2" does not find continue to step-4
Setp-4 go to next 4 cycles in cells C9:C12 if cycle for "1X2" find insert 4 in to cell E9 and colour cells C9:C12 in yellow (overleaping the colour C9:C10 cell will be change in yellow too)
And continue so on till end of the column c
Data example...
Book1 | ||||||||
---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | |||
1 | ||||||||
2 | Find Cycle | |||||||
3 | Within | |||||||
4 | 4 Rounds | |||||||
5 | C1 | 4 | ||||||
6 | X | |||||||
7 | X | 4 | ||||||
8 | X | |||||||
9 | 2 | 4 | ||||||
10 | 1 | |||||||
11 | 1 | |||||||
12 | X | |||||||
13 | 1 | |||||||
14 | 1 | |||||||
15 | 1 | |||||||
16 | X | |||||||
17 | 1 | |||||||
18 | 1 | |||||||
19 | X | 4 | ||||||
20 | 1 | |||||||
21 | 1 | 4 | ||||||
22 | 2 | |||||||
23 | 1 | |||||||
24 | X | |||||||
25 | 1 | |||||||
26 | X | |||||||
27 | 1 | |||||||
28 | 1 | |||||||
29 | 1 | |||||||
30 | 1 | |||||||
31 | 1 | |||||||
32 | 1 | |||||||
33 | 2 | |||||||
34 | 1 | 4 | ||||||
35 | 2 | |||||||
36 | 1 | |||||||
37 | X | |||||||
38 | X | |||||||
39 | X | 4 | ||||||
40 | 1 | |||||||
41 | X | |||||||
42 | 2 | 4 | ||||||
43 | X | |||||||
44 | X | 4 | ||||||
45 | 1 | |||||||
46 | 1 | 4 | ||||||
47 | 2 | |||||||
48 | 1 | |||||||
49 | X | |||||||
50 | X | |||||||
51 | X | |||||||
52 | X | |||||||
53 | X | 4 | ||||||
54 | 2 | |||||||
55 | X | |||||||
56 | 1 | |||||||
57 | X | 4 | ||||||
58 | 1 | |||||||
59 | 1 | |||||||
60 | 2 | |||||||
61 | X | |||||||
62 | 2 | |||||||
63 | 1 | |||||||
64 | 1 | |||||||
65 | 1 | |||||||
66 | X | |||||||
67 | X | |||||||
68 | 1 | |||||||
69 | X | |||||||
70 | 1 | |||||||
71 | 1 | |||||||
72 | 1 | |||||||
73 | 1 | |||||||
74 | 1 | |||||||
75 | 1 | 4 | ||||||
76 | 1 | |||||||
77 | 2 | |||||||
78 | X | 4 | ||||||
79 | 1 | |||||||
80 | 1 | |||||||
81 | 2 | |||||||
82 | 2 | |||||||
83 | ||||||||
84 | ||||||||
85 | ||||||||
86 | ||||||||
Sheet2 |
Thank you in advance
Regards,
Kishan