smide
Board Regular
- Joined
- Dec 20, 2015
- Messages
- 162
- Office Version
- 2016
- Platform
- Windows
Hello.
In Sheet2, Column B (B3:B50) I have a strings which I need to copy in Sheet1 , Row 3 in cells B3,D3,F3, ... V3 and X3 (12 in total).
In Sheet2, Column G is so called "markers" Column because it contains markers/numbers for each product and those markers define copy position for each cell (copy position in Sheet1, row3).
So, if let say (in Sheet2) cell G3=1 than string from cell B3 (Sheet2) should be copied in B3 (Sheet1) and so on...
- IF some cell(s) in G column (G3:G50) is empty (without marker) than delete appropriate string in column B.
- IF Column G is completely empty than JUST copy first 12 strings from Sheet2 (B3:B14) into Sheet1 (B3,D3,F3,...X3).
(B3 to B3, B4 to D3 ...)
Example.
Sheet2
<tbody>
</tbody>
Sheet1 (after macro run)
<tbody>
</tbody>
Sheet2 (after macro run)
<tbody>
</tbody>
In Sheet2, Column B (B3:B50) I have a strings which I need to copy in Sheet1 , Row 3 in cells B3,D3,F3, ... V3 and X3 (12 in total).
In Sheet2, Column G is so called "markers" Column because it contains markers/numbers for each product and those markers define copy position for each cell (copy position in Sheet1, row3).
So, if let say (in Sheet2) cell G3=1 than string from cell B3 (Sheet2) should be copied in B3 (Sheet1) and so on...
- IF some cell(s) in G column (G3:G50) is empty (without marker) than delete appropriate string in column B.
- IF Column G is completely empty than JUST copy first 12 strings from Sheet2 (B3:B14) into Sheet1 (B3,D3,F3,...X3).
(B3 to B3, B4 to D3 ...)
Example.
Sheet2
B | G | |
1 | ||
2 | ||
3 | home | 3 |
4 | shop | |
5 | mrexcel | 1 |
6 | pattern | 6 |
7 | question | 2 |
8 | product | |
9 | best | 5 |
10 | forward | 4 |
11 | ..... | .... |
<tbody>
</tbody>
Sheet1 (after macro run)
A | B | C | D | E | F | G | H | I | J | K | L | M | N | |
1 | ||||||||||||||
2 | ||||||||||||||
3 | mrexcel | question | home | forward | best | pattern | ... |
<tbody>
</tbody>
Sheet2 (after macro run)
B | G | |
1 | ||
2 | ||
3 | home | 3 |
4 | ||
5 | mrexcel | 1 |
6 | pattern | 6 |
7 | question | 2 |
8 | ||
9 | best | 5 |
10 | forward | 4 |
11 | .... |
<tbody>
</tbody>
Last edited: