Solution for all: {=SUMPRODUCT(SUMIF(Sheet1!$A$2:$A$16,$F$34:$F$40,INDEX(Sheet1!$B$2:$K$16,0,MATCH(T$10,Sheet1!$B$1:$K$1,0))),U34:U40)}
Say I have an Excel workbook with two sheets: Employee Hours and Employee Wages. On the Hours sheet I have 31 columns (Jan1 - Jan31) with inputs for the number of hours worked by each employee by day. On the Wages sheet I have listed the same 31 columns with their wages each day (I do this to factor in wage increases that occur fairly often).
My goal is to use an INDEX/MATCH function to calculate the total daily compensation for each day on the Wages sheet by multiplying hours*wages for all employees that day. Here's the code I'm using:
where T34:T40 is the hours for the employees in day 1, $B$2:$AF$16 is the wage matrix for all employees for all 31 days, and T$10 is date.
My output is not working correctly, it's taking all the hours inputted and multiplying them by only the first employee's hourly wage, it's not matching employee1 hours to employee1 wage, employee2 hours to employee2 wage, etc.
Any input you guys have here? This is pretty much the last piece of my analysis, would love to get it right!
Thanks,
Kevin
Bookmarks