I'm at my wits end! I know that there is a somewhat simple formula to do what I'm trying to do, but for the life of me cannot figure it out!
I have a request sheet that students fill out through a form. They have a limit of 2 Discretionary Days, 2 Illness Days and 15 Flex Time Days. Students don't usually take all their allotted days in one go, so I need a way to track how many days they have taken previously so that the approver knows if the individual student has hit their limit.
I am able to calculate the number of days for each request with the formula =NETWORKDAYS([First Date of Absence]@row, [Last Date of Anticipated Absence]@row). I get stuck trying to calculate the running total based upon the email of the student and the type of absence (Discretionary, Illness or Flex Time).
Below are my unsuccessful attempts:
=SUMIFS([Total Number of Days]:[Total Number of Days], [Email Address]:[Email Address], [Email Address]@row, [OMS III & IV Absence Request]:[OMS III & IV Absence Request], "Discretionary Days", [OMS 3&4 Approval]:[OMS 3&4 Approval], "Approved")
=IF([OMS III & IV Absence Request]@row = "Discretionary Days", IF([OMS 3&4 Approval]@row = "Approved", SUMIF([Email Address]:[Email Address], [Noorda-COM Email Address]@row, [Total Number of Days]:[Total Number of Days}))
=SUM(Index({Max Days}, match([OMS III & IV Absence Request]@row, {Type of Absence}), 1)-Index([Total Number of Days]:[Total Number of Days, Match([Email Address]@row, [Email Address]:[Email Address]), 1)))
=INDEX(collect([Total Number of Days]:[Total Number of Days], [Email Address]:[Email Address],[Email Address]@row, [OMS III & IV Absence Request]:[OMS III & IV Absence Request], "Discretionary Days")), 1, SUM(INDEX(COLLECT({Max Days}, {Type of Absence}, [OMS III & IV Absence Request]@row), 1) - [Total Number of Days]@row)))
PLEASE HELP!!