Formula for getting the last day of the month

…a quick tip that you may find useful in your applications…

I have spreadsheets that produce journal entries that I can then import into the general ledger. I reuse these spreadsheets every month.  I always make the effective date the last day of the month. To make it easy on myself (why not), I just enter the first day of the month in the cell above, and use this handy formula:


Cell A1:
Cell A2:
Results of formula
How it works

It takes the date (6/1/2017), then makes it the first day of the next month (7/1/2017), then subtracts one day, making it 6/30/2017.