Thread: Leap Year
View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
[email protected] vezerid@act.edu is offline
external usenet poster
 
Posts: 15
Default Leap Year

1)
=IF(O8="February",IF(MOD(S8,400)=0,29,IF(MOD(S8,10 0)=0,0,IF(MOD(S8,4)
=0,29,0))),29)

2)
=IF(OR(O8={"February","September","April","June"," November"},0,31)

HTH
Kostis Vezerides

On Apr 29, 5:34*pm, BadBoy wrote:
Good morning folks,

I have two problems perhaps you may be able to help with.

1) - In the formula below, I wonder if you can help with the following;

If February is in cell O8 and its a leap year, put the number 29 in cell S8,
if not a leap year, put 0 and if any other month regardless if its a leap
year or not, put the number 29.

=IF(O8="February",DAY(DATE(S8,3,0)),29)

2) - In the formula below, if any of the months mentioned below are in cell
O8, place the number 0 in cell O8, otherwise put 31 in cell O8

=If (O8="February","September","April","June","Novembe r",0,31)

Any help you may offer will be much appreciated.

-Bad