surajkartha
New Member
- Joined
- Feb 19, 2011
- Messages
- 16
Hi
I actually need a macro that would copy data from one sheet to another based on the condition that the value in one sheet is equal to the value in another sheet.
For example, the workbook I am working on has two sheets namely "Sheet1" and "Sheet2". Sheet1 consists of three columns which are "Employee Name", "Pay" and "Arrears". I created a macro to automate the copy/paste functionality. Now the problem is that the raw data for "Arrears" is in another workbook, so I added another piece of code to my macro that can copy data from the workbook that has the raw data and pastes it to "Sheet2". Now I need a macro to check if the "Employee Name" in Sheet2 matches with the "Employee Name" in Sheet1 and if yes, it should copy/cut and paste the value from Sheet2 to Sheet1 under the column "Arrears" corresponding to that employee whose name is mentioned.
Please help me out.
Regards
Suraj
I actually need a macro that would copy data from one sheet to another based on the condition that the value in one sheet is equal to the value in another sheet.
For example, the workbook I am working on has two sheets namely "Sheet1" and "Sheet2". Sheet1 consists of three columns which are "Employee Name", "Pay" and "Arrears". I created a macro to automate the copy/paste functionality. Now the problem is that the raw data for "Arrears" is in another workbook, so I added another piece of code to my macro that can copy data from the workbook that has the raw data and pastes it to "Sheet2". Now I need a macro to check if the "Employee Name" in Sheet2 matches with the "Employee Name" in Sheet1 and if yes, it should copy/cut and paste the value from Sheet2 to Sheet1 under the column "Arrears" corresponding to that employee whose name is mentioned.
Please help me out.
Regards
Suraj