sujittalukde
Well-known Member
- Joined
- Jun 2, 2007
- Messages
- 520
In cell A1 date is 30/09/2007
In cell A2 date is 29/10/2007
In cell A3 Formula is =DATEDIF(A1,A2,"m") and the Answer is 0 and the result is correct and this also I want.
However if the date in cell A2 is changed to 30/10/2007 the result in Cell A3 comes to 1 which I want to show 0 instead of 1 ie difference between the months.
Also if the date is 02/11/2007 the result is 1 whereas I want 2.
I tried to change the formula at Cell A4 with this
=MONTH(A2)-MONTH(A1)
here the result comes correct till there is no change of year. If the date in cell A2 is changed to 20/01/2008 the result changed to -8 whereas I want the result to show 4 as Answer.
What adjustment has to be made in the formula to get the difference between the month and suitably adjust for year change.
In cell A2 date is 29/10/2007
In cell A3 Formula is =DATEDIF(A1,A2,"m") and the Answer is 0 and the result is correct and this also I want.
However if the date in cell A2 is changed to 30/10/2007 the result in Cell A3 comes to 1 which I want to show 0 instead of 1 ie difference between the months.
Also if the date is 02/11/2007 the result is 1 whereas I want 2.
I tried to change the formula at Cell A4 with this
=MONTH(A2)-MONTH(A1)
here the result comes correct till there is no change of year. If the date in cell A2 is changed to 20/01/2008 the result changed to -8 whereas I want the result to show 4 as Answer.
What adjustment has to be made in the formula to get the difference between the month and suitably adjust for year change.