How to calculate the number of months between dates
The image above shows the DATEDIF function calculating the number of complete months between two dates. Column B and column C contains random dates.
Formula in cell D3:
Copy cell D3 and paste to cells below. The DATEDIF function requires the start date to be less than (earlier than) the end date, the function returns #NUM if not. It is the third argument that determines which unit to use. "M" is the abbreviation for the month unit.
Note that the DATEDIF function does not appear when you start typing the function, however, it is there don't worry. The same thing happens when you start typing the arguments, you get no guidance from Excel.
Dates basic formulas category
Question: I am trying to create an excel spreadsheet that has a date range. Example: Cell A1 1/4/2009-1/10/2009 Cell B1 […]
This article demonstrates how to return the latest date based on a condition using formulas or a Pivot Table. The […]
This article demonstrates how to match a specified date to date ranges. The image above shows a formula in cell […]
How do I automatically count dates in a specific date range? Array formula in cell D3: =SUM(IF(($A$2:$A$10<$D$2)*($A$2:$A$10>$D$1), 1, 0)) + […]
If you want to count specific weekdays like for example Mondays and Wednesdays you need a more complicated array formula. […]
I found an old post that I think is interesting to write about today. Think of two overlapping ranges, it […]
Shannon asks:I need a formula that if I enter a start date in field B1 such as 6/8/11 it will […]
The formula in cell C3 calculates the last date for the given month and year in cell B3. =DATE(YEAR(B3), MONTH(B3)+1, […]
Question: I have a column "B" with a last name.. I have another columb with a date in it "C"... […]
Excel contains a great function that easily counts the number of workdays between two dates, it even allows you to […]
The image above demonstrates the DATEDIF function calculating the number of complete years between two dates. Column B and column C […]
The image above shows a formula in cell D3 that extracts the most recent date in cell range B3:B15. =MAX(B3:B15) […]
The DATEDIF function in cell E3 allows you to calculate days between two dates.
This article demonstrates Excel formulas that calculate complete weeks between two given dates and weeks and days between two given […]
Functions in this article
More than 1300 Excel formulas
Excel formula categories
Excel categories
Leave a Reply
How to comment
How to add a formula to your comment
<code>Insert your formula here.</code>
Convert less than and larger than signs
Use html character entities instead of less than and larger than signs.
< becomes < and > becomes >
How to add VBA code to your comment
[vb 1="vbnet" language=","]
Put your VBA code here.
[/vb]
How to add a picture to your comment:
Upload picture to postimage.org or imgur
Paste image link to your comment.