Is a month within a date range

th081

Board Regular
Joined
Mar 26, 2006
Messages
98
Office Version
  1. 365
Platform
  1. Windows
HI All,

I have two cells with a start date and end date e.g 01/05/21 to 01/07/21, this range can be small or it can span several years. I have another cell with a month i.e January.

What i would like is a formula that tells me if January (or another month) is within the date range, so for the dates 01/05/21 to 01/07/21 the answer would be no, but if the date range was 01/05/21 to 10/01/22 the answer would be yes as Jan is in the date range.

Can anyone help?
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Map1
ABCDE
1startend
2period11/01/2231/12/22
3period21/02/2228/02/22WAAR
Blad1
Cell Formulas
RangeFormula
E3E3=MIN(C2:C3)-MAX(B2:B3)=C3-B3
 
Upvote 0
thanks BSALV,

My period two is simply January, February etc not a date range, presumably i would have to create a start and end date from January to use if your formula
 
Upvote 0
Book1
ABCD
1StartEndJanuary
201/05/202101/07/2021FALSE
301/05/202110/01/2022TRUE
Sheet1
Cell Formulas
RangeFormula
C2:C3C2=AND(MONTH(A2)>=MONTH(--("01-"&$D$1)),MONTH(B2)<=MONTH(--("01-"&$D$1)))


Note - you should really consider entering an actual date rather than text
 
Upvote 0
Thanks Neil,

if you put 10/02/22 in B3 its says false. I am going to redesign my spreadsheet to use an actual date
 
Upvote 0

Forum statistics

Threads
1,215,235
Messages
6,123,779
Members
449,123
Latest member
StorageQueen24

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