ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   HOW TO SUBTRACT A YEAR+MONTH AND SHOW DIF IN MONTHS? (https://www.excelbanter.com/excel-worksheet-functions/48108-how-subtract-year-month-show-dif-months.html)

noles fan

HOW TO SUBTRACT A YEAR+MONTH AND SHOW DIF IN MONTHS?
 
I really need fast help on this one. Pretty good with formulas but this is
kicking my butt. i will show an example of what i need. Thank you all ahead
of time for the help.

2005 09
- 2004 10

answer i need to show is 11.

Roger Govier

Hi

Provided you are using true dates, then with 01/09/2005 in A1 and
01/10/2004 in A2
=DATEDIF(A2,A1,"ym")

If you want to disply 2005 09 then even with date entered in A1 as
01/09/2005 you can use
FormatCellsNumberCustom and set the format as yyyy mm

Regards

Roger Govier



noles fan wrote:

I really need fast help on this one. Pretty good with formulas but this is
kicking my butt. i will show an example of what i need. Thank you all ahead
of time for the help.

2005 09
- 2004 10

answer i need to show is 11.



Barb Reinhardt

How are the dates entered in the cells? Are they true dates, or a one cell
has the year and another has the month?

"noles fan" <noles wrote in message
...
I really need fast help on this one. Pretty good with formulas but this is
kicking my butt. i will show an example of what i need. Thank you all
ahead
of time for the help.

2005 09
- 2004 10

answer i need to show is 11.





All times are GMT +1. The time now is 03:13 AM.

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