Cathmac801
New Member
- Joined
- Apr 23, 2014
- Messages
- 20
Hi everyone,
I want to merge some columns from 2 sheets into an existing master sheet. Each month we get a worksheet called Data1PN and another called Data2WB they have all the same headings - i need to take data from columns A, B, C, D, P, T, U, V & AM in each sheet and paste them into MasterWork1 (MasterWork1 has loads of formula in different columns). The mapping is as follows:
I recorded a macro and it works well for Data1PN - however i don't know how to get the data from the 2nd sheet (Data2WB) and find the next free row to paste the data in from there. Each month there are a different number of rows in each sheet.
I hope this makes sense, if anyone can help please let me know.
Thanks
I want to merge some columns from 2 sheets into an existing master sheet. Each month we get a worksheet called Data1PN and another called Data2WB they have all the same headings - i need to take data from columns A, B, C, D, P, T, U, V & AM in each sheet and paste them into MasterWork1 (MasterWork1 has loads of formula in different columns). The mapping is as follows:
Column maps to : | Column |
Data1PN/Data2WB | MasterWork1 |
A | A |
D | B |
B | D |
C | E |
P | I |
T | F |
U | G |
V | H |
AM | Q |
I recorded a macro and it works well for Data1PN - however i don't know how to get the data from the 2nd sheet (Data2WB) and find the next free row to paste the data in from there. Each month there are a different number of rows in each sheet.
I hope this makes sense, if anyone can help please let me know.
Thanks
Book2 | ||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | AA | AB | AC | AD | AE | AF | AG | AH | AI | AJ | AK | AL | AM | AN | |||
1 | Sr No | Forename | Surname | Ref No. | Title | Address Line 1 | Address Line 2 | Address Line 3 | Address Line 4 | POST CODE | Phone No. | Gender | DOB | Civil Status | ID No | Start Date | Data 1 | Data 2 | Data 3 | Total Amt | Split 1 | Split 2 | Data 3 | Data 4 | Data 5 | Data 6 | Data 7 | Data 8 | Data 9 | Data 10 | Data 11 | Data 12 | Data 13 | Data 14 | Data 15 | Data 16 | Data 17 | Data 18 | Checker Comments | Doer Comment | ||
2 | 1 | Jack | Huges | 123 | 15/08/2021 | 3,150.49 | 1,555.87 | 1,594.62 | increase due | |||||||||||||||||||||||||||||||||
3 | 2 | Peter | Nolan | 456 | 23/08/2021 | 1,974.24 | 961.71 | 1,012.53 | ||||||||||||||||||||||||||||||||||
4 | 3 | Joe | Enright | 789 | 28/08/2021 | 2,390.68 | 927.39 | 1,463.29 | ||||||||||||||||||||||||||||||||||
5 | 4 | John | Lehane | 133 | 08/08/2021 | 4,029.83 | 2,524.73 | 1,505.10 | ||||||||||||||||||||||||||||||||||
6 | 5 | Shane | Murphy | 145 | 06/08/2021 | 4,562.30 | 2,970.38 | 1,591.92 | ||||||||||||||||||||||||||||||||||
7 | 6 | Derreck | Keenan | 156 | 14/08/2021 | 4,967.76 | 3,346.33 | 1,621.43 | ||||||||||||||||||||||||||||||||||
8 | 7 | Cormac | Caulfied | 756 | 24/08/2021 | 3,281.25 | 2,019.66 | 1,261.59 | ||||||||||||||||||||||||||||||||||
9 | 8 | Patrick | Crowley | 127 | 10/08/2021 | 3,102.41 | 1,895.41 | 1,207.00 | backpay from last month | |||||||||||||||||||||||||||||||||
10 | 9 | Jer | Huges | 648 | 12/08/2021 | 5,866.94 | 4,566.49 | 1,300.45 | ||||||||||||||||||||||||||||||||||
11 | 10 | Gerry | Nolan | 486 | 23/08/2021 | 8,393.60 | 6,229.81 | 2,163.79 | ||||||||||||||||||||||||||||||||||
12 | 11 | Nathan | Enright | 2587 | 03/08/2021 | 7,597.21 | 5,968.14 | 1,629.07 | ||||||||||||||||||||||||||||||||||
13 | 12 | Tony | Lehane | 3699 | 30/08/2021 | 9,852.44 | 8,109.34 | 1,743.10 | ||||||||||||||||||||||||||||||||||
14 | 13 | Peter | Murphy | 48643 | 03/08/2021 | 9,713.69 | 8,151.09 | 1,562.60 | ||||||||||||||||||||||||||||||||||
15 | 14 | Annie | Keenan | 35497 | 13/08/2021 | 9,562.55 | 8,176.10 | 1,386.45 | ||||||||||||||||||||||||||||||||||
16 | 15 | Catherine | Caulfied | 54569 | 11/08/2021 | 8,348.17 | 6,847.86 | 1,500.31 | ||||||||||||||||||||||||||||||||||
17 | 16 | Pauline | Crowley | 985 | 21/08/2021 | 9,459.48 | 7,665.64 | 1,793.84 | ||||||||||||||||||||||||||||||||||
18 | 17 | Mary | Huges | 6386 | 25/08/2021 | 10,226.02 | 8,386.53 | 1,839.49 | ||||||||||||||||||||||||||||||||||
19 | 18 | Kate | Nolan | 65489 | 08/08/2021 | 10,935.78 | 8,509.12 | 2,426.66 | ||||||||||||||||||||||||||||||||||
20 | 19 | Maureen | Enright | 3219 | 14/08/2021 | 7,412.94 | 6,097.71 | 1,315.23 | arrears due to dependent | |||||||||||||||||||||||||||||||||
21 | 20 | Vera | Lehane | 5478 | 16/08/2021 | 10,922.03 | 9,130.87 | 1,791.16 | ||||||||||||||||||||||||||||||||||
22 | 21 | Jennie | Murphy | 58456 | 31/08/2021 | 11,839.78 | 9,213.66 | 2,626.12 | ||||||||||||||||||||||||||||||||||
23 | 22 | Amy | Keenan | 6354899 | 17/08/2021 | 8,920.94 | 7,569.17 | 1,351.77 | ||||||||||||||||||||||||||||||||||
24 | 23 | Ruth | Caulfied | 6575 | 04/08/2021 | 11,053.64 | 8,499.60 | 2,554.04 | ||||||||||||||||||||||||||||||||||
25 | 24 | Sinead | Crowley | 465 | 27/08/2021 | 10,802.42 | 9,471.98 | 1,330.44 | ||||||||||||||||||||||||||||||||||
26 | 25 | Louise | McAree | 854 | 02/08/2021 | 11,004.18 | 8,894.68 | 2,109.50 | ||||||||||||||||||||||||||||||||||
27 | 26 | Noreen | McArdle | 64612 | 16/08/2021 | 14,416.30 | 11,298.69 | 3,117.61 | ||||||||||||||||||||||||||||||||||
Data1PN |
Book2 | ||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | AA | AB | AC | AD | AE | AF | AG | AH | AI | AJ | AK | AL | AM | AN | |||
1 | Sr No | Forename | Surname | Ref No. | Title | Address Line 1 | Address Line 2 | Address Line 3 | Address Line 4 | POST CODE | Phone No. | Gender | DOB | Civil Status | ID No | Start Date | Data 1 | Data 2 | Data 3 | Total Amt | Split 1 | Split 2 | Data 3 | Data 4 | Data 5 | Data 6 | Data 7 | Data 8 | Data 9 | Data 10 | Data 11 | Data 12 | Data 13 | Data 14 | Data 15 | Data 16 | Data 17 | Data 18 | Checker Comments | Doer Comment | ||
2 | 1 | Jane | Doe | P4536 | 11/06/2021 | 9361.10 | 6164.23 | 3196.87 | ||||||||||||||||||||||||||||||||||
3 | 2 | John | Murphy | P7563 | 13/08/2021 | 10,515.96 | 9925.34 | 590.62 | ||||||||||||||||||||||||||||||||||
4 | 3 | Keith | Hall | P4589 | 03/07/2019 | 10260.49 | 1560.86 | 8699.63 | arrears due for june | |||||||||||||||||||||||||||||||||
5 | 4 | Peter | Jones | P654 | 24/07/2021 | 15943.36 | 2354.38 | 13588.98 | ||||||||||||||||||||||||||||||||||
6 | 5 | Annie | Lowry | P895645 | 04/07/2021 | 7198.52 | 5813.52 | 1385.00 | ||||||||||||||||||||||||||||||||||
Data2WB |
Cell Formulas | ||
---|---|---|
Range | Formula | |
V2:V6 | V2 | =T2-U2 |
Book2 | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | |||
1 | Sr No | Ref No. | PayNo. | Forename | Surname | Total Amt | Split 1 | Split 2 | Start Date | Allowance Start date | Arrears Split 1 | Arrears Split 2 | Total Arrears | Total Split 1 | Total Split 2 | Doer Comment | Checker Comments | ||
2 | |||||||||||||||||||
MasterWork1 |