Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Formula for selecting a Leap Year.
Hello,
The first formula below checks to see if the word February is in one cell and the year 2012 in another and if so, will place the number 29 in another cell for me and if not, 28. =IF(AND('Monthly Totals'!L8="February",'Monthly Totals'!O8=2012),29,28) I am looking to create a formula that will look for the word February in one cell and one these following years. Not just 2012. 2012, 2016, 2020, 2024, 2028 If February has been selected from a drop window and as well, one of those years from another drop window, I wish the program to know that someone has selected a leap year and will place the date number 29 in a cell. Otherwise, the number 28. This formula works well but it only checks for the year 2012. =IF(AND('Monthly Totals'!L8="February",'Monthly Totals'!O8=2012),29,28) This formula does not work. =IF(AND('Monthly Totals'!L8="February",'Monthly Totals'!O8={2012,2016,2020,2024,2028}),29,28) Thank you in advance for any help you may have to offer. -Bad |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
IF formula to allow Feb 29th in a leap year | Excel Discussion (Misc queries) | |||
How do I change the following formula to allow for leap year | Excel Discussion (Misc queries) | |||
leap year | Excel Discussion (Misc queries) | |||
Leap Year | Charts and Charting in Excel | |||
How to determine if year is a leap year | Excel Worksheet Functions |