Jyotirmaya
Board Regular
- Joined
- Dec 2, 2015
- Messages
- 205
- Office Version
- 2019
- Platform
- Windows
I have data in Sheet1 in Column A & B, I want 5 Rows from Sheet 1 to copy into Sheet 2.
For example I want the data from Sheet 1 A1:A5 to copy into Sheet 2 A8 to A12 and B1:B6 to copy into C8 to C12 of Sheet 2 and save the page as PDF in desktop then continue the process till last row of Sheet1, 5 rows of Sheet 1 to be pasted by replacing existing data and save as PDF then again next 5 rows & so on...I have data till 1500 in Sheet 1 so it should save as PDF for 300 times after copying the data, The saveas PDF file name may be saved as 1,2,3,etc
Please help me a excel Macro code for that.
For example I want the data from Sheet 1 A1:A5 to copy into Sheet 2 A8 to A12 and B1:B6 to copy into C8 to C12 of Sheet 2 and save the page as PDF in desktop then continue the process till last row of Sheet1, 5 rows of Sheet 1 to be pasted by replacing existing data and save as PDF then again next 5 rows & so on...I have data till 1500 in Sheet 1 so it should save as PDF for 300 times after copying the data, The saveas PDF file name may be saved as 1,2,3,etc
Book1 | ||||
---|---|---|---|---|
A | B | |||
1 | Apple | Orange | ||
2 | Car | Bus | ||
3 | Red | Green | ||
4 | Sky | Star | ||
5 | Tiger | Lion | ||
6 | 1 | 2 | ||
7 | 3 | 4 | ||
8 | 5 | 6 | ||
9 | 7 | 8 | ||
10 | 9 | 10 | ||
11 | A | B | ||
12 | C | D | ||
13 | E | F | ||
14 | G | H | ||
15 | I | J | ||
16 | Apple | Orange | ||
17 | Car | Bus | ||
18 | Red | Green | ||
19 | Sky | Star | ||
20 | Tiger | Lion | ||
21 | 11 | 12 | ||
22 | 13 | 14 | ||
23 | 15 | 16 | ||
24 | 17 | 18 | ||
25 | 19 | 20 | ||
26 | A | B | ||
27 | C | D | ||
28 | E | F | ||
29 | G | H | ||
30 | I | J | ||
Sheet1 |
Book1 | |||||
---|---|---|---|---|---|
A | B | C | |||
1 | A | b | c | ||
2 | |||||
3 | |||||
4 | |||||
5 | |||||
6 | |||||
7 | |||||
8 | d | ||||
9 | |||||
10 | |||||
11 | |||||
12 | |||||
Sheet2 |
Please help me a excel Macro code for that.
Cell Formulas | ||
---|---|---|
Range | Formula | |
A8:A12 | A8 | =Sheet1!A1 |
C8:C12 | C8 | =Sheet1!B1 |