Skip to content
Free Excel Tutorials
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Data Analysis

  • Use Data Form to input, edit and delete records in Excel
  • How to calculate current stock or inventory in Excel
  • Conditional Formatting Color Scales Examples in Excel
  • Subtotal function in Excel
  • How to create Checklist in Excel

References

  • How to calculate two-way lookup VLOOKUP in Excel Table
  • CHOOSE function: Description, Usage, Syntax, Examples and Explanation
  • Multi-criteria lookup and transpose in Excel
  • How to use Excel MATCH Function
  • Create hyperlink with VLOOKUP in Excel

Data Validations

  • Excel Data validation must begin with
  • Excel Data validation exists in list
  • Excel Data validation number multiple 100
  • Prevent invalid data entering in specific cells
  • How To Create Drop-down List in Excel

Calculate date overlap in days in Excel

by

If you need to calculate the number of days that overlap in two date ranges, then this tutorials is for you.

You can use basic date arithmetic, together with the the MIN and MAX functions. See example below;

Formula

=MAX(MIN(end1,end2)-MAX(start1,start2)+1,0)

Explanation

In the example shown, the formula in D6 is:

=MAX(MIN(end,C6)-MAX(start,B6)+1,0)

How this formula works

Excel dates are just serial numbers, so you can calculate durations by subtracting the earlier date from the later date.

This is what happens at the core of the formula here:

MIN(end,C6)-MAX(start,B6)+1

Here are are simply subtracting an earlier date from a later date. To figure out what dates to use for each date range comparison, we use MIN to get the earliest end date, and MAX to get the latest end date.

Finally, we use the MAX function to trap negative values and return zero instead. Using MAX this way is a clever way to avoid using IF.

Post navigation

Previous Post:

COSH function: Description, Usage, Syntax, Examples and Explanation

Next Post:

Excel Data validation require unique number

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others

Logical Functions

  • How to return blank in place of #DIV/0! error in Excel
  • Return blank if in Excel
  • Invoice status with nested if in Excel
  • How to use Excel OR Function
  • Nested IF function example in Excel

Date Time

  • How to get number of days, weeks, months or years between two dates in Excel
  • Add days to date in Excel
  • Convert Excel time to Unix time in Excel
  • Get fiscal year from date in Excel
  • How to determine year is a leap year in Excel

Grouping

  • Categorize text with keywords in Excel
  • Running count group by n size in Excel
  • Group numbers with VLOOKUP in Excel
  • Map inputs to arbitrary values in Excel
  • Calculate conditional mode with criteria in Excel

General

  • How to calculate profit margin percentage in Excel
  • How to calculate percent of students absent in Excel
  • How to get original number from percent change in Excel
  • How to calculate percent variance in Excel
  • Customize Ribbon In Excel
© 2025 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning