Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,670
Default How to determine the number of month between 2 periods?

Does anyone know how to determine the number of month between 2 periods? such
as
23 Feb, 2006 and 1 Apr, 2006, it returns 2 months difference and not
counting the starting day. And always start to count Feb, 2006 and Apr, 2006.
Does anyone have any suggestion?
Thank you in advance
Eric
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,101
Default How to determine the number of month between 2 periods?

If I understand correctly then you want the difference between 2 dates
including the start and end date i.e. 1/1/2007 - 30/9/2007 would return 9. If
my understanding is correct then this will do it.

=(YEAR(B1)-YEAR(C1))*12+MONTH(B1)-MONTH(C1)+1

Note you will have to change the cell format to General after entering this.

Mike

"Eric" wrote:

Does anyone know how to determine the number of month between 2 periods? such
as
23 Feb, 2006 and 1 Apr, 2006, it returns 2 months difference and not
counting the starting day. And always start to count Feb, 2006 and Apr, 2006.
Does anyone have any suggestion?
Thank you in advance
Eric

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,624
Default How to determine the number of month between 2 periods?

One place to start is

A1: 23 Feb 2006
B1: 1 Apr 2006
C1: =DATEDIF(A1,B1,"m")

However, you need to be careful when it comes to how "month" is defined.
Is 31 January 2007 to 28 February 2007 one month? or zero? (Datedif
returns 0)


In article ,
Eric wrote:

Does anyone know how to determine the number of month between 2 periods? such
as
23 Feb, 2006 and 1 Apr, 2006, it returns 2 months difference and not
counting the starting day. And always start to count Feb, 2006 and Apr, 2006.
Does anyone have any suggestion?
Thank you in advance
Eric

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,670
Default How to determine the number of month between 2 periods?

Thank you for your suggestion
Eric

"Mike" wrote:

If I understand correctly then you want the difference between 2 dates
including the start and end date i.e. 1/1/2007 - 30/9/2007 would return 9. If
my understanding is correct then this will do it.

=(YEAR(B1)-YEAR(C1))*12+MONTH(B1)-MONTH(C1)+1

Note you will have to change the cell format to General after entering this.

Mike

"Eric" wrote:

Does anyone know how to determine the number of month between 2 periods? such
as
23 Feb, 2006 and 1 Apr, 2006, it returns 2 months difference and not
counting the starting day. And always start to count Feb, 2006 and Apr, 2006.
Does anyone have any suggestion?
Thank you in advance
Eric

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default How to determine the number of month between 2 periods?

That's OK providing that you realise that 1/1/07 to 31/1/07 is one month,
but 31/1/07 to the following day, 1/2/07, is 2 months.
--
David Biddulph

"Mike" wrote in message
...
If I understand correctly then you want the difference between 2 dates
including the start and end date i.e. 1/1/2007 - 30/9/2007 would return 9.
If
my understanding is correct then this will do it.

=(YEAR(B1)-YEAR(C1))*12+MONTH(B1)-MONTH(C1)+1

Note you will have to change the cell format to General after entering
this.

Mike

"Eric" wrote:

Does anyone know how to determine the number of month between 2 periods?
such
as
23 Feb, 2006 and 1 Apr, 2006, it returns 2 months difference and not
counting the starting day. And always start to count Feb, 2006 and Apr,
2006.
Does anyone have any suggestion?
Thank you in advance
Eric





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,670
Default How to determine the number of month between 2 periods?

Thank everyone for suggestions
I try to ignore the day and count the month only on my approach
Thank everyone
Eric

"JE McGimpsey" wrote:

One place to start is

A1: 23 Feb 2006
B1: 1 Apr 2006
C1: =DATEDIF(A1,B1,"m")

However, you need to be careful when it comes to how "month" is defined.
Is 31 January 2007 to 28 February 2007 one month? or zero? (Datedif
returns 0)


In article ,
Eric wrote:

Does anyone know how to determine the number of month between 2 periods? such
as
23 Feb, 2006 and 1 Apr, 2006, it returns 2 months difference and not
counting the starting day. And always start to count Feb, 2006 and Apr, 2006.
Does anyone have any suggestion?
Thank you in advance
Eric


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to determine the number of workday between two periods? Eric Excel Worksheet Functions 1 February 12th 07 07:17 AM
How to determine the number of workday between two periods? Eric Excel Discussion (Misc queries) 1 February 12th 07 07:12 AM
calculating number of three month periods between two dates... neil Excel Discussion (Misc queries) 3 May 21st 06 01:52 PM
working out quarters (three-month periods) between two dates [email protected] Excel Worksheet Functions 1 May 17th 06 10:27 AM
Calculating number of periods when payment amount changes Dan Patrick Excel Worksheet Functions 1 August 2nd 05 05:57 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"