The last & the first day of a month in Google Spreadsheets

mike1789 picture mike1789 · Jun 29, 2015 · Viewed 25.9k times · Source

What is the way to get the first and last day of the previous month in Google Spreadsheet? I tried several ways to solve this issue with no success.

Answer

ZygD picture ZygD · Jun 29, 2015

If you had your base date in A1,
the following formula would be good for the first day of the previous month:

=date(year(A1),month(A1)-1,1)

It's even simpler to find the last day of the previous month:

=eomonth(A1,-1)