#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
billy
 
Posts: n/a
Default Counting Dates

Hi,

I have two dates: 1/1/01 & 5/25/04
How can i write a formula that will show the number of months from 1/1/01
thru 5/25/04? This should show 53. I don't need days but months.

Thanks,
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
goober
 
Posts: n/a
Default Counting Dates


A3=end date
A2=start date

=MONTH(A3)-MONTH(A2)
Months between two dates in the same year


=(YEAR(A3)-YEAR(A2))*12+MONTH(A3)-MONTH(A2)
Months between two dates over a year apart


Hope it helps


--
goober
------------------------------------------------------------------------
goober's Profile: http://www.excelforum.com/member.php...o&userid=19838
View this thread: http://www.excelforum.com/showthread...hreadid=496569

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom
 
Posts: n/a
Default Counting Dates

=DATEDIF(A1,B1,"m")


with 1/1/2001 in A1 and 5/25/2004 in B1

for info about datedif

http://www.cpearson.com/excel/datedif.htm

don't know where you got 53 from? It's either 40 or 41 depending on how you
count

--
Regards,

Peo Sjoblom

(No private emails please)


"billy" wrote in message
...
Hi,

I have two dates: 1/1/01 & 5/25/04
How can i write a formula that will show the number of months from 1/1/01
thru 5/25/04? This should show 53. I don't need days but months.

Thanks,


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Govind
 
Posts: n/a
Default Counting Dates

Hi,

You can try the formula =DATEDIF(Start date,end date,"m"). For eg, where
Start date is in cell A1 and end date in cell B1, use =DATEDIF(A1,B1,"m").

However, this formula would compute only completed months elapsed
between start date and end date.

Regards

Govind.

billy wrote:
Hi,

I have two dates: 1/1/01 & 5/25/04
How can i write a formula that will show the number of months from 1/1/01
thru 5/25/04? This should show 53. I don't need days but months.

Thanks,

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld
 
Posts: n/a
Default Counting Dates

On Wed, 28 Dec 2005 18:11:02 -0800, "billy"
wrote:

Hi,

I have two dates: 1/1/01 & 5/25/04
How can i write a formula that will show the number of months from 1/1/01
thru 5/25/04? This should show 53. I don't need days but months.

Thanks,


How can there be 53 months from 1 January 2001 to 25 May 2004 given that there
are only twelve months in a year???


--ron


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
billy
 
Posts: n/a
Default Counting Dates

All.

Thanks for responding to my question with an answer. I actually meant 41
months instead of 53. I added an extra year. Sorry for the confusion. :(

"billy" wrote:

Hi,

I have two dates: 1/1/01 & 5/25/04
How can i write a formula that will show the number of months from 1/1/01
thru 5/25/04? This should show 53. I don't need days but months.

Thanks,

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld
 
Posts: n/a
Default Counting Dates

On Wed, 28 Dec 2005 20:07:02 -0800, "billy"
wrote:

All.

Thanks for responding to my question with an answer. I actually meant 41
months instead of 53. I added an extra year. Sorry for the confusion. :(

"billy" wrote:

Hi,

I have two dates: 1/1/01 & 5/25/04
How can i write a formula that will show the number of months from 1/1/01
thru 5/25/04? This should show 53. I don't need days but months.

Thanks,


OK, but there are still issues in your specifications.

For example, in your dates, May is not a full month, so the number of full
months is actually 40 and not 41. How do you want to resolve this?

And on a related note, how do you want to resolve month counts if the start
date does not begin at the first day of the month?

e.g. How many months between 1/15/05 and 3/3/05?


--ron
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
Counting dates for a the present month but not future months BrianInCalifornia Excel Worksheet Functions 3 December 7th 05 02:00 AM
Counting individual dates Robin Excel Discussion (Misc queries) 5 June 15th 05 07:02 PM
Counting dates in a column Robb27 Excel Worksheet Functions 4 May 25th 05 09:31 AM
How to Calculate Dates without counting the weekends Lillian F Excel Worksheet Functions 9 January 24th 05 09:09 AM
counting entries between two dates? Todd Excel Worksheet Functions 7 November 1st 04 11:07 PM


All times are GMT +1. The time now is 01:24 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"