Using Excel 2000</SPAN></SPAN>
Hi,</SPAN></SPAN>
I have 9 unique patterns in the cells C4:K4 and some results in the cells D6:J44, My request is I need a macro which can extract 9 unique matches from the results and copy them in to N4:T44, </SPAN></SPAN>
Start looking in the first result row num 6 extract (and copy them in to columns N:T) as in first row find 5 look in to next row find 3 keep looking in next row find 1 when all 9 is found end find and continue next new search from the next row and follow the same search method.. </SPAN></SPAN>
Example sheet...</SPAN></SPAN>
Thank you in advance</SPAN></SPAN>
Regards,</SPAN></SPAN>
Kishan</SPAN></SPAN>
Hi,</SPAN></SPAN>
I have 9 unique patterns in the cells C4:K4 and some results in the cells D6:J44, My request is I need a macro which can extract 9 unique matches from the results and copy them in to N4:T44, </SPAN></SPAN>
Start looking in the first result row num 6 extract (and copy them in to columns N:T) as in first row find 5 look in to next row find 3 keep looking in next row find 1 when all 9 is found end find and continue next new search from the next row and follow the same search method.. </SPAN></SPAN>
Example sheet...</SPAN></SPAN>
Book1 | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | |||
1 | ||||||||||||||||||||||||
2 | ||||||||||||||||||||||||
3 | ||||||||||||||||||||||||
4 | 1 | 1 | 1 | X | 1 | 2 | X | 1 | X | X | X | 2 | 2 | 1 | 2 | X | 2 | 2 | |||||||||||||||
5 | All 9 Out | |||||||||||||||||||||||
6 | 1 | 1 | 2 | 1 | 1 | 1 | 2 | 1 | X | 2 | X | X | 1 | 2 | 1 | 1 | 2 | 1 | X | 2 | X | X | 1 | 2 | ||||||||||||
7 | 2 | X | 1 | 1 | 1 | X | 2 | 1 | X | X | X | X | 2 | 2 | 2 | X | 1 | X | 2 | 2 | ||||||||||||||
8 | X | 1 | X | 1 | 1 | 2 | 1 | 1 | X | X | 1 | 2 | 1 | 1 | 9 | X | 1 | |||||||||||||||
9 | 2 | 1 | 1 | 1 | 1 | 2 | X | 1 | 1 | X | 2 | X | X | 1 | 2 | 1 | 1 | 1 | 1 | 2 | X | 1 | 1 | X | 2 | X | |||||||||||
10 | 1 | 1 | 1 | 2 | 1 | 1 | X | X | 1 | X | X | 2 | 2 | 2 | 9 | X | X | X | 2 | 2 | 2 | |||||||||||||
11 | 1 | 2 | 2 | 2 | X | 1 | 1 | 1 | X | 1 | 1 | 2 | 1 | 2 | 1 | 2 | 2 | 2 | X | 1 | 1 | 1 | |||||||||||||
12 | 1 | 1 | 1 | 2 | 2 | X | 1 | X | 2 | 1 | X | 1 | 1 | 1 | 2 | X | 1 | X | 2 | 1 | ||||||||||||||
13 | X | 1 | X | 2 | 1 | 1 | 2 | 2 | 1 | 1 | 1 | X | X | 1 | X | 2 | ||||||||||||||||
14 | 1 | 2 | 1 | X | 2 | 2 | 1 | 1 | 1 | 1 | 1 | X | 1 | X | |||||||||||||||||
15 | X | 1 | 1 | 1 | 1 | 1 | 1 | X | 2 | 2 | 2 | 2 | 2 | X | |||||||||||||||||
16 | 1 | 1 | X | 2 | X | 2 | 1 | 1 | X | 1 | 1 | 1 | X | 1 | |||||||||||||||||
17 | X | X | 2 | 1 | 1 | 1 | X | 2 | X | 1 | 1 | 1 | X | 1 | 9 | X | X | |||||||||||||||
18 | 2 | 1 | X | 2 | 1 | X | 1 | X | 1 | 1 | 1 | 1 | X | X | 2 | 1 | X | 2 | 1 | X | 1 | 1 | X | X | ||||||||||||
19 | 1 | 1 | 1 | 1 | X | X | X | 1 | 1 | X | X | 1 | 1 | X | X | 1 | ||||||||||||||||
20 | X | 1 | 2 | 1 | X | 1 | 1 | 1 | 1 | 2 | 1 | 2 | 2 | 2 | 1 | 2 | 2 | 2 | |||||||||||||||
21 | 2 | X | 2 | X | 1 | 2 | 2 | 1 | 1 | X | X | 1 | 1 | 2 | 9 | 2 | X | |||||||||||||||
22 | X | 1 | X | X | X | 2 | 1 | 1 | 2 | 1 | 2 | 2 | X | 1 | X | 1 | X | X | X | 2 | 1 | 1 | 2 | 1 | 2 | 2 | |||||||||||
23 | 2 | 1 | 1 | 2 | X | 2 | 1 | 1 | 1 | 1 | 1 | X | X | 2 | 1 | 2 | 1 | X | |||||||||||||||
24 | 1 | 2 | 2 | 1 | X | 2 | 1 | 1 | 1 | 1 | 1 | 2 | X | X | |||||||||||||||||
25 | 1 | 1 | X | 1 | 2 | 2 | X | 2 | 2 | 2 | X | X | X | 2 | |||||||||||||||||
26 | X | 2 | 2 | X | 2 | X | 1 | 2 | X | X | 1 | 1 | 1 | 1 | 9 | 2 | X | |||||||||||||||
27 | 1 | 1 | 2 | 2 | 2 | 2 | 1 | X | 2 | X | 2 | 2 | 1 | 1 | 1 | 1 | 2 | 2 | 1 | X | 2 | X | 2 | 2 | ||||||||||||
28 | X | 1 | 1 | 2 | X | 2 | 2 | 2 | 1 | 1 | X | X | 2 | 1 | 9 | X | 1 | 1 | 2 | X | 2 | X | X | ||||||||||||
29 | 2 | 1 | X | 1 | X | X | 2 | 2 | 1 | 1 | 2 | 2 | 2 | X | 2 | 1 | X | 1 | X | X | 2 | 2 | 1 | 1 | 2 | X | |||||||||||
30 | X | X | 1 | 2 | X | X | X | X | 2 | X | 1 | 1 | X | 1 | 1 | 2 | ||||||||||||||||
31 | X | 1 | X | X | 1 | 1 | 1 | 1 | 1 | 1 | 2 | 1 | X | 1 | |||||||||||||||||
32 | 2 | X | 2 | 1 | X | 2 | X | 2 | X | X | 1 | 2 | 1 | X | 9 | X | 2 | 1 | X | ||||||||||||||
33 | 2 | X | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 2 | 2 | 1 | X | X | 2 | X | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 1 | X | X | |||||||||||
34 | X | 1 | X | X | 1 | X | 2 | X | 2 | 1 | X | 2 | 1 | 1 | 9 | X | 1 | 1 | X | X | 2 | |||||||||||||
35 | 1 | 2 | X | X | X | X | 1 | X | 2 | 1 | X | X | 1 | 2 | 1 | 2 | X | X | 1 | X | 2 | 1 | |||||||||||||
36 | X | X | 1 | 1 | 1 | 2 | X | 2 | 2 | 1 | X | 1 | 1 | 1 | 1 | 1 | X | 2 | X | 1 | ||||||||||||||
37 | 2 | 1 | 1 | X | X | 1 | 2 | X | 1 | 2 | 1 | X | X | X | 2 | X | ||||||||||||||||
38 | 1 | 2 | 2 | 1 | 1 | 2 | 2 | 2 | 1 | 1 | 2 | 2 | X | 1 | 9 | 2 | 2 | |||||||||||||||
39 | 2 | 1 | 1 | 1 | 1 | X | 1 | 2 | 1 | X | X | 1 | 2 | 2 | 2 | 1 | 1 | 1 | 1 | X | 1 | 2 | X | 1 | 2 | 2 | |||||||||||
40 | 2 | 2 | X | 2 | X | 1 | X | 1 | 1 | 1 | 2 | X | 1 | 2 | X | 2 | 2 | X | |||||||||||||||
41 | 2 | 1 | X | X | 1 | 2 | 1 | 1 | 1 | 2 | 2 | 2 | X | X | 9 | X | X | |||||||||||||||
42 | 1 | 2 | 2 | X | 1 | 2 | 2 | 2 | 1 | 1 | X | 2 | 2 | X | 1 | 2 | 2 | X | 1 | 2 | 2 | 2 | 1 | 1 | X | 2 | 2 | X | ||||||||||
43 | 1 | 1 | 1 | X | 1 | 1 | 2 | 2 | 1 | X | 2 | 1 | 1 | X | 9 | 1 | X | 2 | 1 | ||||||||||||||
44 | X | 1 | 1 | 1 | 1 | 1 | 1 | X | 2 | 2 | 2 | 2 | 2 | X | X | 1 | 1 | 1 | 1 | X | 2 | 2 | 2 | X | ||||||||||||
45 | ||||||||||||||||||||||||
46 | ||||||||||||||||||||||||
47 | ||||||||||||||||||||||||
Sheet2 |
Thank you in advance</SPAN></SPAN>
Regards,</SPAN></SPAN>
Kishan</SPAN></SPAN>
Last edited: