View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Formula for number of years in 750 days

Not a precicise answer sinc eyour can have 365 or 366 days per year and 28 -
31 days per month.

To get 750 day before todays date is simplly

=Today()-750

The years is

=Int((month(Today())-month(Today()-750))/12)

The months is

=Int(month(Today())-month(Today()-750))

The days after the number of months

=if(Day(Today())Day(Today()-750),Day(Today())-Day(Today()-750),EOM(Today()-750)-(Today()-750)+Day(Today())

This function check if the day of the month for Today is greater or less
then the Day of the month for 750 previous days.

If today is the 7th and 750 days previous is the 5 then the reults is 7 - 5
is 2 days

If today is the 7th and the previous 750 day is the 10th then

Go to the end of the month for 750 previous days which lets day is the 30th

Then the number of remaining days is

(30 - 10) + 7.

"wrong way carrigan" wrote:

Number of Years
Balance of days in Months
then days left