ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Counting Dates (https://www.excelbanter.com/excel-worksheet-functions/62224-counting-dates.html)

billy

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,

goober

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


Peo Sjoblom

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,



Govind

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,


Ron Rosenfeld

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

billy

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,


Ron Rosenfeld

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


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

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