## Excel Formula: Get First or Last Day of Previous Month

In this tutorial, it provides formulas to get the first or last day of previous month in Excel.

### Get first day of previous month

Generic formula:

 EOMONTH(date,-2)+1

Syntaxt and Arguments

 Date: the date that you want to get the first day of its previous month.

Return Value

It returns a value in date format.

Error Value

If the date is not a valid date (a date before 1/1/1900 or is a text value), the formula returns the error value #VALUE!.

How this formula works

To get the first day of previous month of the date in cell B3, please use below formula:

 =EOMONTH(B3,-2)+1

Press Enter key to get the result.

Explanation

EOMONTH function: gets the last day of month n months in future or past.

The formula EOMONTH(B3,-2) returns the last day of previous 2 months. Then plus 1 to get the first day of previous 1 month.

### Get last day of previous month

Generic Formula

 EOMONTH(date,-1)

Syntax and Arguments

 Date: the date that you want to get the last day of its previous month based on.

Return Value

It returns a numeric value. For reading date more visually, you can format the result as date format.

Error Value

If the argument date is not a valid date (a date before 1/1/1900 or is a text value), the formula returns the error value #VALUE!.

How the formula works

To get the last day of previous month of the date in cell B3, please use below formula:

 =EOMONTH(B3,-1)

Press Enter key to get the result.

Then under Home tab, in the Number group, click the drop-down list of Number Format to choose Short Date or Long Date as you need.

Explanation

EOMONTH function: gets the last day of month n months in future or past.

### The Best Office Productivity Tools

#### Kutools for Excel - Helps You To Stand Out From Crowd

 Popular Features: Find, Highlight or Identify Duplicates  |  Delete Blank Rows  |  Combine Columns or Cells without Losing Data  |  Round without Formula ... Super VLookup: Multiple Criteria  |  Multiple Value  |  Across Multi-Sheets  |  Fuzzy Lookup... Adv. Drop-down List: Easy Drop Down List  |  Dependent Drop Down List  |  Multi-select Drop Down List... Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Columns to Select Same & Different Cells ... Featured Features: Grid Focus  |  Design View  |  Big Formula Bar  |  Workbook & Sheet Manager | Resource Library (Auto Text)  |  Date Picker  |  Combine Worksheets  |  Encrypt/Decrypt Cells  |  Send Emails by List  |  Super Filter  |  Special Filter (filter bold/italic/strikethrough...) ... Top 15 Toolsets:  12 Text Tools (Add Text, Remove Characters ...)  |  50+ Chart Types (Gantt Chart ...)  |  40+ Practical Formulas (Calculate age based on birthday ...)  |  19 Insertion Tools (Insert QR Code, Insert Picture from Path ...)  |  12 Conversion Tools (Numbers to Words, Currency Conversion ...)  |  7 Merge & Split Tools (Advanced Combine Rows, Split Excel Cells ...)  |  ... and more

Kutools for Excel Boasts Over 300 Features, Ensuring That What You Need is Just A Click Away...

#### Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)

• One second to switch between dozens of open documents!
• Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
• Increases your productivity by 50% when viewing and editing multiple documents.
• Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Edge and Firefox.