Calculate number of months

  • Thread starter Thread starter TxWebDesigner
  • Start date Start date
T

TxWebDesigner

Hello,

I have a field where I am trying to implement a calculation. I want it to
take the date in a cell and subtract it from today's date to show me the
total number of months between those two dates. So right now, it looks like
=(TODAY())-D3 and it returns 167 - the total number of days. How do I make
it show me months?

THANK YOU IN ADVANCE
 
=((YEAR(TODAY())*12)+MONTH(TODAY()))-((YEAR(D3)*12)+MONTH(D3))

Then Format->Cells->Number->Custom = 0 "months"

....should work for just about anything.
 
Does it cross over Year-to-year?
What about something like 11/1/2008 to 2/28/2009?

If so, you may want to have your formula be:

=Month(Today())-Month(D3) + 12 * Year(Today())-Year(D3)
 
Try using the undocumented DATEDIF function...

=DATEDIF(D3,TODAY(),"m")

where the first argument's date must be an earlier (or equal) date than the
second argument's date.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Excel Message box with days of month & date. 1
Looking formula that gives total of remaining months 6
Calculations 3
Excel Sumproduct 0
Excel Getting an annualized figure based on YTD in Excel 1
Complicated Date Calculation needed 5
Counting Numbers 26
IF(AND 3

Back
Top