date range within a date range

M

MoonBlosm

I have a start and end date. I want to know if any of those dates between
the start and the end date fall between two other dates? If so, I want to
place an x in the field.

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

Date range: 8/31/09 - 9/30/09

if any date between 9/15/09 and 10/1/09 fall between 8/31/09 and 9/30/09,
place an x here, if not, don't do anything.

(This may have been posted before, but I couldn't find it so I posted it
again. Sorry for the redundancy)

Thank you for your help in advance :)
 
L

Luke M

Assuming your first range is in cells A2:A3, and your second set is in B2:B3

=IF(OR(AND(A2>=B2,A2<=B3),AND(A3>=B2,A3<=B3)),"X","")
 
A

Ashish Mathur

Hi,

Suppose the first set of dates is in A5:A6. Suppose the second set is in
B5:B6. You now have to simply check for whether the outer date I.e. date in
B6 is greater than the first date I.e. date in cell A5

=if(B6>A5,"X","")

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com
 

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