Hi,
I have a tab in a workbook with the the following table containing labour hours per staff member. Columns A to F need to be exported to a .csv file to be loaded into the payroll system. Can someone kindly help me with coding to do this, the trigger being changing cell I2 to YES. Also, can the exported file be dated YYYY-MM-DD and even saved to a specific folder? or is that asking too much?
Greatly appreciate any help
Thanks
I have a tab in a workbook with the the following table containing labour hours per staff member. Columns A to F need to be exported to a .csv file to be loaded into the payroll system. Can someone kindly help me with coding to do this, the trigger being changing cell I2 to YES. Also, can the exported file be dated YYYY-MM-DD and even saved to a specific folder? or is that asking too much?
Greatly appreciate any help
Thanks
WeeklyTimesheetReport-HK (2).xlsx | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | |||
1 | Line Style | Employee ID | Pay Rate ID | Unit (hours) | Dept Quick Ref | Days Paid | Export | ||||
2 | #50 | AdamLynch | 1 | 37.58 | No | ||||||
3 | #50 | AdamLynch | 2 | 0 | 5 | ||||||
4 | #50 | AllenZ | 1 | 44.8 | |||||||
5 | #50 | AllenZ | 2 | 0 | 5 | ||||||
6 | #50 | AmandeepS | 1 | 47.33 | |||||||
7 | #50 | AmandeepS | 2 | 0 | 6 | ||||||
8 | #50 | AngeloM | 1 | 40.08 | |||||||
9 | #50 | AngeloM | 2 | 0 | 5 | ||||||
10 | #50 | BronsonC | 1 | 44.24 | |||||||
11 | #50 | BronsonC | 2 | 0 | 5 | ||||||
12 | #50 | BryanG | 1 | 39.75 | |||||||
13 | #50 | BryanG | 2 | 0 | 5 | ||||||
14 | #50 | CareyC | 1 | 45 | |||||||
15 | #50 | CareyC | 2 | 0 | 5 | ||||||
16 | #50 | CaydenA | 1 | 35.75 | |||||||
17 | #50 | CaydenA | 2 | 0 | 5 | ||||||
18 | #50 | CMasina | 1 | 33.5 | |||||||
19 | #50 | CMasina | 2 | 0 | 4 | ||||||
20 | #50 | dsteph | 1 | 40.32 | |||||||
21 | #50 | dsteph | 2 | 0 | 5 | ||||||
22 | #50 | hardeeps | 1 | 51.08 | |||||||
23 | #50 | hardeeps | 2 | 4.5 | 6 | ||||||
24 | #50 | dougo | 1 | 45 | |||||||
25 | #50 | dougo | 2 | 0 | 5 | ||||||
26 | #50 | GerardH | 1 | 43.75 | |||||||
27 | #50 | GerardH | 2 | 0 | 5 | ||||||
28 | #50 | HaydenWard | 1 | 41.92 | |||||||
29 | #50 | HaydenWard | 2 | 0 | 5 | ||||||
30 | #50 | HuiaM | 1 | 40.5 | |||||||
31 | #50 | HuiaM | 2 | 0 | 5 | ||||||
32 | #50 | JagdeepS | 1 | 48.26 | |||||||
33 | #50 | JagdeepS | 2 | 1.17 | 7 | ||||||
34 | #50 | JamahlO | 1 | 42.35 | |||||||
35 | #50 | JamahlO | 2 | 0 | 5 | ||||||
36 | #50 | JamesMoa | 1 | 45.5 | |||||||
37 | #50 | JamesMoa | 2 | 0 | 6 | ||||||
38 | #50 | JaredK | 1 | 39.84 | |||||||
39 | #50 | JaredK | 2 | 0 | 5 | ||||||
3. Upload |
Cell Formulas | ||
---|---|---|
Range | Formula | |
F3,F39,F37,F35,F33,F31,F29,F27,F25,F23,F21,F19,F17,F15,F13,F11,F9,F7,F5 | F3 | =SUM(--(ISNUMBER(UNIQUE(FILTER('1. Data Dump'!$C:$C,'1. Data Dump'!$A:$A=B3))))) |
D2,D4,D6,D8,D10,D12,D14,D16,D18,D20,D22,D24,D26,D28,D30,D32,D34,D36,D38 | D2 | =VLOOKUP(B2,'2. Hours Worked'!$A$4:$D$84,2,FALSE) |
D3,D5,D7,D9,D11,D13,D15,D17,D19,D21,D23,D25,D27,D29,D31,D33,D35,D37,D39 | D3 | =VLOOKUP(B3,'2. Hours Worked'!$A$5:$D$85,3,FALSE) |
Named Ranges | ||
---|---|---|
Name | Refers To | Cells |
'1. Data Dump'!_FilterDatabase | ='1. Data Dump'!$A$1:$H$1394 | F3, F5, F7, F9, F11, F13, F15, F17, F19, F21, F23, F25, F27, F29, F31, F33, F35, F37, F39 |
Cells with Data Validation | ||
---|---|---|
Cell | Allow | Criteria |
I2 | List | =Worktype!$A$6:$A$7 |