This one is a bit tricky and almost Sudoku like in complexity – at least for me.
I’d like to find a way to randomly generate hours in a timesheet for a pay period based on certain criteria.
Each day and pay period will have hours spread among several projects. Each project’s total hours for the pay period must total to a percentage of the time allocated to the project.
Each day must add up to 8 hours, and each pay period must total 80 hours.
For example, if project 1 is allocated 30% of the time for the pay period, then the total hours for project 1 in that pay period must add up to 24. At the same time, the total number of hours for each day, across the multiple projects must total 8.
Some days can have zero hours assigned to a project, as long as the total across the pay period equals the total determined by the percentage.
The individual project/day hours can be one decimal place (e.g. 1.4, 0.6).
The goal is to create random and changing numbers that will add up to the specified daily and bi-weekly totals.
All advice, thoughts, and comments appreciated.