Aman Chalotra
New Member
- Joined
- Mar 9, 2017
- Messages
- 14
Hi All !!!
I have a routine work which i wish to automate with the help of VBA macro. I have a sheet with say 8 employees. I want to fetch there monthly salary from other sheet. Previously I was having only one sheet to get salary value but now I have to get it form multiple sheets. Here I want to search employee salary wrt to Employee ID from two sheets June and April. And paste in sheet1 next to employee name in two columns.
I was easy to use vlookup macro recorder but with sheets increasing its not a good Idea to use macro recorder. I have tried hard but not able to get the string to start code.
Please provide a basic code to get values.
My main sheet looks like this i.e. sheet1 :
<tbody>
</tbody>Destination sheet One i.e. June is
<tbody>
</tbody>And second destination sheet i.e. April is:
<tbody>
</tbody>
I have a routine work which i wish to automate with the help of VBA macro. I have a sheet with say 8 employees. I want to fetch there monthly salary from other sheet. Previously I was having only one sheet to get salary value but now I have to get it form multiple sheets. Here I want to search employee salary wrt to Employee ID from two sheets June and April. And paste in sheet1 next to employee name in two columns.
I was easy to use vlookup macro recorder but with sheets increasing its not a good Idea to use macro recorder. I have tried hard but not able to get the string to start code.
Please provide a basic code to get values.
My main sheet looks like this i.e. sheet1 :
ID | Name | June | April |
D03 | Jammes | ||
D04 | Mathew | ||
D15 | Anderson | ||
D20 | Hayden | ||
D12 | Stuart | ||
D09 | Broad | ||
D30 | Donald |
<tbody>
</tbody>
ID | Salary |
D03 | 1000 |
D04 | 2000 |
D05 | 3000 |
D06 | 4000 |
D07 | 5000 |
D08 | 6000 |
D09 | 7000 |
D10 | 8000 |
D11 | 9000 |
D12 | 10000 |
D13 | 11000 |
D14 | 12000 |
D15 | 13000 |
D16 | 14000 |
D17 | 15000 |
D18 | 16000 |
D19 | 17000 |
D20 | 18000 |
D21 | 19000 |
D22 | 20000 |
<tbody>
</tbody>
ID | Salary |
D03 | 100000 |
D04 | 150000 |
D05 | 200000 |
D06 | 250000 |
D07 | 300000 |
D08 | 350000 |
D09 | 400000 |
D10 | 450000 |
D11 | 500000 |
D12 | 550000 |
D13 | 600000 |
D14 | 650000 |
D15 | 700000 |
D16 | 750000 |
D17 | 800000 |
D18 | 850000 |
D19 | 900000 |
D20 | 950000 |
D21 | 1000000 |
D22 | 1050000 |
D23 | 1100000 |
D24 | 1150000 |
D25 | 1200000 |
D26 | 1250000 |
D27 | 1300000 |
D28 | 1350000 |
<tbody>
</tbody>