PrincessColumbia
New Member
- Joined
- Sep 22, 2015
- Messages
- 23
So I'm putting together a spreadsheet for calculating hours for a paycheck and I've run into an issue generating a running total to calculate overtime.
Here's my columns:
So the process I'm trying to do should be, "If the total hours so far for this week are more than 40, then take all the hours above 40 and put them in the overtime column. Otherwise, just add the time to the Base Hours column."
My major logjam on this is the Running Total Hours for the Week. The formula I'm attempting is this:
As written, it produces an error. If I just do the INDEX formula, it does a running total of the "Hours Worked" column no problem, but naturally that doesn't help me with just the week.
Any help?
Here's my columns:
- Date (One row per day worked)
- Week number
- Hours worked (this is where the data gets entered, everything else is calculated)
- Running total hours for the week
- Base hours
- Overtime hours
- Base rate (manually entered, but doesn't change much)
- Overtime rate (calculated based on Base Rate)
- Base pay
- Overtime pay
- Total pay
So the process I'm trying to do should be, "If the total hours so far for this week are more than 40, then take all the hours above 40 and put them in the overtime column. Otherwise, just add the time to the Base Hours column."
My major logjam on this is the Running Total Hours for the Week. The formula I'm attempting is this:
Code:
=SUMIFS(INDEX([Hours worked],1):[@[Hours Worked]]),[Week Number],[@[Week Number])
As written, it produces an error. If I just do the INDEX formula, it does a running total of the "Hours Worked" column no problem, but naturally that doesn't help me with just the week.
Any help?