How to determine if year is a leap year
This is very interesting! Same functionality as End of Month function,
without requesting Analysis Toolpak! How could you find this method of usage?
Help doesn't say anything about it!
Regards,
Stefi
€˛Peo Sjoblom€¯ ezt Ć*rta:
Year in A3
=DAY(DATE(A3,3,))=29
will return TRUE for leap years
--
Regards,
Peo Sjoblom
"Wanda" wrote in message
...
I'm working on a spreadsheet where I have the month in a cell (dropdown
list
from a range called "Months"). Based on what month is in this cell,
another
cell has the number of days in that particular month (Range named "Days").
The year is in another cell. I need to write a formula that determines if
the year is a leap year, so that February contains 29 days instead of 28.
Here's what I have so far:
CellA1: Month (validated to list of 12 months--Range=Months)
CellA2: # of days in month in Cell A1 (Index(days(match(a1,months,0))
CellA3: Year
I'm thinking that, in the cell that corresponds to the number of days in
February, I write a formula that says: If the number in A3(the year) is
evenly divisible by 4 (and thus a leap year), then cell value = 29, else
cell
value =28.
As always, all assistance is appreciated!
|