Checking a start and end date against a range of dates

jasonkgreen

Board Regular
Joined
Feb 21, 2013
Messages
50
I need a way for the cells under the dates to determine whether a calculation should be performed based on the Start Date. In the example below, there would be no calculations in Aug, Sept, or Oct. There would be calculations in Nov 2023 through July 2024 (end date) and then no calculations after July 2024. What is the best way to accomplish this?

Project NameDuration (in mos)
Start Date​
End Date​
8/1/20239/1/202310/1/202311/1/202312/1/20231/1/20242/1/20243/1/2024
Project #18.00
11/06/23​
07/06/24​
NoNoNoYesYesYesYesYes
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Hi there,

Assuming the dates are actually dates (they should be naturally right justified in the cell if they are so I have my doubts about the dates in the heading) you could use this though you may have to change the range references to suit:

=IF(AND(E1>=$C$2,E1<=$D$2),"Yes","No")

Regards,

Robert
 
Upvote 0
Solution
Hi there,

Assuming the dates are actually dates (they should be naturally right justified in the cell if they are so I have my doubts about the dates in the heading) you could use this though you may have to change the range references to suit:

=IF(AND(E1>=$C$2,E1<=$D$2),"Yes","No")

Regards,

Robert
Yes, this works. I just need to replace YES with my calculation. The dates are fine. Not sure why they showed as left-justified when I copied the table in.

Thanks for the help.
 
Upvote 0
Yes, this works.
:confused: Are you sure?
Does that mean your shown values in post 1 were incorrect? Also your description which implies there would be a calculation in Nov?
In the example below, there would be no calculations in Aug, Sept, or Oct.

To match your examples and description, I think you might need something more like row 4 below. (My dates are d/m/y format)

23 11 07.xlsm
BCDEFGHIJ
11/08/20231/09/20231/10/20231/11/20231/12/20231/01/2024
2Post 1 Desired6/11/20236/07/2024NoNoNoYesYesYes
3Post 26/11/20236/07/2024NoNoNoNoYesYes
4My suggestion6/11/20236/07/2024NoNoNoYesYesYes
Sheet2 (2)
Cell Formulas
RangeFormula
E3:J3E3=IF(AND(E$1>=$C3,E$1<=$D3),"Yes","No")
E4:J4E4=IF(AND(E$1>$C4-DAY($C4),E$1<=$D4),"Yes","No")
 
Upvote 0

Forum statistics

Threads
1,215,282
Messages
6,124,052
Members
449,139
Latest member
sramesh1024

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