Hello everyone,
I have been working on generating a certified payroll report and I'm almost finished but I'm getting hung up on creating a loop that I need...
I am trying to loop through rows and compare project number, employee code number, the employee task code, and if the hours they worked were overtime or regular time. Currently the employee hours are separated into two lines for overtime and regular time by an accounting software we use. I would like to combine this information by copying the employee's over time hours and pasting the data into the record that holds their regular hours.
Here's an example of the data I'm working with.
If the hours type column (H) value is "O" I want to copy cells I2:P2 then find the record that matches the project code, emp, and work class code (columns B, A, and E) and paste the data into the record with the regular hours. Offsetting the data into the R:Z range as shown in the thumbnail below. Then preferably deleting the over time record (but that is not necessary right now the record highlighted in red is to show that it's to be deleted).
Note, the amount of records will change each week, so I need a loop that will be dynamic in counting the number of rows.
Any and all help would be greatly appreciated!
Thank you so much for time,
Rachel
I have been working on generating a certified payroll report and I'm almost finished but I'm getting hung up on creating a loop that I need...
I am trying to loop through rows and compare project number, employee code number, the employee task code, and if the hours they worked were overtime or regular time. Currently the employee hours are separated into two lines for overtime and regular time by an accounting software we use. I would like to combine this information by copying the employee's over time hours and pasting the data into the record that holds their regular hours.
Here's an example of the data I'm working with.
If the hours type column (H) value is "O" I want to copy cells I2:P2 then find the record that matches the project code, emp, and work class code (columns B, A, and E) and paste the data into the record with the regular hours. Offsetting the data into the R:Z range as shown in the thumbnail below. Then preferably deleting the over time record (but that is not necessary right now the record highlighted in red is to show that it's to be deleted).
Note, the amount of records will change each week, so I need a loop that will be dynamic in counting the number of rows.
Any and all help would be greatly appreciated!
Thank you so much for time,
Rachel