Its a difficult task for me to generate payslips for each employee. Is there any macro which can help me out. Attaching the workbook .
Its a difficult task for me to generate payslips for each employee. Is there any macro which can help me out. Attaching the workbook .
On sheet2 of your example, why don't you for our information and avoid any guessing, indicate the column that the data comes from on sheet1. In this manner, it can then be automated with the exact information you require. Help us to help you.
Alan עַם יִשְׂרָאֵל חַי
Change an Ugly Report with Power Query
Database Normalization
Complete Guide to Power Query
Man's Mind Stretched to New Dimensions Never Returns to Its Original Form
In addition to what Alan is asking for there's some other considerations. What do you want each payslip(tab) to be named, keeping in mind there's a 31 character limit in the name.
Another issue is if you are keeping the information in sheet1 for every pay period you will need a column, perhaps labeled payslip, that could be flagged(yes/no) for only those line items for which you want a payslip generated.
Click the * Add Reputation button in the lower left hand corner of this post to say thanks.
Don't forget to mark this thread SOLVED by going to the "Thread Tools" drop down list above your first post and choosing solved.
Hi thank you for the prompt reply
i have updated the file
it would be great if you could even tell how your going to use a macro
So then next time you generate payslips you are going to delete all the previous payslips?i want the tab to be the name of the employee
So the sheet1 that you want to generate the payslips from will not have any data from previous pay periods?i am looking for generating payslip for all the employees
Make sure you respond to Alan's post, #2.
Last edited by skywriter; 08-24-2015 at 02:50 PM.
yes, the next time i generate payslips it will be for the next month
no, the sheet1 will not have any data from previous pay periods.
please check the updated file .
For every employee on sheet1 the code will first make a copy of sheet2 to use as a template and name the copy with the employee name per your instructions. Then the appropriate information from sheet1 will be pulled into the new payslip and the process repeated until the last employee. Any required formulas should just be present in the blank payslip sheet, they should not reference sheet1 but just other cells on the payslip.
Check this for accuracy and let me know if you need any changes or fixes.
Thanks a lot sir.This is perfect.If you dont mind could you explain the macro you have used. Next time i would want to do it by myself
It takes information from your sheet1 and puts it into sheet2. It uses the name of the employees to name their sheets as you requested. The reason Alan asked about what you wanted in which cell is because you have much more information on sheet1 than you are wanting to put on sheet2.
It's simply a matter of copying your sheet2, naming it with the name of the person in the row we are currently concern with and setting the values on the new sheet according to your preferences from sheet1.
Thanks for the rep. points.
Please click the Thread Tools drop down box above your first post and choose solved.
Last edited by skywriter; 08-24-2015 at 11:00 PM.
thank you for the information. I am actualy learning vba to code macros. If it is not a problem could you explain the codes you have written.
Here you go.
Please Login or Register to view this content.
Thanks a lot.
Sir any code to convert each sheet into a pdf?
Last edited by sebastiand95; 08-25-2015 at 03:00 AM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks