うるう年を判別する方法 – Microsoft 365 アプリ

この記事では、Microsoft Excelで使用される日付の年がうるう年であるかどうかを判断する方法について説明しています。Excelは1582年に制定されたグレゴリオ暦を基にしており、通常の年は365日、うるう年は4年ごとに366日です。100で割り切れる年は400でも割り切れない限りうるう年とはみなされません。1900年はその例で、うるう年とはされないが、Microsoft Excelでは互換性のためにうるう年として扱われます。うるう年の判断方法と数式も紹介されています。

Excelでのうるう年の判定方法

この記事では、Microsoft Excel文書で使用される日付の年がうるう年であるかどうかを判定する方法について説明します。

概要

Excelで

————-

Method to determine whether a year is a leap year – Microsoft 365 Apps

Source link

The article provides guidance on how to determine whether a year is a leap year in Microsoft Excel, which uses the Gregorian calendar established in 1582. In this calendar, a regular year has 365 days, while a leap year has 366 days and occurs every four years, except for certain exceptions:

  1. A year is a leap year if it is evenly divisible by 4.
  2. However, if it is divisible by 100, it must also be divisible by 400 to be considered a leap year.

Examples of leap years include 1988 and 2000, while 1900 is not a leap year despite being divisible by 100 but not by 400.

The article also notes that earlier versions of Excel treat the year 1900 as a leap year for compatibility, even though it shouldn’t be according to the leap year rules.

To determine if a year (in cell A1) is a leap year, the article provides the following Excel formula:

=IF(OR(MOD(A1,400)=0,AND(MOD(A1,4)=0,MOD(A1,100)<>0)),"Leap Year", "NOT a Leap Year")

This formula correctly identifies leap years based on the outlined criteria. For example, the formula will return "Leap Year" for 1992 and 2000, but "NOT a Leap Year" for 1900.

関連記事

コメント

この記事へのコメントはありません。