ExcelReady
CourseMock testsFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before day one. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Mock tests
  • Function guides
  • Blog

Test prep

  • Excel level test
  • Excel test practice
  • Free screening quiz
  • Certificate

Company

  • About
  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Dates
  3. How to Check for Overlapping Date Ranges in Excel

How to Check for Overlapping Date Ranges in Excel

By ExcelReady Team·Updated November 3, 2026·6 min read

The short answer

Two date ranges overlap when each one starts on or before the day the other ends: =AND(Start1<=End2,Start2<=End1). To check a whole list, use COUNTIFS to count rows whose start is on or before this row's end and whose end is on or after this row's start, then subtract 1 for the row itself. Any result above 0 is an overlap.

Key takeaways

  • Ranges overlap when Start1 <= End2 and Start2 <= End1. You only need these two comparisons.
  • In a list, =COUNTIFS(starts,"<="&C2,ends,">="&B2)-1 counts how many other rows clash with row 2.
  • Add a criteria pair, such as the employee or room, to check overlaps only within the same group.
  • Overlapping days = MAX(0, MIN(End1,End2) − MAX(Start1,Start2) + 1).
  • Decide whether touching ranges count. For hotel-style bookings, use < and > instead of <= and >=.
On this page+
  1. The rule for overlapping date ranges
  2. Check if two date ranges overlap with AND
  3. Find every overlap in a list with COUNTIFS
  4. Check overlaps for the same person or room only
  5. Count the overlapping days
  6. Should touching ranges count as an overlap?
  7. Common mistakes with overlapping dates
  8. Practise it

To check for overlapping date ranges in Excel, compare each range's start with the other's end. Two ranges overlap when each one starts on or before the day the other one ends, which is one short AND formula for a pair and one COUNTIFS formula for a whole list. This guide is for anyone who manages leave, bookings, shifts or project dates and needs to spot clashes before they cause trouble.

The rule for overlapping date ranges#

Two date ranges overlap when Start1 <= End2 and Start2 <= End1. Both must be true.

It is easier to see why by thinking about when ranges don't overlap. There are only two ways:

  • Range 1 ends before range 2 starts (End1 < Start2), or
  • Range 2 ends before range 1 starts (End2 < Start1).

If neither of these is true, the ranges share at least one day. Turning those two "no overlap" cases around gives the rule above. You don't need to check whether one range sits inside the other, because the rule already covers it.

All examples use this leave list in A1:C7:

ABC
1EmployeeStartEnd
2AnaMon 6 Jul 2026Fri 10 Jul 2026
3BenWed 8 Jul 2026Thu 9 Jul 2026
4AnaThu 9 Jul 2026Tue 14 Jul 2026
5ChrisMon 13 Jul 2026Fri 17 Jul 2026
6BenMon 20 Jul 2026Fri 24 Jul 2026
7ChrisFri 17 Jul 2026Tue 21 Jul 2026

The dates must be real Excel dates, not text. Excel stores a date as a number, which is why <= and >= work on them.

Check if two date ranges overlap with AND#

To compare two rows, put both comparisons inside AND:

Excel formula
=AND(B2<=C4,B4<=C2)

This compares Ana's two leave periods. 6 Jul is on or before 14 Jul, and 9 Jul is on or before 10 Jul, so the result is TRUE. The AND function guide explains how AND returns TRUE only when every test is true, and the guide to AND, OR and NOT shows more examples.

Wrap it in IF for a friendlier label:

Excel formula
=IF(AND(B2<=C4,B4<=C2),"Overlap","OK")

Find every overlap in a list with COUNTIFS#

To check a whole list, count how many rows clash with each row. In D2, type:

Excel formula
=COUNTIFS($B$2:$B$7,"<="&C2,$C$2:$C$7,">="&B2)-1

Fill it down to D7 (Windows: Ctrl+D; Mac: ⌘D). Here is what each part does:

  • $B$2:$B$7,"<="&C2 keeps rows that start on or before this row's end.
  • $C$2:$C$7,">="&B2 keeps rows that end on or after this row's start.
  • -1 removes the row itself, because every range overlaps itself.

The & joins the operator to the date in the cell. Writing "<=C2" would compare against the text "C2" and return the wrong count. The COUNTIFS function guide covers this pattern, and COUNTIFS with a date range shows more date criteria.

For row 2, the result is 2: Ben's 8–9 Jul and Ana's own 9–14 Jul both overlap Ana's 6–10 Jul. That is a team view: it shows who is away at the same time.

Check overlaps for the same person or room only#

Often you only care about clashes within one group, such as the same employee or the same meeting room. Add a criteria pair for the group:

Excel formula
=COUNTIFS($A$2:$A$7,A2,$B$2:$B$7,"<="&C2,$C$2:$C$7,">="&B2)-1

Now row 2 returns 1: only Ana's second period clashes with her first. Filled down, the results are 1, 0, 1, 1, 0, 1. Ana has a double-booked request, and so does Chris, whose two periods both include 17 Jul.

To show a clear flag, wrap it: =IF(COUNTIFS(...)-1>0,"Clash",""). This is the check a leave tracker or an appointment tracker needs before a new booking is approved.

Count the overlapping days#

To know how many days two ranges share, take the later start and the earlier end:

Excel formula
=MAX(0,MIN(C2,C4)-MAX(B2,B4)+1)

For Ana's two periods, MIN(10 Jul, 14 Jul) is 10 Jul and MAX(6 Jul, 9 Jul) is 9 Jul. The difference is 1, plus 1 to count both days, so the result is 2 days (9 and 10 Jul). If the ranges don't overlap, the subtraction is negative and MAX(0,…) returns 0.

The same idea counts how many days of one range fall inside a fixed period, such as a month. If G1 holds 1 Jul 2026 and G2 holds 31 Jul 2026, then =MAX(0,MIN(C2,$G$2)-MAX(B2,$G$1)+1) returns the July days in each leave request. For working days only, use =NETWORKDAYS(MAX(B2,B4),MIN(C2,C4)), which returns 2 here too. Wrap it in MAX(0,…) because NETWORKDAYS returns a negative number when there is no overlap.

Should touching ranges count as an overlap?#

With <= and >=, ranges that touch on one day count as overlapping. Chris's leave ends on 17 Jul and his next request starts on 17 Jul, so they overlap by one day.

That is right for leave, where both requests include 17 Jul. It is wrong for hotel rooms or equipment hire, where one guest checks out on the morning another checks in. For those, use strict comparisons:

Excel formula
=COUNTIFS($A$2:$A$7,A2,$B$2:$B$7,"<"&C2,$C$2:$C$7,">"&B2)-1

Be careful with the -1 here. With strict comparisons, a one-day booking (same start and end) doesn't match itself, so the self-count is lost. If your list has same-day bookings, count them separately or keep the inclusive version.

Common mistakes with overlapping dates#

These cause most wrong results:

  1. Dates stored as text. A date typed as text won't compare correctly. Check with =ISNUMBER(B2), which should return TRUE.
  2. Forgetting the -1. Every row overlaps itself, so without it every row shows at least 1.
  3. Ranges not locked. Without $, the ranges shift as you fill down and miss rows.
  4. End before start. A typo like 14 Jun instead of 14 Jul breaks every check. Add a test such as =C2>=B2.
  5. Dates with times. If cells hold times as well as dates, an end of 10 Jul 09:00 is earlier than 10 Jul 17:00. Strip times with INT if you only care about days.

The IF with dates guide has more ways to compare dates safely.

Practise it#

Try the exercise on this page to find Ana's clash with COUNTIFS. Then practise dates in criteria in a live spreadsheet, where you count and total rows between two dates, and build multi-condition checks in the COUNTIFS and SUMIFS lesson. Each lesson checks your formula instantly.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

Does Ana's first leave (row 2) clash with any of her other leave? In E2, use COUNTIFS to count rows for the same employee (A2) whose start is on or before C2 and whose end is on or after B2, then subtract 1. Press Enter.

fx
ABCDEF
1
Employee
Start
End
Clashes
2
Ana
46209
46213
3
Ben
46211
46212
4
Ana
46212
46217
5
Chris
46216
46220
6
Ben
46223
46227
7
Chris
46220
46224
8
9
10

Tip: Three pairs: the employee column with A2, the start column with "<="&C2, and the end column with ">="&B2. Then subtract 1 so the row doesn't count itself.

Practise this in a lesson

LessonDates in criteria: totals by date range and monthCount and total rows between two dates with COUNTIFS and SUMIFS, build a monthly summary, and drive the date range from input cells.LessonCOUNTIFS and SUMIFSCount and sum with several conditions at once, and learn why SUMIFS puts the sum range first.Function guideCOUNTIFSCount rows that meet several conditions with COUNTIFS. Examples for text, number ranges and between-values, plus a live exercise.Function guideANDCheck that every condition is true with Excel's AND. Use it inside IF for bonuses, ranges and eligibility rules, then try a live exercise.

Frequently asked questions

How do I check if two date ranges overlap in Excel?

+

Use =AND(B2<=C3,B3<=C2), where B is the start date and C is the end date. It returns TRUE if the ranges share at least one day and FALSE if they don't.

How do I find overlapping dates in a list?

+

In a helper column, use =COUNTIFS($B$2:$B$7,"<="&C2,$C$2:$C$7,">="&B2)-1 and fill it down. Any row with a result above 0 overlaps at least one other row.

How do I count the number of overlapping days?

+

Use =MAX(0,MIN(C2,C3)-MAX(B2,B3)+1). The later start and the earlier end mark the shared period. MAX(0,...) returns 0 when there is no overlap instead of a negative number.

Do ranges that touch count as overlapping?

+

With <= and >=, a range ending on 17 July and one starting on 17 July overlap by one day. For bookings where checkout and check-in can share a day, use < and > so touching ranges don't count.

How do I highlight overlapping dates in Excel?

+

Select the rows, choose Home > Conditional Formatting > New Rule > Use a formula, and enter the COUNTIFS check with >0 at the end, using locked ranges and the first row's cells. Pick a fill colour and click OK.

Sources

  • COUNTIFS function - Microsoft Support
  • AND function - Microsoft Support
  • DATE function - Microsoft Support

Written and checked by the ExcelReady Team. First published November 3, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. The rule for overlapping date ranges
  2. Check if two date ranges overlap with AND
  3. Find every overlap in a list with COUNTIFS
  4. Check overlaps for the same person or room only
  5. Count the overlapping days
  6. Should touching ranges count as an overlap?
  7. Common mistakes with overlapping dates
  8. Practise it

Keep reading

Conditional math· 5 min read

COUNTIFS With a Date Range in Excel

To count dates in a range, use COUNTIFS with two conditions on the same date column: =COUNTIFS(B2:B9,">="&F1,B2:B9,"<="&F2), where F1 is the start date and F2 is the end date. The operators go in quotes, joined to the date with &. Add more range and criteria pairs to count by region or status too.

Logic· 7 min read

IF Formulas With Dates in Excel: Before, After, Overdue

To use a date in an IF formula, compare the date cell with another date: =IF(B2<TODAY(),"Overdue","On time") flags anything due before today. For a fixed date, build it with DATE: =IF(B2>DATE(2026,12,31),"Next year","This year"). Don't type the date in quotes, because Excel then compares a number with text and gets it wrong.

Projects· 6 min read

Build an Employee Leave Tracker in Excel

A leave tracker in Excel has a log with one row per request: employee, leave type, start date and end date. =NETWORKDAYS(Start,End,Holidays) counts the working days in each request. A summary table then uses SUMIFS to total each person's days by type, subtracts them from the yearly allowance, and COUNTIFS shows who is off on any date.

More on dates

  • Get the Quarter From a Date in Excel
  • How to Remove the Time From a Date in Excel
  • Calculate a Retirement Date From a Birth Date in Excel
  • Round Time to the Nearest 15 Minutes in Excel
  • Semimonthly Pay Schedule in Excel: 15th and Month-End Paydays
  • Calculate the Difference Between Two Times in Excel
All dates articles →

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback, right in your browser. Nothing to download.

Start learning for free