Hello,
I'm working on a table that calculates prorated vacation. My formula is =IF(Q2>(EDATE($AP$1,-7)-1),DATEDIF(Q2,$AP$1+15,"M"),7). Q2 is the start date and $AP$1 is the start of the calendar year (Jan 1, 2024).
The formula works great providing that the start date is before the start of the calendar year. Where I'm running into challenges is when the start date is after Jan 1, 2024, i.e. Feb 28, 2024. If the start date is after the start of the calendar year, the returned value should be zero, and if the start date is prior to the start of the calendar year, the existing formula should kick in. Please assist me in revising the above formula to account for start dates after the start of the calendar year. Thanks.
I'm working on a table that calculates prorated vacation. My formula is =IF(Q2>(EDATE($AP$1,-7)-1),DATEDIF(Q2,$AP$1+15,"M"),7). Q2 is the start date and $AP$1 is the start of the calendar year (Jan 1, 2024).
The formula works great providing that the start date is before the start of the calendar year. Where I'm running into challenges is when the start date is after Jan 1, 2024, i.e. Feb 28, 2024. If the start date is after the start of the calendar year, the returned value should be zero, and if the start date is prior to the start of the calendar year, the existing formula should kick in. Please assist me in revising the above formula to account for start dates after the start of the calendar year. Thanks.