Date Range within a Date Range

Susannah68

New Member
Joined
Oct 6, 2021
Messages
6
Office Version
  1. 365
Platform
  1. Windows
I'm trying to find a formula which will identify a date range within a data range. My example is trying to identify whether the date range in columns A and B contains the date range in B2:C2. ie do the dates in columns A & B contain any part of 2021
Apologies if the solution is out there, but I've tried various formulas and none seem to work right. I've included an example where the start date and end date both fall outside of 2021.

Thank you
 

Attachments

  • Excel query.PNG
    Excel query.PNG
    7.8 KB · Views: 12

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
MrExcelPlayground6.xlsx
ABC
1StartEnd
21/1/202112/31/2021
3
4StartEndYes/No
51/1/202212/31/2022No
610/1/202111/30/2021Yes
76/30/201811/30/2022Yes
87/1/20166/30/2017No
910/1/202111/30/2021Yes
Sheet8
Cell Formulas
RangeFormula
C5:C9C5=IF(AND($B$2<=B5,$C$2>=A5),"Yes","No")
 
Upvote 0
Great thank you! That worked. I was getting my end and start dates the wrong way round in my formula
 
Upvote 0

Forum statistics

Threads
1,215,005
Messages
6,122,661
Members
449,091
Latest member
peppernaut

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top