This works perfectly, thanks a lot! The dates are in column M by the way, I did not inform you correctly, but I was able to modify the script accordingly myself.
I have another challenge for you if you are up for it, this is also something that would be highly useful.
It is desired that the maintenance dates are coloured differently based on urgency, and this should also occur automatically. By colouring I mean the cell filling, not the text.
Overdue maintenance dates shall be coloured in red. For example now that we are in november, all dates for october and backwards shall be marked in red. The maintenance dates which are in november shall be marked in orange, as these need to be performed this month and are critical. Maintenance dates occuring one month from now and forwards (thus december at current time) should be marked in green as these are non-critical at current time.
Kind regards,
Renate