Excel Month difference count?

Soldato
Joined
28 Sep 2008
Posts
14,207
Location
Britain
Hi guys,

I have a spreadsheet with 3 columns. One is a start month, the other an end month. The 3rd needs to show the difference in the number of months as a figure. So, say col 1 had April, Col 2 had June, col3 shows "2"

Dooable?
 
You could just make a table referencing months to numbers, 1 -> Jan etc

Then a vlookup(<col 2>, <table ref>, 2, FALSE)-vlookup(<col 1>, <same table ref>, 2, FALSE)

Jobs a good'un?
 
Excel does have a DateDiff function, but for some reason only available to Macros :/

You can add this to your workbook, and get access to it through a function:

Code:
Function DateDifference(interval as String, d1 As Date, d2 As Date)
        DateDifference = DateDiff(interval, d1, d2)
End Function
 
Back
Top Bottom