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 add Trendline to a chart in Excel
  • How to sum a total in multiple Excel tables
  • Understanding Pivot Tables in Excel
  • Conflicting Multiple Conditional Formatting Rules in Excel

References

  • Left Lookup in Excel
  • Get nth match with INDEX / MATCH in Excel
  • How to retrieve first match between two ranges in Excel
  • LOOKUP function: Description, Usage, Syntax, Examples and Explanation
  • How to use Excel FORMULATEXT function

Data Validations

  • Excel Data validation with conditional list
  • Excel Data validation don’t exceed total
  • Excel Data validation must contain specific text
  • Excel Data validation must not contain
  • Excel Data validation number multiple 100

How to determine year is a leap year in Excel

by

If you want to test whether the year of a certain date is a leap year, you can use a formula that uses the MONTH, YEAR, and DATE functions.

Formula

=MONTH(DATE(YEAR(date),2,29))=2

Explanation

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

=MONTH(DATE(YEAR(B5),2,29))=2

How the formula works

The core of this formula is the DATE function, which will automatically adjust to month and year values that are out of range. In the formula, year is passed into date unchanged, along with 2 for month (February) and 29 for the day. In leap years, February has 29 days, so the DATE function will simply return the date February 29 of the year.

In non-leap years however, DATE will return the date March 1 of the year, because there is no 29th day and DATE simply rolls the date forward into the next month.

Finally, MONTH simply extracts the month from the result provided by DATE, which is compared to 2 using the equal sign.

If month is 2, the formula returns TRUE. If not, the month must be 3 and the formula returns FALSE.

Just want to test a year?

If you just want to check if a year (i.e. 2015, 2016, etc.), modify the formula as follows:

=MONTH(DATE(year,2,29))=2

A more literal solution

If the formula above seems to “clever” and you want a more literal solution, you can test if a year contains 366 days instead with this formula:

=DATE(YEAR(date)+1,1,1)-DATE(YEAR(date),1,1)

This formula generates two dates, then subtracts January 1st of the given year from January 1st of the next year.

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

  • Extract multiple matches into separate rows in Excel
  • IFERROR function: Description, Usage, Syntax, Examples and Explanation
  • TRUE function: Description, Usage, Syntax, Examples and Explanation
  • How to use IFS function in Excel
  • IFNA function: Description, Usage, Syntax, Examples and Explanation

Date Time

  • Convert Excel time to decimal minutes
  • HOUR function: Description, Usage, Syntax, Examples and Explanation
  • Extract time from a date and time in Excel
  • Get days between dates in Excel
  • Display Days until expiration date in Excel

Grouping

  • Group arbitrary text values in Excel
  • If cell contains one of many things in Excel
  • Group numbers with VLOOKUP in Excel
  • Group times into 3 hour buckets in Excel
  • How to randomly assign people to groups in Excel

General

  • Split Cell Content Using Text to Columns in Excel
  • Automatically fill series of cells in Excel using AutoFill
  • How to calculate percent of students absent in Excel
  • Find, Select, Replace and Go To Special in Excel
  • Find, Trace and Correct Errors in Excel Formulas using ‘Formula Auditing’
© 2026 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning