How to Count Complete Months Between Two Dates in Excel

From January 15 to February 14, a piece of equipment is one day short of a full month. Open your Excel maintenance workbook (.xlsx) in Cue Office and use DATEDIF to count complete months. Then check any rows where the end date comes before the start date.

How Do You Count Full Months in These Date Examples?

Create a spreadsheet in Cue Office and paste the practice data into A1. If the columns show ##### instead of dates, select B2:C2 and choose Home → Format → Column Width…. Set the width of both columns to 15.

Raw dates and empty Full months column in maintenance sheet
Column B is the start date, column C is the end date, and column D is reserved for full months.

Click D2 and paste the five formula lines below. Each row uses the start date in column B and the end date in column C from the same row, while "m" instructs DATEDIF to count only complete months. M01 returns 0 from January 15 to February 14, while M02 returns exactly 1 on February 15. Same-day M03 returns 0, and M04 returns 3 from November 20, 2025 to February 20, 2026.

=DATEDIF(B2,C2,"m")
=DATEDIF(B3,C3,"m")
=DATEDIF(B4,C4,"m")
=DATEDIF(B5,C5,"m")
=DATEDIF(B6,C6,"m")
D2 shows the DATEDIF formula. The first four result cells show 0, 1, 0, and 3.
The first two rows differ by just one day, yielding full month counts of 0 and 1 respectively.

Which Source Dates Should You Check for a #NUM! Error?

Click D6 and check its references to B6 and C6 in the formula bar. For M05, the start date is February 15 and the end date is February 14, so the formula returns #NUM!. Compare both dates with the maintenance record and correct the source sheet once you know which entry is wrong.

DATEDIF in D6 returns #NUM! because B6 is later than C6
D6 shows #NUM! because M05 ends before it starts.

Click Save As on the upper-left toolbar, then close and reopen the saved manual copy. Check D2:D6. The first four results are still 0, 1, 0, and 3. The last row still shows #NUM!.

Reopened manual copy showing five rows of results with #NUM! in the last row
After saving and reopening, the month counts in the first four rows and the error in the fifth row are preserved.

How Can You Check That Cue AI’s Results Update?

Open a copy of the maintenance sheet where D2:D6 is still blank, and click Cue AI. Specify the definition of a full month, the target range to fill, and which row should be left for manual review.

Cue AI panel open next to the maintenance sheet with the target column blank
The maintenance sheet is open beside the Cue AI panel, with column D ready for the results.
For the maintenance records in rows 2 through 5, calculate how many whole months have elapsed from each Start date in column B to its End date in column C. Count a month only when that monthly anniversary has been reached, and return zero when the dates are the same or a full month has not elapsed. Write live results only in D2:D5 so they update when either date changes. Leave all source dates, labels, headers, and row 6 unchanged.

Cue AI wrote four formulas, one in each cell from D2 through D5. It wrapped DATEDIF in an IF check that returns 0 if the end date is on or before the start date. D6 stayed blank so you can review the reversed dates for M05 separately. Choose Save As, close the copy, then reopen it. Check that the original dates and headings are unchanged and that the four results are still 0, 1, 0, and 3.

Reopened AI copy with an IF formula in D2, first four rows showing 0, 1, 0, and 3, and D6 empty
After reopening the AI copy, D2:D5 still displays 0, 1, 0, and 3, while D6 remains blank.

In the reopened copy, change C2 from 02/14/2026 to 02/15/2026. One full month has now passed for M01, so D2 changes from 0 to 1.

C2 changed to 02/15/2026 in reopened copy, D2 updating to 1
Once M01's end date changes to February 15, D2 updates from 0 to 1.

Practice with Five Maintenance Records

Show the full example

Paste the data into A1. Dates use MM/DD/YYYY format, and column D is reserved for calculated results. Back to formula steps.

Asset	Start date	End date	Full months
M01	01/15/2026	02/14/2026
M02	01/15/2026	02/15/2026
M03	03/10/2026	03/10/2026
M04	11/20/2025	02/20/2026
M05	02/15/2026	02/14/2026

Check the Dates Before Scheduling Maintenance

Next time you schedule maintenance, ask Cue AI to count complete months for equipment with both dates recorded. If a piece of equipment is a day short of a full month, check the date when it reaches that mark. If a work order has an end date earlier than its start date, ask the person responsible for the record to verify the dates before you schedule the work.

If the signed maintenance form is a PDF (.pdf), open it in Cue Office for free and check the actual start and end dates by asset ID against your Excel maintenance workbook (.xlsx). Use a Word handoff log (.docx) to record which dates need checking and who will verify them. For a pre-shift briefing, list the equipment due for maintenance this week in a PowerPoint deck (.pptx). Cue Office offers free spreadsheet, document, and presentation editing.

Download Cue Office for Free