#1
|
|||
|
|||
Formula to calculate Leap Year
I need a formula that will calculate if a year that falls with in a fiscal (financial) year is a Leap Year or not.
For example if I enter the start date for a fiscal year in a cell (e.g. 1 July 2011) and the end date of the fiscal year in another cell (e.g. 30 June 2012) I'd like a message to be displayed in the formula cell saying "Leap Year" if ANY part of the date range falls in a Leap Year (as it would in this example) or a blank cell (no text) if the entire date range does NOT fall in any Leap Year. Any ideas on how this calculation could be done? |
#2
|
||||
|
||||
Hi,
This article from MS shows how to calculate if a given year is a leap year: Code:
http://support.microsoft.com/kb/214019 =IF(OR(MOD(A1,400)=0,AND(MOD(A1,4)=0,MOD(A1,100)<>0)),"Leap Year", "NOT a Leap Year") Code:
=IF(OR(MOD(YEAR(A2),400)=0,AND(MOD(YEAR(A2),4)=0,MOD(YEAR(A2),100)<>0)),"Leap Year", "") |
#3
|
|||
|
|||
Thank you VERY much - you're a legend!
|
Tags |
fiscal year, leap year |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Over allocated with only 1300 hours in a year?!!! | msproject2010 | Project | 1 | 08-01-2011 04:29 AM |
Creative Ways for a year-to-year comparison??? | ridonkulous5 | Excel | 1 | 03-23-2011 04:49 PM |
Year | janak | Excel | 6 | 12-12-2010 10:08 PM |
Can't calculate formulas | Cpat | Excel | 2 | 06-09-2010 02:07 PM |
How to get cells to calculate time? | jrasche2003@yahoo.com | Excel | 2 | 02-09-2007 07:10 AM |