Solved

Count months between 2 dates

Posted on 2012-03-21
4
293 Views
Last Modified: 2012-03-21
I have a HP schedule and I want to count the months between todays date and the month the asset was purchased and I would like it to update each time I open the file

I have attached the file

Thanks
0
Comment
Question by:recycleaus
  • 2
4 Comments
 
LVL 4

Accepted Solution

by:
ltsweb earned 500 total points
ID: 37750670
I didn't see an attachment.  Would this work for you:

today      Date Aquired      Days      Months      rounded
3/21/2012      2/21/2010      759.00      25.3      25
=today()      enter date      =+E4-F4      =+G4/30      =ROUND(D2,0)

1st line is header
2nd line is data
3rd line is the formula I used


To put today's date in excel is =today()
I used /30 to calculate months (do you need to know actual months?)

If you need exact months, attach your spreadsheet.

Regards!
0
 
LVL 8

Expert Comment

by:wchh
ID: 37750850
Another option:
=DATEDIF(A3,TODAY(),"m")
0
 
LVL 4

Expert Comment

by:ltsweb
ID: 37750894
WCHH, That is a good one too.
0
 

Author Comment

by:recycleaus
ID: 37750915
Yeh WCHH solution was good but I needed the months rounded up which is what the first solution was able to do

thanks to you both... i will remember the datedif for other application however
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
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…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

743 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now