Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
Solved

# calculating the number sof months between to dates

Posted on 2011-03-04
Medium Priority
306 Views
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
Question by:route217
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points
• 2

LVL 59

Accepted Solution

Saurabh Singh Teotia earned 1000 total points
ID: 35034696

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

LVL 24

Expert Comment

ID: 35034724
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

LVL 24

Assisted Solution

jimyX earned 1000 total points
ID: 35034731
or you can round it:
=Round((B1-A1)/30) or =Roundup((B1-A1)/30)
0

Author Comment

ID: 35034741
Thanks for the feed back let me test to see end result
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
###### Suggested Courses
Course of the Month10 days, 14 hours left to enroll