Solved

Count months between 2 dates

Posted on 2012-03-21
4
296 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

820 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