Forum Discussion
TCatron18
Sep 26, 2024Copper Contributor
Formula to check if date range falls within another date range
I am trying to determine if a date range falls within another date range for a specific ID. Example: Table1 ID Start Date End Date 1 10/9/2022 11/19/2022 2 2/12/2023 3/11/2023 ...
- Sep 30, 2024I was able to find a solution that provided what I needed.
=IF(COUNTIFS('Leave'!$A$2:$A$44850,"="&'Data'!$A2,'Leave!$B$2:$B$44850,"<="&'Data'!C2,'Leave'!$C$2:$C$44850,">="&'Data'!D2),"Leave","")
TCatron18
Copper Contributor
Harun24HR Here is a link to the document https://docs.google.com/spreadsheets/d/1-sDskQ3eqWqT6xYlmohjm7KdsBJvupyg/edit?usp=sharing&ouid=113197352351852045522&rtpof=true&sd=true
I've only done a handful of expected results in this since the dataset is so large, but the orange highlighted rows should be showing 'Leave' in the CHECK# columns.
TCatron18
Sep 30, 2024Copper Contributor
I was able to find a solution that provided what I needed.
=IF(COUNTIFS('Leave'!$A$2:$A$44850,"="&'Data'!$A2,'Leave!$B$2:$B$44850,"<="&'Data'!C2,'Leave'!$C$2:$C$44850,">="&'Data'!D2),"Leave","")
=IF(COUNTIFS('Leave'!$A$2:$A$44850,"="&'Data'!$A2,'Leave!$B$2:$B$44850,"<="&'Data'!C2,'Leave'!$C$2:$C$44850,">="&'Data'!D2),"Leave","")