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

Data Analysis

  • How To Compare Two Lists in Excel
  • Conditional Formatting Data bars Examples in Excel
  • Filter Data Based on Date in Excel
  • Conditional Formatting Color Scales Examples in Excel
  • Managing Conditional Formatting Rules in Excel

References

  • How to get relative row numbers in a range in Excel
  • How to use Excel MMULT Function
  • How to use Excel OFFSET function
  • INDEX function: Description, Usage, Syntax, Examples and Explanation
  • Find closest match in Excel

Data Validations

  • Excel Data validation allow weekday only
  • Data validation must not exist in list
  • Excel Data validation unique values only
  • Excel Data validation number multiple 100
  • Excel Data validation only dates between

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

  • IFNA function: Description, Usage, Syntax, Examples and Explanation
  • How to use Excel FALSE Function
  • IFS function: Description, Usage, Syntax, Examples and Explanation
  • IF with boolean logic in Excel
  • IF, AND, OR and NOT Functions Examples in Excel

Date Time

  • WORKDAY.INTL function: Description, Usage, Syntax, Examples and Explanation
  • Get month name from date in Excel
  • How to calculate most recent day of week in Excel
  • Convert date to Julian format in Excel
  • Generate series of dates by weekends in Excel

Grouping

  • If cell contains one of many things in Excel
  • Group numbers with VLOOKUP in Excel
  • Calculate conditional mode with criteria in Excel
  • Group numbers at uneven intervals in Excel
  • How to randomly assign people to groups in Excel

General

  • How to count total columns in range in Excel
  • 3D SUMIF for multiple worksheets in Excel
  • Find, Trace and Correct Errors in Excel Formulas using ‘Formula Auditing’
  • How to calculate percentage discount in Excel
  • Convert column letter to number in Excel
© 2025 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning