I have a spreadsheet that managers fill out with overtime hours. At the top you will see some drop down boxes that are populated by information on the second sheet. I am looking to have a "totals" tab that will total by code, and by either "OT" or "CE" for each employee. These are entered by instance so there are often weeks that certain codes are used multiple times and I would like to have a total sheet of which I could easily enter information into my payroll system.
So when you enter code 01501 in C8 of the OT sheet, you would like to know the sum of C11:D30. When you enter code 01501 in K8 as well, you would like to know the sum of C11:D30 + K11:L30.
If the above is what you are after, then I would place a sum formula in row 31.
Cell C31: =SUM(C11:D30)
Cell E31: =SUM(E11:F30)
and so on.
Now you can use the following formula:
You can replace the "01501" with a cell reference where that value is located.
On sheet "Sheet1" you have listed the codes in column A. When you would like to put the total in column E, your formula would be:
=COUNTIF('OT Sheet'!$C$8:$Z$8,A1,'OT Sheet'!$C$31:$Z$31)
Then drag this formula down to get the result for the other codes.
Note that "Sheet2" is empty in your uploaded file.