Thread: Leap Year
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Greg Prost Greg Prost is offline
external usenet poster
 
Posts: 4
Default Leap Year

=int((DATEDIF(A1,NOW(),"d"))/365.25)

This is currently used for a persons age. Their birth day
goes in A1,the (DATEDIF(A1,NOW(),"d") function finds out
how many days old they are. The rest assumes that if
there is one leap day every four years then that's 0.25
per year, hence "/365.25".

this works well enogh for our needs as the int function
sorts most problems out,

hth
greg