if between dates

  • Thread starter Thread starter Michelle
  • Start date Start date
M

Michelle

I am stumped.

I need to have a cell that returns one number if between
one set of dates and a different number if between
another set of dates.

For example. If MainCell is between date1cell and
date2cell then ratecell but if it is between date3cell
and date4cell then ratecell2.

This is for a rate chart for a hotel.

Thanks in advance for your help!
 
Hi
try something like
=IF(AND(maincell>=date1cell,maincell<=date2cell),ratecell2,IF(AND(mainc
ell>=date3cell,maincell<=date4cell),ratecell2,"no rate available"))
 
Michelle,

=IF(AND(Entry>=Date1,Entry<=Date2),1,IF(AND(Entry>=Date3,Entry<=Date4),2,"un
defined"))

Hereby is Entry the cell in which you input your date. Note however that
you didn't specify what the number should be if your entry isn't in one of
the two periods (Date1 , Date 2) and (Date3 , Date4).
In the formula you get a result "undefined" back for such a date.

--
Regards,
Auk Ales

* Please reply to this newsgroup only *
* I will not react on unsolicited e-mails *
 
Back
Top