ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Date range within a date range (https://www.excelbanter.com/excel-discussion-misc-queries/236958-date-range-within-date-range.html)

MoonBlosm

Date range within a date range
 
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"

Bernard Liengme[_3_]

Date range within a date range
 
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


--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


"MoonBlosm" wrote in message
...
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"




Michael R

Date range within a date range
 
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(B 2<B3,C2C3)),"x","")

If this was helpful, please click Yes
"MoonBlosm" wrote:

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"



All times are GMT +1. The time now is 09:59 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com