Date range within a date range

M

MoonBlosm

I have a start date and an end date. I want to determine if any of those
days in that range falls between two dates?

Start Date of Project
End Date of Project

if any of those days falls between another start and end date, place an x in
the field

Start Date: 9/15/09
End Date : 10/1/09

from that date range, do any of the dates fall between 8/31/09 and 9/30/09
if so mark it with an "X"
 
B

Bernard Liengme

A little confusing. Please tell the story like this
A1 has start date of project
B1 has end date of project
.......
tell us where the X is to go
best wishes
 
M

Michael R

Assume the following:
Project start = B2
Project End = C2

Other period start = B3
other period end = C3

I see 2 possible scenarios that could lead to an "x"-reply
1) Either one or both of Project start and end fall between the "Other
period" start and end
2) Project starts before "Other period" start and Project ends after "Other
period" end.

A formula for scenario 1 is
=IF(OR(AND(B2>=B3,B2<=C3),AND(C2>=B3,C2<=C3)),"x","")

A formula for scenario 2 is
=IF(OR(AND(B2>=B3,B2<=C3),AND(C2>=B3,C2<=C3),AND(B2<B3,C2>C3)),"x","")

If this was helpful, please click Yes
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top