Hello everyone,
I hope you're all doing well today. I have a straightforward calculation that I intend to execute using VBA instead of direct sheet formulas. I'm specifically focusing on the yellow highlighted columns for this task.
The given sheet already calculates the sum of working hours for each employee in every row.
Now, I need to calculate the wage for each row, as indicated in column I. The formula in column I is simply (F2 * 24) * 0.54. Note that 24 is a constant, while the number 0.54 is variable based on the individual's hourly rate, as shown in table hour_rate (in Sheet2).
So, I guess it is a VLOOKUP code that would retrieve the value of 0.54 from Sheet2. Hence, when this is achieved, I intend to perform a sum product operation on the values in column I, and the sum should consider only rows where the person is the same and has the same PRO. number simultaneously. These sum product values are calculated in column J.
I've populated a few rows to illustrate the data. Please find below the VBA code for which a vba code may be added.
I appreciate your assistance in implementing these calculations using VBA.Please Login or Register to view this content.
Thank you very much!
Attached is my whole file as for your sole convenience.
Bookmarks