Hi, I've built a spreadsheet that looks at the start and end dates of someone being in a role e.g. 08/01/2018 to 20/12/2019. I've put the end of every month along the top column (31/01/19, 28/02/19, etc.) to help drive the following formulas =IF(AND($G$2>=$B9,$G$2<=$C9),"Yes","No"). However if I've got an end date that is before the end of the month how do I manipulate this formula to make sure that I get the correct answer because at the moment I'm having to manually and go in to amend it?