Forum Discussion
MustangMuffin
Mar 27, 2022Copper Contributor
Trying to add a day to a last date of a month date ....
The image shows my formulas and their corresponding reference cells. As you can see, Friday, July 1st as a filename shows up as June 1 instead of July 1. I have tried multiple combinations (...
Starrysky1988
Mar 27, 2022Iron Contributor
Have you ever tried Eomonth function?
That function find the end of month with months offset forward or backwards.
=Eomonth("5 Jun 2022",-1)= 31 May 2022
=Eomonth("5 Jun 2022",0)= 30 Jun 2022
=Eomonth("5 Jun 2022",1)= 31 Jul 2022
=Eomonth("5 Jun 2022",-1)+1= 1 Jun 2022
=Eomonth("5 Jun 2022",0)+1= 1 July 2022
=Eomonth("5 Jun 2022",1)= 1 Aug 2022
That function find the end of month with months offset forward or backwards.
=Eomonth("5 Jun 2022",-1)= 31 May 2022
=Eomonth("5 Jun 2022",0)= 30 Jun 2022
=Eomonth("5 Jun 2022",1)= 31 Jul 2022
=Eomonth("5 Jun 2022",-1)+1= 1 Jun 2022
=Eomonth("5 Jun 2022",0)+1= 1 July 2022
=Eomonth("5 Jun 2022",1)= 1 Aug 2022