Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Dave
 
Posts: n/a
Default I want to subtract 2 dates and display the result as months

I am trying to subtract 2 dates and return the result as number of months.

I have seen post related to DateDif but whne I use this I get a Name error.

How do I subtract dates and get number of months?

Thanks

Dave


  #3   Report Post  
Ragdyer
 
Posts: n/a
Default

Start date in A1,
End date in B1,
Try this:

=DATEDIF(A1,B1,"m")

For an explanation of the function, check out Chip Pearson's web page:

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

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"Dave" wrote in message
...
I am trying to subtract 2 dates and return the result as number of months.

I have seen post related to DateDif but whne I use this I get a Name

error.

How do I subtract dates and get number of months?

Thanks

Dave



  #4   Report Post  
Dave
 
Posts: n/a
Default

Thank you both - this works!


"Ragdyer" wrote in message
...
Start date in A1,
End date in B1,
Try this:

=DATEDIF(A1,B1,"m")

For an explanation of the function, check out Chip Pearson's web page:

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

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"Dave" wrote in message
...
I am trying to subtract 2 dates and return the result as number of
months.

I have seen post related to DateDif but whne I use this I get a Name

error.

How do I subtract dates and get number of months?

Thanks

Dave





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 do I display months and years between two dates JSmith Excel Discussion (Misc queries) 1 November 30th 04 04:41 PM
Combine & Display “Fixed” & “Automatically Updated” Date Parts texcel Excel Worksheet Functions 1 November 1st 04 05:38 PM


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

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

About Us

"It's about Microsoft Excel"