Calculate Time used

Hello,

I have a spreadsheet with the following

Column A = Date
Column B = Employee
Column C = Time Used
Column D = Type of Time (Vacation, Sick, Personal)

Column F= Employee
Column G = Allowed Vacation
Column H = Allowed Personal
Column I = Allowed Sick

Column K = Remaining Vacation
Column L = Remaining Personal
Column M = Remaining Sick

I want to create a formula that will look at columns B, C and D to find the employee, time used and the type of time. Then look at Columns F, G, H and I so that it can subtract the totals correctly.

The formulas would be in Columns K, L and M.

Please see the attached sample file.

Thanks,

John
Time-Sheet-Sample.xlsx
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Commented:
See attached.  You can use SUMIFS to achieve what you want.
Copy-of-Time-Sheet-Sample.xlsx
0

Experts Exchange Solution brought to you by

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Commented:
I am sort of assuming you are wanting to show the total remaining that includes what is removed from the current row and above.  I.e. used through the current date

K1 = G1-sumif(\$D\$1:D1,"Vacation,"\$C\$1:C1")
L1 = G1-sumif(\$D\$1:D1,"Personal,"\$C\$1:C1")
M1 = G1-sumif(\$D\$1:D1,"Sick,"\$C\$1:C1")

The static relation i.e. \$d\$1 forces it to sum from the first record and the relative refs i.e. D1 let it sum through the current row.
0
Author Commented:
Hello,

Thanks! This is great!

John
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.