AndyKent
Member
Registered: 3rd Sep 05
User status: Offline
|
I need to get excel to calculate the number of months remaining from today, to a given month in the future. Anyone know how? I've searched the functions on Excel and got confused and google wasn't much help either.
Anyone know?
|
Ian
Site Administrator
Registered: 28th Aug 99
Location: Liverpool
User status: Online
|
MONTH() will give you month number, ie. Jan is 1, Feb is 2.
YEAR() gives you year as four digits, which you could subtract from YEAR(NOW()) and multiply it by 12 and add it to your MONTH() result.
You got example data?
|
AndyKent
Member
Registered: 3rd Sep 05
User status: Offline
|
Not really got any data, just a future date but I kinda I got round it in a complicated way with....
=ROUND(((DATE(2008,9,1)-TODAY())/30),0)
That equation works out the number of days since Epoch for today and september the 1st next year, takes one away from the other to give the number of days between today and next september.
It then divides the remaining days by 30 to get 11ish - the ROUND() sorts this into a whole number.
At the moment thats correct as there are eleven whole months left until next september but I think its a bit un-accurate because of the division by 30 as not every month has 30 obviously....
|
AndyKent
Member
Registered: 3rd Sep 05
User status: Offline
|
Crap, just realised what you meant.
So I do....
=(future month+(12*number of years)-current month)
so for this months to Sept 08 it would be...
=((9+(12*1))-10)
which is written as
=((MONTH(F8)+(12*(YEAR(F8)-YEAR(TODAY())))-MONTH(TODAY())))
Got there eventually, cheers
|