ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Formula for number of years in 750 days (https://www.excelbanter.com/excel-discussion-misc-queries/223487-formula-number-years-750-days.html)

wrong way carrigan

Formula for number of years in 750 days
 
Number of Years
Balance of days in Months
then days left

joel

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


Rick Rothstein

Formula for number of years in 750 days
 
You have not provided enough "controls" on your data to give you an answer.
Think about it. What day did you start on? In which month? Since the number
of days per month is not constant, nor is the number of days in a year
(think Leap Years), we would need to now what date you want the calculation
to start from (the month, day *and* year) in order to give you the answer
you want.

--
Rick (MVP - Excel)


"wrong way carrigan" <wrong way wrote in
message ...
Number of Years
Balance of days in Months
then days left



Shane Devenshire

Formula for number of years in 750 days
 
Hi,

Here is one solution

=YEARFRAC(--"1/1/09",--"1/1/09"+750,1)

An alternative is to use the DATEDIF function, and since you didn't give us
a starting date:

=DATEDIF(--"1/1/09",--"1/1/09"+750,"Y") whole years
=DATEDIF(--"1/1/09",--"1/1/09"+750,"YM") whole months left over
=DATEDIF(--"1/1/09",--"1/1/09"+750,"MD") days left over


--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"wrong way carrigan" wrote:

Number of Years
Balance of days in Months
then days left



All times are GMT +1. The time now is 02:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com