1 min readfrom Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

Sum number of days between given date range that overlap with another date range

Our take

Calculating the number of overlapping days between two date ranges can be challenging, especially with extensive data. To achieve this in Excel, you can use a formula that accurately counts the days within the specified ranges. By identifying the maximum of the start dates and the minimum of the end dates, you can determine the overlap. This approach simplifies the process, allowing you to avoid manual calculations while efficiently managing your data. Let’s explore how to create a formula that addresses your needs effectively.

Hello,

I'm sorry if this post sounds confusing, as english is not my first language.

I am trying to make an excel formula which counts how many days are within two overlaping date ranges (Minimun date with Maximum date and First day with Last day), because the target sheet has hundreds of lines.

https://preview.redd.it/xygal9l298qg1.png?width=965&format=png&auto=webp&s=25ac217fd82fbd1b7de51bf5d09e2cc5fd66e8f4

I am a bit desperate and i've tried nested IFs:

=IF(B4>=$C$1;IF(AND(B4<>D4;$E$1-D4<0);$E$1-B4+1;IF(AND(B4>$C$1;B4>$E$1);0;C4)))

But i've failed when the First day column has a date bigger than the Minimun day and i am quite lost.

Dates are in the dd/mm/yyyy format.

Is there a way to solve this without having to manually do it?

submitted by /u/ma000
[link] [comments]

Read on the original site

Open the publisher's page for the full experience

View original article

Related Articles