I’m pretty sure that manipulation of the SUMPRODUCT function will solve my problem…but I can’t figure out what that manipulation is. So here’s my question:
Is there a way to calculate – within a single cell – a multi-dimensional (i.e. multiple criteria) product of a range of values when the inputs for the criteria exist on a separate table?
For example, let’s say I want to calculate the total cost of both the regular and overtime hours worked by a group of employees. The employees’ hours over a three-day period are shown in the last three columns of the table below (Day1, Day2, and Day3):
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Employee[/TD]
[TD]Wage Type[/TD]
[TD="align: right"]Day1[/TD]
[TD="align: right"]Day2[/TD]
[TD="align: right"]Day3[/TD]
[/TR]
[TR]
[TD]Bill
[/TD]
[TD]Regular[/TD]
[TD="align: right"]8 hours[/TD]
[TD="align: right"]6 hours[/TD]
[TD="align: right"]8 hours[/TD]
[/TR]
[TR]
[TD]Bill[/TD]
[TD]Overtime[/TD]
[TD="align: right"]2 hours[/TD]
[TD="align: right"][/TD]
[TD="align: right"]1 hours[/TD]
[/TR]
[TR]
[TD]Mary[/TD]
[TD]Regular[/TD]
[TD="align: right"]7 hours[/TD]
[TD="align: right"]8 hours[/TD]
[TD="align: right"]8 hours[/TD]
[/TR]
[TR]
[TD]Mary[/TD]
[TD]Overtime[/TD]
[TD="align: right"][/TD]
[TD="align: right"]2 hours[/TD]
[TD="align: right"]2 hours[/TD]
[/TR]
[TR]
[TD]Kathryn[/TD]
[TD]Regular[/TD]
[TD="align: right"]10 hours[/TD]
[TD="align: right"]10 hours[/TD]
[TD="align: right"]10 hours[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Regular[/TD]
[TD="align: right"]6 hours[/TD]
[TD="align: right"]8 hours[/TD]
[TD="align: right"]4 hours[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Overtime[/TD]
[TD][/TD]
[TD="align: right"]1 hours[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
However, the regular and overtime wages for the employees are in a separate table, below:
[TABLE="class: grid, width: 300"]
<tbody>[TR]
[TD]Employee[/TD]
[TD="align: right"]Regular[/TD]
[TD="align: right"]Overtime[/TD]
[/TR]
[TR]
[TD]Kathryn[/TD]
[TD="align: right"]$35.00 / hour[/TD]
[TD="align: right"]$35.00 / hour[/TD]
[/TR]
[TR]
[TD]Mary[/TD]
[TD="align: right"]$20.00 / hour[/TD]
[TD="align: right"]$30.00 / hour[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD="align: right"]$25.00 / hour[/TD]
[TD="align: right"]$37.50 / hour[/TD]
[/TR]
[TR]
[TD]Bill[/TD]
[TD="align: right"]$30.00 / hour[/TD]
[TD="align: right"]$45.00 / hour[/TD]
[/TR]
</tbody>[/TABLE]
Is there a formula that will calculate – within a single cell – the total cost of all hours worked per employee wage and wage type? (Hint: The answer is $2,912.50)
FYI: I can re-sort and/or reorganize the employee wage table (the 2nd table above) if I need to. I can’t, however, do anything about the layout of the ‘Hours Worked’ table.
Is there a way to calculate – within a single cell – a multi-dimensional (i.e. multiple criteria) product of a range of values when the inputs for the criteria exist on a separate table?
For example, let’s say I want to calculate the total cost of both the regular and overtime hours worked by a group of employees. The employees’ hours over a three-day period are shown in the last three columns of the table below (Day1, Day2, and Day3):
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Employee[/TD]
[TD]Wage Type[/TD]
[TD="align: right"]Day1[/TD]
[TD="align: right"]Day2[/TD]
[TD="align: right"]Day3[/TD]
[/TR]
[TR]
[TD]Bill
[/TD]
[TD]Regular[/TD]
[TD="align: right"]8 hours[/TD]
[TD="align: right"]6 hours[/TD]
[TD="align: right"]8 hours[/TD]
[/TR]
[TR]
[TD]Bill[/TD]
[TD]Overtime[/TD]
[TD="align: right"]2 hours[/TD]
[TD="align: right"][/TD]
[TD="align: right"]1 hours[/TD]
[/TR]
[TR]
[TD]Mary[/TD]
[TD]Regular[/TD]
[TD="align: right"]7 hours[/TD]
[TD="align: right"]8 hours[/TD]
[TD="align: right"]8 hours[/TD]
[/TR]
[TR]
[TD]Mary[/TD]
[TD]Overtime[/TD]
[TD="align: right"][/TD]
[TD="align: right"]2 hours[/TD]
[TD="align: right"]2 hours[/TD]
[/TR]
[TR]
[TD]Kathryn[/TD]
[TD]Regular[/TD]
[TD="align: right"]10 hours[/TD]
[TD="align: right"]10 hours[/TD]
[TD="align: right"]10 hours[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Regular[/TD]
[TD="align: right"]6 hours[/TD]
[TD="align: right"]8 hours[/TD]
[TD="align: right"]4 hours[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Overtime[/TD]
[TD][/TD]
[TD="align: right"]1 hours[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
However, the regular and overtime wages for the employees are in a separate table, below:
[TABLE="class: grid, width: 300"]
<tbody>[TR]
[TD]Employee[/TD]
[TD="align: right"]Regular[/TD]
[TD="align: right"]Overtime[/TD]
[/TR]
[TR]
[TD]Kathryn[/TD]
[TD="align: right"]$35.00 / hour[/TD]
[TD="align: right"]$35.00 / hour[/TD]
[/TR]
[TR]
[TD]Mary[/TD]
[TD="align: right"]$20.00 / hour[/TD]
[TD="align: right"]$30.00 / hour[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD="align: right"]$25.00 / hour[/TD]
[TD="align: right"]$37.50 / hour[/TD]
[/TR]
[TR]
[TD]Bill[/TD]
[TD="align: right"]$30.00 / hour[/TD]
[TD="align: right"]$45.00 / hour[/TD]
[/TR]
</tbody>[/TABLE]
Is there a formula that will calculate – within a single cell – the total cost of all hours worked per employee wage and wage type? (Hint: The answer is $2,912.50)
FYI: I can re-sort and/or reorganize the employee wage table (the 2nd table above) if I need to. I can’t, however, do anything about the layout of the ‘Hours Worked’ table.