Hi everyone, my head is already dizzy looking for a solution. I have 2 workbooks (Salary and Result). Next, I want to get employee salaries and bonuses in the Result workbook (sheet: Data) based on the data in the Salary Workbook (sheet: List). I use 2 criteria from: 'Employee ID' and 'Employee Name' to get the desired data. Can I help do it with vba? Thank You
salary.xlsx | ||||||||
---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | |||
1 | Employee List | |||||||
2 | ||||||||
3 | Employee ID | Employee Name | Gender | Department | Salary | Bonus | ||
4 | A21.2009 | Williams Mary | Male | SCM | $ 35,000 | $ 1,272 | ||
5 | A36.2020 | Brown Robert | Male | HR-GA | $ 32,000 | $ 1,746 | ||
6 | A75.2012 | Wilson Elizabeth | Female | SCM | $ 12,000 | $ 1,453 | ||
7 | A47.2003 | Moore Jennifer | Female | MAINTENANCE | $ 41,000 | $ 1,760 | ||
8 | A66.2007 | Brown Charles | Male | WAREHOUSE | $ 39,000 | $ 1,753 | ||
9 | A44.2015 | Price Lisa | Female | SCM | $ 14,000 | $ 667 | ||
10 | A32.2006 | Wood Daniel | Male | FINANCE | $ 13,750 | $ 1,413 | ||
11 | A26.2016 | Coleman Donald | Male | WAREHOUSE | $ 37,500 | $ 610 | ||
12 | A62.2008 | Perry George | Female | TAX | $ 12,050 | $ 1,269 | ||
13 | A46.2018 | Steele Donna | Female | TAX | $ 36,750 | $ 1,846 | ||
14 | A85.2007 | Schultz Carol | Male | SCM | $ 38,050 | $ 817 | ||
15 | A40.2021 | Munoz Ruth | Male | WAREHOUSE | $ 11,000 | $ 944 | ||
16 | A42.2020 | Chandler Jason | Male | HR-GA | $ 29,000 | $ 1,320 | ||
17 | A86.2007 | Small Matthew | Male | QC | $ 45,500 | $ 1,846 | ||
18 | A35.2016 | Hensley Jessica | Female | WAREHOUSE | $ 52,000 | $ 1,061 | ||
19 | A91.2021 | Brown Gary | Male | HR-GA | $ 8,000 | $ 543 | ||
20 | A78.2010 | Grimes Jose | Male | HR-GA | $ 17,000 | $ 1,804 | ||
21 | A53.2010 | Baxter Brenda | Female | SCM | $ 36,000 | $ 1,141 | ||
22 | A39.2018 | Morin Frank | Male | TAX | $ 36,500 | $ 1,471 | ||
23 | A13.2000 | Tillman Kathleen | Female | PRODUCTION | $ 9,750 | $ 1,776 | ||
24 | A92.2015 | Huber Joshua | Male | QC | $ 31,750 | $ 1,633 | ||
25 | A94.2013 | Boyle Debra | Female | PRODUCTION | $ 38,050 | $ 1,560 | ||
26 | A95.2005 | Buckner Jerry | Male | HR-GA | $ 37,500 | $ 711 | ||
27 | A76.2015 | Knowles Aaron | Male | PRODUCTION | $ 10,050 | $ 1,193 | ||
28 | A57.2002 | Velazquez Carlos | Male | QC | $ 9,075 | $ 1,848 | ||
29 | A68.2009 | Vang Marilyn | Female | PRODUCTION | $ 29,750 | $ 865 | ||
List |
Result.xlsx | ||||||
---|---|---|---|---|---|---|
A | B | C | D | |||
1 | Lookup Data | |||||
2 | ||||||
3 | Employee ID | Employee Name | Salary | Bonus | ||
4 | A75.2012 | Wilson Elizabeth | ||||
5 | A26.2016 | Coleman Donald | ||||
6 | A86.2007 | Small Matthew | ||||
7 | A68.2009 | Vang Marilyn | ||||
8 | A76.2015 | Knowles Aaron | ||||
9 | A13.2000 | Tillman Kathleen | ||||
Data |