Leave Remaining Formula
Answers
-
You have an extra parenthesis tucked in after the [Days Out] column reference (first range in the SUMIFS function). Try this with it removed...
=INDEX({Employee Information Range 5}, MATCH([Primary]@row, {Employee}, 0)) - SUMIFS([Days Out]:[Days Out], [Date Request Submitted]:[Date Request Submitted], @cell <= [Date Request Submitted]@row, [Primary]:[Primary], @cell = [Primary]@row, [Supervisor approval]:[Supervisor approval], @cell = "Approved")
-
Okay that's great, it has removed the error. Now I want it to calculate correctly. Seems to be a step by step process but we're getting closer! 😃
{Employee Information Range 5} = Total Annual Leave column = 25
1st request (Days Out = 4) should be 21, 2nd request (Days Out = 1) should be 20, then as each new request comes in, the Remaining Leave is reduced by the Days Out column.
Calculation for 1st request is showing as Remaining Leave = 20 and if I copy formula down, 2nd request is also 20. How do I fix this?
-
What are the dates in the Submission Date column?
-
They vary as they are the date that the request has been made.
-
I understand they will vary because of when the submission is made, but it seems as if it is either not registering the dates in the formula or the dates are the same for the specific rows you mentioned in your last post. What are the dates in those rows you are referring to where there is an issue?
-
The system adds the dates with the time i.e. 17/06/21 17:23. Yeah some of the dates are the same.
-
The rows that have the same output... Are they for the same person and submitted on the same date?
-
No, different people
-
I thought you were trying to calculate for each person?
In your comment here:
"1st request (Days Out = 4) should be 21, 2nd request (Days Out = 1) should be 20, then as each new request comes in, the Remaining Leave is reduced by the Days Out column.
Calculation for 1st request is showing as Remaining Leave = 20 and if I copy formula down, 2nd request is also 20. How do I fix this?"
Is that for the same person, or for different people? If for different people, is it a "shared" total amount of time?
-
Yes, the calculation is per employee. No one shares their annual leave. 😅
-
Ok. So in this comment here...
"1st request (Days Out = 4) should be 21, 2nd request (Days Out = 1) should be 20, then as each new request comes in, the Remaining Leave is reduced by the Days Out column.
Are those two rows for the same person or different people and are they submitted on the same date or different dates?
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 495 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!