?
Solved

calculating the number sof months between to dates

Posted on 2011-03-04
4
Medium Priority
?
305 Views
Last Modified: 2012-05-11
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
Comment
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
  • Learn & ask questions
  • 2
4 Comments
 
LVL 59

Accepted Solution

by:
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

by:jimyX
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

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

Author Comment

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

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
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 longer labels with horizontal bar charts instead of the vertical column chart.

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question