Find Missing Dates in Excel

Published on

You can find missing dates in a list in Excel using either a VLOOKUP formula with a helper column or a dynamic array formula. We’ll explore both approaches since the dynamic array formula won’t work in older Excel versions.

For the following examples, consider a small date range in A2:A5:

01-01-2024
02-01-2024
05-01-2024
08-01-2024

The missing dates in this range are:

03-01-2024
04-01-2024
06-01-2024
07-01-2024

Find Missing Dates Using Helper Column and VLOOKUP in Excel

To get started, let’s use a helper column and VLOOKUP to identify the missing dates.

In cell B2, enter the following formula to find the minimum date in the range A2:A5:

=MIN(A2:A5)

This will return the minimum date from your range.

In cell B3, enter the following formula and copy it down until it returns a hyphen (“-“):

=IFERROR(IF(B2+1<=MAX($A$2:$A$5), B2+1, "-"),"")
Helper column with a sequence of dates in Excel based on a minimum and maximum date in another range

This formula creates a list of sequential dates starting from the minimum date, incrementing by 1 each time, until it reaches the maximum date in your range. It will display a hyphen (“-“) if the date exceeds the range.

The result of the formula will be date values in Excel. To ensure the dates are formatted correctly, select the results in column B, navigate to the Home tab, and choose Short Date from the Number group.

Now, in cell C2, enter the following VLOOKUP formula and drag it down:

=IF(IFERROR(VLOOKUP(B2, $A$2:$A$5, 1, 0),0),"-", "Missing")

This formula checks if each date in column B is present in the original list of dates in column A. If it finds a match, it returns a hyphen (“-“); if it doesn’t, it returns the text “Missing.”

Drag-down formula to find missing dates in Excel

This method is a classic way to find missing dates in Excel using a helper column with VLOOKUP.

Find Missing Dates Using a Dynamic Array Formula in Excel

If you’re using a version of Excel that supports dynamic arrays, the process becomes much simpler.

To find missing dates in the range A2:A5, use this formula:

=LET(
   seqD, SEQUENCE((MAX(A2:A5)-MIN(A2:A5))+1, 1, MIN(A2)), 
   FILTER(seqD, NOT(IFNA(XMATCH(seqD, A2:A5), 0)))
)

Note: You should format the result as Short Date or Long Date from the Number group on the Home tab.

Finding missing dates in Excel using a dynamic array formula

Here’s how the formula works:

The SEQUENCE((MAX(A2:A5)-MIN(A2:A5))+1, 1, MIN(A2)) part generates a sequence of dates starting from the minimum date in the range and continuing to the maximum date.

  • The (MAX(A2:A5)-MIN(A2:A5))+1 calculates how many rows are needed to cover the full range of dates. The 1 indicates a single-column result, and MIN(A2) sets the starting point for the sequence.

The FILTER(seqD, NOT(IFNA(XMATCH(seqD, A2:A5), 0))) part filters the sequence of dates.

  • XMATCH(seqD, A2:A5) compares each date in the sequence to the dates in your original range. If a date is found, it returns the relative position of that date; if not, it returns an error.
  • The IFNA function replaces those errors with 0.
  • The NOT function converts 0 into TRUE (indicating the date is missing) and valid positions into FALSE.
  • The FILTER function then returns only the dates that are missing from the list, i.e., when the condition is TRUE.

This method is much more efficient if you have a newer version of Excel that supports dynamic arrays.

Conclusion

Both methods will help you identify missing dates in Excel, with the VLOOKUP approach working in older versions and the dynamic array formula being faster and more elegant for newer versions. Depending on your Excel version, choose the method that best suits your needs.

Prashanth KV
Prashanth KV
Your Trusted Google Sheets and Excel Expert Prashanth KV is a Diamond Product Expert in Google Sheets, officially recognized by Google for his contributions to the Docs Editors Help Community and featured in the Google Product Experts Directory. Explore his blog to learn advanced formulas, automation tips, and problem-solving techniques to elevate your spreadsheet skills.

How to Calculate Digital Root in Google Sheets

The digital root is the single-digit value you get by repeatedly summing the digits...

How to Build an Advanced Book Tracker in Google Sheets: Formulas Explained

If you're tired of forgetting what you've read, which books you rated 5 stars,...

Google Sheets Reading List Tracker Template (Free Download)

Looking for a smarter, more visual way to manage your reading goals? This Google...

Custom Order for QUERY Pivot Headers in Google Sheets

By default, when you use the PIVOT clause in a Google Sheets QUERY, the...

More like this

Mode of Comma-Separated Numbers in Excel (Dynamic Array)

There is no dedicated function in Excel to directly find the mode of comma-separated...

Sort Each Row Individually in Excel Using a LAMBDA Formula

Sorting rows in Excel typically refers to rearranging entire datasets based on values in...

Sort by Field Labels Using the SORT and XMATCH Combo in Excel

Want to sort your Excel data by column names instead of column positions? Learn...

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.