Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an Excel Question:

I have quarterly dates in Row 1, and I have "new capital committed" values in Row 4, and I am writing formulas in the columns (A-Z).

Is there any way to write a formula that gives me the difference (in months) between the current quarter I am in and the quarter in which the capital was committed?

For example: If cell D1 has 6/30/2013 in it, and cell A4 has 9/30/2012 in it, is there a formula that I can use to get the number of months difference between those two dates, USING a dynamic formula so I can copy and past the formula to other parts of the excel file?

Thank you!


share|improve this question

migrated from Jun 26 '13 at 0:35

This question came from our site for professional and enthusiast programmers.

Try this: =(year(d1) - year(a4)) * 12 + (month(d1) - month(a4)) – Barranka Jun 25 '13 at 23:00
I have to tell you: you should at least try to solve your problem yourself and post your efforts, so we can help you. Besides that, this is not a programming related question (which is the scope of this site) – Barranka Jun 25 '13 at 23:02
This is a software use question, and is more appropriate for Super User. – Ken White Jun 25 '13 at 23:27

DATEDIF function gives you the number of full months between two dates, e.g.


It's not very well documented in Excel -see here

share|improve this answer

You must log in to answer this question.