Hi community. I am looking to simplify a manual process.
Each month I compare net salary from previous month against current month and make a short comment per employee what has impacted their net salary.
All is done within same workbook - Attaching a sample file which I will refer to.
What I want the makro to do is:
In Net pay sheet column I "Current month" I want to print text explaining the variations in current month salary.
All relevant salary data explaining the variations is find in the "Payroll data" sheet in different columns.
For example if employee 647608 has had an Overtime payment he will have the monetary value in payroll data sheet column Z or AA. If he has a value in any of these columns, I simply want to print '+OT in the net pay. If he had multiple different payments I want to combine a text. For example '+OT +On Call +Bonus.
I'd also like to include the logic that columns which are related to payments give a prefixed "+" if value is positive and "-" if value is negative.
For columns related to deductions I want to give a prefixed "-" if value is positive and "+" if value is negative.
We have for example 2 overtime columns (Z and AA). If an employee has values in all 2 I want to avoid printing OT text 2 times if possible (+OT +OT)
What I am asking community to help with is to build the basis of the Makro. The loops etc. to cycle through all the employees rows in net pay sheet and all the columns in the Payroll data sheet.
Then I can add in text that needs to be printed based on the columns.
Let me know if any questions.