Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Cindi
 
Posts: n/a
Default "Is Between" function?

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
  #2   Report Post  
N Harkawat
 
Posts: n/a
Default

Use AND function as follows:-
=If(and(today()"10/15/04",today()< "10/24/04"),1,if(and(....
"Cindi" wrote in message
...
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



  #3   Report Post  
Alex Delamain
 
Posts: n/a
Default


If you want it to go on and on it will get messy! Here is the formula
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 of
dates and so on)

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

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


--
Alex Delamain
------------------------------------------------------------------------
Alex Delamain's Profile: http://www.excelforum.com/member.php...o&userid=11273
View this thread: http://www.excelforum.com/showthread...hreadid=275344

  #4   Report Post  
Harlan Grove
 
Posts: n/a
Default

"Cindi" wrote...
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})


  #5   Report Post  
Domenic
 
Posts: n/a
Default


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!


--
Domenic
------------------------------------------------------------------------
Domenic's Profile: http://www.excelforum.com/member.php...o&userid=10785
View this thread: http://www.excelforum.com/showthread...hreadid=275344

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Averaging function Sarah Excel Discussion (Misc queries) 0 January 18th 05 04:09 PM
Function in XL or in VBA for XL that pulls numeric digits from a t Nate Oliver Excel Discussion (Misc queries) 0 December 14th 04 04:57 PM
Excel function help facilities RPS Excel Discussion (Misc queries) 1 December 8th 04 02:36 AM
I cant use englisch function names in a swedich version of excel PE Excel Discussion (Misc queries) 2 December 7th 04 01:00 AM
need to save values from a function before it changes Ron Excel Worksheet Functions 1 October 29th 04 06:29 AM


All times are GMT +1. The time now is 10:20 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"