Hi Wonderful Formula Wizards, I am using the below formula to calculate the number of days an employee is working in a temp assignment - I just found out these employees' assignments can be paused (due to injury or vacation, etc.) and restarted. This means that I need to add the following columns and include the pause and restart dates in my formula below. I will have a TA PAUSE DATE, TA RESTART DATE, TA EXT PAUSE DATE, TA EXT 1 RESTART DATE, etc. (for every EXT (up to 4)
If employee begins an assignment 1/1/21 and is schedule to end on 6/30/21 the total days would be 181; if the TA is paused 1/31/21, total days should be 31 until the assignment is restarted; if the TA is restarted on 2/15/21, the total days needs to reflect 31+15 = 46 + # days until the TA END DATE 6/30/21;
I'm not quite sure how to include these variables in the below; obviously if any of the TA pause dates are blank, the formula should just function as below; I created help columns for total TA Pause days.
=IF([TA CANX]@row <> "", [TA CANX]@row - [TA START DATE]@row, IF([TA EXT 4]@row > [TA END DATE]@row, [TA EXT 4]@row - [TA START DATE]@row, IF([TA EXT 3]@row > [TA END DATE]@row, [TA EXT 3]@row - [TA START DATE]@row, IF([TA EXT 2]@row > [TA END DATE]@row, [TA EXT 2]@row - [TA START DATE]@row, IF([TA EXT 1 PAUSE DATE]@row > [TA END DATE]@row, [TA EXT 1 PAUSE DATE]@row - [TA START DATE]@row, [TA END DATE]@row - [TA START DATE]@row))))) + 1