Solved

Calculate difference in dates in excel

Posted on 2013-02-05
6
363 Views
Last Modified: 2013-02-05
i have one column A in which we have date suppose 1-1-2006 and in another column B we have another date suppose 31-5-2006. we want that in column C, it will automatically calculate the difference in months between two columns. So the result in column C will be 5.

kindly help
0
Comment
Question by:edreamers
  • 3
  • 2
6 Comments
 
LVL 39

Accepted Solution

by:
nutsch earned 500 total points
ID: 38856363
If your dates are going to be first of the month, last of the month, use
=ROUND((B1-A1)/30,0)

Thomas
0
 
LVL 23

Expert Comment

by:NBVC
ID: 38856398
or possibly:

=DATEDIF(A1,B1,"m")+1
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 38856399
DATEDIF can be used to calculate the number of months between 2 dates, e.g.

=DATEDIF(A1,B1+1,"m")

regards, barry
0
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 
LVL 50

Expert Comment

by:barry houdini
ID: 38856405
@NBVC - looks like I'm stalking you!
0
 
LVL 23

Expert Comment

by:NBVC
ID: 38856448
And vice-versa, LOL.

Maybe we're both bored :(
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 38856808
>=ROUND((B1-A1)/30,0)

Thomas's suggested formula might not give you the desired results if A1 and B1 are further apart than a few months, e.g. 1-1-2006 to 31-12-2008 results in 37

regards, barry
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

785 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