View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.misc
Pete_UK
 
Posts: n/a
Default I need more than 7 IF conditions...

Helen,

You can extend the table with an earlier date so that you don't have
problems before 26/1/05. You can also add one day to the dates at the
end of the holidays, so your table becomes:

01/01/2005 Y
26/01/2005 N
11/04/2005 Y
26/04/2005 N
04/07/2005 Y
16/07/2005 N
26/09/2005 Y
08/10/2005 N
22/12/2005 Y
28/01/2006 N
and so on ...

The formula would now become:

=IF(B2<Sheet2!$A$1,"Too early",VLOOKUP(B2,Sheet2!$A$1:$B$10,2))

It does not take very long to set up the table of dates. Once they are
set up they do not need to change - you just need to ensure that your
formula includes the range of dates in your table. So, if your dates
are extended for another year so that the table occupied A1 to B20,
then the formula would become:

=IF(B2<Sheet2!$A$1,"Too early",VLOOKUP(B2,Sheet2!$A$1:$B$20,2))

Hope this helps.

Pete