• Status: Solved
• Priority: Medium
• Security: Public
• Views: 313

# calculating the number sof months between to dates

Hi Experts

How would you acturally calculate the number of months between two dates:-

Col A                  Col B                  Col C
1 Feb 2011        30 April 2011      3 months

so the date in col A always has to be the start of the month and the date in col b the end of the month. (results in col C)

0
route217
• 2
2 Solutions

Commented:

Use this formula...

=DATEDIF(A1,B1,"ym")

Also this will give you answer as 2..since it will be 3 when the date in column B becomes 1st march 2011 which is correct.

Saurabh...
0

Commented:
You may use difference between dates and divide by 30, so in column c you put:
=(B1-A1)/30

make sure to format column c as numbers with 0 decimal places
0

Commented:
or you can round it:
=Round((B1-A1)/30) or =Roundup((B1-A1)/30)
0

Author Commented:
Thanks for the feed back let me test to see end result
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.