Skip to content
Free Excel Tutorials
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Data Analysis

  • How to conditionally sum numeric data in an Excel table using SUMIFS
  • How To Create Pareto Chart in Excel
  • How to add Trendline to a chart in Excel
  • How to count table columns in Excel
  • Create Scatter Chart in Excel

References

  • Find closest match in Excel
  • LOOKUP function: Description, Usage, Syntax, Examples and Explanation
  • How to get address of first cell in range in Excel
  • How to use Excel MMULT Function
  • Complete List of Excel Lookup and Reference Functions, References and Examples

Data Validations

  • Excel Data validation only dates between
  • Excel Data validation date in specific year
  • Excel Data validation number multiple 100
  • Excel Data validation with conditional list
  • Excel Data validation must not contain

Get last day of month in Excel

by

If you want to calculate the last day of a month based on a given date, then this tutorials is for you.

The example below shows two different ways to achieve this.

First, use the EOMONTH function.

Formula

=EOMONTH(date,0)

Explanation

In the example shown, the formula in cell B5 is:

=EOMONTH(B5,0)

The 2nd argument (months) of the EOMONTH function allows you to get the last day of the month in future or past months. When you use zero for months, EOMONTH will return the last day of the month in the same month.

To get the last day of the prior month, use:

=EOMONTH(date,-1)

To get the last day of the next month, use:

=EOMONTH(date,1)

Although EOMONTH is a more convenient function, it won’t accept a range of dates in an array formula. In that case, you can also use the alternative below.

 Alternative formula

You can also write a formula using the DATE, YEAR and MONTH functions to return the last day of the month:

=DATE(YEAR(date),MONTH(date)+1,0)

The trick with this formula is supplying zero for the day. When you supply zero as the day argument to DATE, the date function will “roll back” one day to the last day of the previous month. So, by adding 1 to the month, and using zero for day, DATE returns the last day of the “original” month.

 

Post navigation

Previous Post:

DECIMAL function: Description, Usage, Syntax, Examples and Explanation

Next Post:

AVERAGE function: Description, Usage, Syntax, Examples and Explanation

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others

Logical Functions

  • IFERROR function: Description, Usage, Syntax, Examples and Explanation
  • How to use Excel OR Function
  • OR function: Description, Usage, Syntax, Examples and Explanation
  • SWITCH function example in Excel
  • How to use Excel XOR Function

Date Time

  • Get age from birthday in Excel
  • Get fiscal year from date in Excel
  • Convert Unix time stamp to Excel date
  • TIMEVALUE function: Description, Usage, Syntax, Examples and Explanation
  • Check If Two Dates are same month in Excel

Grouping

  • If cell contains one of many things in Excel
  • How to randomly assign people to groups in Excel
  • Running count group by n size in Excel
  • Group times into 3 hour buckets in Excel
  • Categorize text with keywords in Excel

General

  • Hide and Unhide Columns or Rows in Excel
  • Transpose: Switch ‘Rows to Columns’ or ‘Columns to Rows’ in Excel
  • Count cells that do not contain many strings in Excel
  • Count cells that contain errors in Excel
  • List worksheet index numbers in Excel
© 2026 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning