ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   About calculate months between two date (date function) (https://www.excelbanter.com/excel-discussion-misc-queries/128956-about-calculate-months-between-two-date-date-function.html)

Hank

About calculate months between two date (date function)
 
Hi, I find out there is no direct function to calculate total months between
two dates, such as I want to calculate how many month from an start date to
year end date (like 12/31/2006), I do figure out the date function but it
looks very complicated, is any easy way?? mine is

=(YEAR(12/31/2006)-YEAR(1/1/2003))*12+(12-MONTH(1/1/2003))+1

the total month is 48, is any easy way???

THANKS
Hank

Dave F

About calculate months between two date (date function)
 
Use the DATEDIF function: http://www.cpearson.com/excel/datedif.htm

Dave
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.


"Hank" wrote:

Hi, I find out there is no direct function to calculate total months between
two dates, such as I want to calculate how many month from an start date to
year end date (like 12/31/2006), I do figure out the date function but it
looks very complicated, is any easy way?? mine is

=(YEAR(12/31/2006)-YEAR(1/1/2003))*12+(12-MONTH(1/1/2003))+1

the total month is 48, is any easy way???

THANKS
Hank


Dave Peterson

About calculate months between two date (date function)
 
First, you'd want to refer to dates like:

date(2006,12,31)

12/31/2006 is 12 divided by 31 divided by 2006.

But to answer your real question, maybe using =datedif() would help.

Except for xl2k, this function doesn't appear in xl's help.

Chip Pearson has some very nice notes:
http://www.cpearson.com/excel/datedif.htm

Hank wrote:

Hi, I find out there is no direct function to calculate total months between
two dates, such as I want to calculate how many month from an start date to
year end date (like 12/31/2006), I do figure out the date function but it
looks very complicated, is any easy way?? mine is

=(YEAR(12/31/2006)-YEAR(1/1/2003))*12+(12-MONTH(1/1/2003))+1

the total month is 48, is any easy way???

THANKS
Hank


--

Dave Peterson


All times are GMT +1. The time now is 10:22 PM.

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