A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

subtracting 2 dates and put the result in difference in months ?



 
 
Thread Tools Display Modes
  #1  
Old March 7th, 2009, 07:29 PM posted to microsoft.public.excel.worksheet.functions
Susan
external usenet poster
 
Posts: 651
Default subtracting 2 dates and put the result in difference in months ?

I have dates in the format of 29-Jan-04 and need to work out the difference
from this date to another IN MONTHS

e.g.
25-Sep-95 to 29-Jan-04 = how many months?
Answer = 100 but need formula so i dont have to do it one by one - i have
thousands to do - please help?
  #2  
Old March 7th, 2009, 08:10 PM posted to microsoft.public.excel.worksheet.functions
Mike H
external usenet poster
 
Posts: 8,419
Default subtracting 2 dates and put the result in difference in months ?

Hi,

With the earlier date in a1 try

=DATEDIF(A1,B1,"m")

datedif isn't documented in Excel so have a look here

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

Mike


"Susan" wrote:

I have dates in the format of 29-Jan-04 and need to work out the difference
from this date to another IN MONTHS

e.g.
25-Sep-95 to 29-Jan-04 = how many months?
Answer = 100 but need formula so i dont have to do it one by one - i have
thousands to do - please help?

  #3  
Old March 7th, 2009, 08:34 PM posted to microsoft.public.excel.worksheet.functions
Tom Hutchins
external usenet poster
 
Posts: 722
Default subtracting 2 dates and put the result in difference in months ?

If you want to see partial months (as a decimal value), you could use

=DAYS360(A1,B1)/30

To return whole months (rounding up), you could use

=ROUND(DAYS360(A1,B1)/30,0)

To return whole months (rounding down), you could use

=TRUNC(DAYS360(A1,B1)/30)

This last version gives the same results as DATEDIF, I believe.

Hope this helps,

Hutch

"Susan" wrote:

I have dates in the format of 29-Jan-04 and need to work out the difference
from this date to another IN MONTHS

e.g.
25-Sep-95 to 29-Jan-04 = how many months?
Answer = 100 but need formula so i dont have to do it one by one - i have
thousands to do - please help?

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


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


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