Hi, is there a simple way of calculating the number of calendar months between a range of dates.
I have a fee that needs to be spread evenly across the date range for which it applies. I have a number of packages each having their own fee. The time frame for each is exactly 21 months, however, depending on the dates in the range, the number of months in which the range can cover can be 20 or 21. To make this clearer, a date range of 1 Jan 2023 to 31 Jan 2023 is 1 month but a date range of 10 Jan 2023 to 9 Feb 2023 which s also 1 month, crosses 2 months. I am looking for the latter.
I solved the problem by created a flag for each month, counted the flags and used this count in the final formula for the monthly fee.
This strikes me as messy and I am wondering of there is an easier solution.
The file is attached.
Thank You
Bookmarks