Confirming a certain month is within a date range

workinonexcel

New Member
Joined
Dec 14, 2021
Messages
2
Office Version
  1. 365
Platform
  1. Windows
I need a formula that will confirm if a given month falls within a date range.

For example, Column A has the beginning of the date range, 2/1/21. Column B has the end of the range, 6/30/21. I then have a column for each month of the year, Column C is January, Column D is February, etc.

From there, I need to return "Yes" or "No" confirming whether that month is included in the date range, across the columns, for each month. If the initial date starts mid-month, that month should be "No". This is not an issue on the end date.

Thanks in advance for your help!
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Welcome to Mr. Excel.

By "mid-month" do you mean the 15th?

Something like this?

Book1
ABCDEFGHIJKLMN
1BeginEndJanuaryFebruaryMarchAprilMayJuneJulyAugustSeptemberOctoberNovemberDecember
22/1/20216/30/2021NoYesYesYesYesYesNoNoNoNoNoNo
32/15/20218/10/2021NoNoYesYesYesYesYesYesNoNoNoNo
43/10/20215/20/2021NoNoYesYesYesNoNoNoNoNoNoNo
54/20/20215/15/2021NoNoNoNoYesNoNoNoNoNoNoNo
Names
Cell Formulas
RangeFormula
C2:N5C2=IF(AND($A2<DATE(YEAR($A2),MONTH(DATEVALUE(C$1&"1")),15),MONTH($A2)<=MONTH(DATEVALUE(C$1&"1")),MONTH($B2)>=MONTH(DATEVALUE(C$1&"1"))),"Yes","No")
 
Upvote 0
Upvote 0
Peter: I think if the OP is talking about the 15th of the month, then your row 4 should be OK for March, yes/no?
 
Upvote 0
Thank you so much, I will try these today and see what works. By mid-month, I meant any day after the first of the month! Thank you both,
 
Upvote 0

Forum statistics

Threads
1,214,924
Messages
6,122,293
Members
449,077
Latest member
Rkmenon

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