Hi,
I want to create a simple employee leave tracker that will keep a balance of the amount of vacation days entitled for each person.
There are 6 fields:
1. Leave Description
2. Reason - this is a selectable list with the values 'worked','leave','sickness'.
3. Date from
4. Date to
5. Days
6. Balance
The 'Day's field will be calculated automatically (including weekends) from the difference between the two fields, 'Date from' and 'Date to'.
What's the formula for this?
The 'Balance' field should start with a value of 30 (days each employee is entitled to) and according the list value selected in the 'Reason' field, either add or subtract the amount of days in 'Days' field from the 'Balance' field.
For example, if the value in the 'Reason' field = 'Worked', then the days from the 'Days' field should be added to the 'Balance' field.
On the other hand, if the value in the 'Reason' field = 'Leave', then the days from the 'Days' field should be subtracted from the 'Balance' field.
What's the formula for this?
All help appreciated as I cannot get my head around this one.
I want to create a simple employee leave tracker that will keep a balance of the amount of vacation days entitled for each person.
There are 6 fields:
1. Leave Description
2. Reason - this is a selectable list with the values 'worked','leave','sickness'.
3. Date from
4. Date to
5. Days
6. Balance
The 'Day's field will be calculated automatically (including weekends) from the difference between the two fields, 'Date from' and 'Date to'.
What's the formula for this?
The 'Balance' field should start with a value of 30 (days each employee is entitled to) and according the list value selected in the 'Reason' field, either add or subtract the amount of days in 'Days' field from the 'Balance' field.
For example, if the value in the 'Reason' field = 'Worked', then the days from the 'Days' field should be added to the 'Balance' field.
On the other hand, if the value in the 'Reason' field = 'Leave', then the days from the 'Days' field should be subtracted from the 'Balance' field.
What's the formula for this?
All help appreciated as I cannot get my head around this one.