Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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!

R1

share|improve this question

migrated from stackoverflow.com Jun 26 '13 at 0:35

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

2  
Try this: =(year(d1) - year(a4)) * 12 + (month(d1) - month(a4)) –  Barranka Jun 25 '13 at 23:00
2  
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

1 Answer 1

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

=DATEDIF(A4,D1,"m")

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.