"Is Between" function?

C

Cindi

Is there an "Is Between" function? I want to say the
following, but I don't know how.

If Today() is between "10/15/04" and "10/24/04", then 1,
but if today() is between "10/25/04" and "11/01/04", then
2....and so on, and so on, and so on....

How do I do this??? Please help!

Thanks,

Cindi
 
N

N Harkawat

Use AND function as follows:-
=If(and(today()>"10/15/04",today()< "10/24/04"),1,if(and(....
 
A

Alex Delamain

If you want it to go on and on it will get messy! Here is the formul
for "is it between two dates" returning 1 if it is and 0 if it isn't
(you could replace the 0 with the formula repeated for a second set o
dates and so on)

=if(and(today()>=date(2004,10,15),today()<=date(2004,11,01)),1,0)

However is there a pattern to your start and end dates as this migh
allow a simpler method
 
H

Harlan Grove

Cindi said:
Is there an "Is Between" function? I want to say the
following, but I don't know how.

If Today() is between "10/15/04" and "10/24/04", then 1,
but if today() is between "10/25/04" and "11/01/04", then
2....and so on, and so on, and so on....

There are different numbers of days between 10/15/04 and 10/24/04 - 10 days
including both the 15th and the 24th - and between 10/25/04 and 11/01/04 - 8
days inclusive. If your periods span different numbers of days, the best
approach is using LOOKUP. Something like

=LOOKUP(TODAY(),--{"10/15/04";"10/25/04";"11/02/04";"11/20/04"},
{1;2;3;4})
 
D

Domenic

Assuming that Column A contains your dates as follows...

10/15/2004
10/25/2004
etc.

=MATCH(TODAY(),A1:A10,1)

Adjust the range accordingly. Notice only the start dates are listed.
I couldn't continue with the list since I didn't see any discernable
pattern.

Hope this helps!
 

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