Solved

calculating the number sof months between to dates

Posted on 2011-03-04
4
303 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 250 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 250 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

726 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