![]() |
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 |
Dave
=DATEDIF(A1,B1,"m") Works for me -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England HIS "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 |
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 |
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 |
All times are GMT +1. The time now is 08:38 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com