I need help developing a formula that looks at the start and end dates for an agreement (eg. rent, where rent amount per month is fixed). The agreement can straddle months or years. I would like to show rent mont by month on a timescale, however, be able to prorate the rental amount in the initial month and the final month where the agreement start and end part-way through the month (eg. Agreement starts 12 August 2016, Ends 22 September 2018 and assume monthly rental of $1000)
It is actually quite easy to check if a period is within two dates. You will have to convert the dates to periods using PERIOD function. Having done that you can compare periods with < or > operators as you would compare numbers.
Ex. IF June 2017 < August 2017 THEN TRUE ELSE FALSE will give us TRUE as a result.