Calculate Time used


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.


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.

See attached.  You can use SUMIFS to achieve what you want.

Experts Exchange Solution brought to you by

Your issues matter to us.

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

Start your 7-day free trial
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.    
JohnAuthor Commented:

Thanks! This is great!

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.