Dear Friends
Please help me in having macro for the output in enclosed worksheet.
Data is in "Data" sheet. payslips are getting generated in "Slip" sheet using vlookup.
Regards
Srinivas
Dear Friends
Please help me in having macro for the output in enclosed worksheet.
Data is in "Data" sheet. payslips are getting generated in "Slip" sheet using vlookup.
Regards
Srinivas
Hi srini_tbcl,
I am hoping what I have been working on is what you are looking for.
I have updated you file to have a control button to run a marco to replace the vlookup system you already had.
I have also changed your sno column from a to e and have it as part of the formula on vlookup.
here is the code that run the lookup and I will go through it with you so you can perform the same function to all the other payslip data
First I have saved your file as a xlsm to allow the macro to run.Please Login or Register to view this content.
When opening go into developer and click on the visual basic button and your program will open.
You will now see the above data which runs your macro
Worksheets("slip").Select this line is telling the macro to select the slip worksheet
the_Value = Worksheets("data").Range("A2") this line is looking up your name in the data sheet, hence the reason it changes to (A3) on your next pay slip data.
You will also notice that Range("b12") = WorksheetFunction.VLookup(the_Value, Worksheets("data").Range("A:I"), 1, False) is where you are telling data to go from the data sheet to the list sheet.
I have left you to continue with the macro yourself if you do not mind, just copy paste the full block and change all the ranges to suit your macro
When making changes to personal data, all you need to do is change the data in the data sheet (click the marco button) and the data will update in the list sheet.
Hope this helps.
PAYSLIP.xlsm
FWIW:
Please Login or Register to view this content.
Thank you very much.
Srinivas
You're welcome. If you are satisfied with the solutions provided please comply with Forum Rule No. 9.
9. Acknowledge the responses you receive, good or bad. If your problem is solved, please say so clearly, and mark your thread as Solved: Click Thread Tools above your first post, select "Mark your thread as Solved". Or click the Edit button on your first post in the thread, Click Go Advanced, select [SOLVED] from the Prefix dropdown, then click Save Changes. If more than two days have elapsed, the Dropdown option or Edit button will not appear -- ask a moderator to mark it.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks