Hi! Hopefully someone can push in the right direction with my excel problem. Attached is a sample of my spreadsheet. It is a work schedule for several persons on several different work shifts, all with different lengths. My goal is to add a overview for each person with the total number of hours worked per week. I would prefer to do the calculation in one cell for each person because any use of helper colums or tables would increase dramatically when i expand number of people and number of shifts.
If the shifts were all the same length it would be no problem. I could just do a COUNTIF(C3:J7, person)*shiftlength. But when each shift has a unique length i will have to calculate each row one by one and then add them. I have not succeeded in finding a way to do this in a single cell calculation yet.
The calculation SUM({array_of_shifts}*{array_of shiftlengths}) CTRL-SHIFT-ENTER will produce the correct answer, but how do I get to the first array??
I want the COUNTIF to produce one answer for each row/shift, not a total for the whole range.
If the shifts were all the same length it would be no problem. I could just do a COUNTIF(C3:J7, person)*shiftlength. But when each shift has a unique length i will have to calculate each row one by one and then add them. I have not succeeded in finding a way to do this in a single cell calculation yet.
The calculation SUM({array_of_shifts}*{array_of shiftlengths}) CTRL-SHIFT-ENTER will produce the correct answer, but how do I get to the first array??