LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 36
Default How to determine if year is a leap year

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!
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Leap year indicator Robert Excel Worksheet Functions 5 May 19th 06 08:43 AM
Leap year date P M Robbins Excel Discussion (Misc queries) 5 March 30th 06 10:33 PM
1900 not a leap year JasonC Excel Worksheet Functions 1 March 30th 06 02:54 AM
Leap Year Blues Mike Excel Discussion (Misc queries) 2 March 10th 06 04:26 PM
leap year question tiw Excel Discussion (Misc queries) 5 April 20th 05 07:49 PM


All times are GMT +1. The time now is 04:16 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"