Hello guys once again, I'm trying to work on a macro that helps me accomplish the following.
I want for this macro to search starting with range("B2") and to look at column G in order to locate all the cells that contain the name in this case "James A" and to then copy the cells in Columns H that contain that value in order to copy and transpose so the final product looks like this
Book1 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | |||
1 | City | Name | Orders | Order Numbers | |||||||
2 | New York | James A | 01- James A | 1111 | |||||||
3 | New York | James B | 02- James A | 1115 | |||||||
4 | New York | James C | 03- James A | 1117 | |||||||
5 | New York | James D | 04- James B | 2550 | |||||||
6 | New York | James E | 05- James B | 2555 | |||||||
7 | New York | James F | 06- James B | 2560 | |||||||
8 | New York | James G | 07- James C | 127 | |||||||
9 | New York | James H | 08- James C | 128 | |||||||
10 | New York | James I | 09- James C | 129 | |||||||
11 | |||||||||||
12 | |||||||||||
Sheet2 |
I want for this macro to search starting with range("B2") and to look at column G in order to locate all the cells that contain the name in this case "James A" and to then copy the cells in Columns H that contain that value in order to copy and transpose so the final product looks like this
Book1 | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | |||
1 | City | Name | First | Second | Third | Orders | Order Numbers | |||||
2 | New York | James A | 1111 | 1115 | 1117 | 01- James A | 1111 | |||||
3 | New York | James B | 2550 | 2555 | 2560 | 02- James A | 1115 | |||||
4 | New York | James C | 127 | 128 | 129 | 03- James A | 1117 | |||||
5 | New York | James D | 04- James B | 2550 | ||||||||
6 | New York | James E | 05- James B | 2555 | ||||||||
7 | New York | James F | 06- James B | 2560 | ||||||||
8 | New York | James G | 07- James C | 127 | ||||||||
9 | New York | James H | 08- James C | 128 | ||||||||
10 | New York | James I | 09- James C | 129 | ||||||||
11 | ||||||||||||
12 | ||||||||||||
13 | ||||||||||||
14 | ||||||||||||
15 | ||||||||||||
Sheet2 |