conditional formula

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to figure out how to use a conditional formula to say that if the
month in a cell containing a full date (i.e. 10/23/06) is Jan then.... or if
the month is Feb then...any suggestions?
 
That is going to be a problem since we can nest IF only 7 deep (unless you
have XL 2007)
We can begin with =IF(MONTH(A1)=1,"its Jan", IF(MONTH(A1)=2, "its Feb",....
but that would need 12 IFs.
Perhaps if we knew what you need after "IS JAN THEN ...." we might be able
to propose another solution.
best wishes
 
If you want to check for all 12 of the months then you'll have to tell us
what the "then" is. Based on your question as posted (check for either Jan
or Feb):

A1 = some date

=IF(MONTH(A1)=1,"then this",IF(MONTH(A1)=2,"then this",""))

If A1 is EMPTY it will evaluate as month 1 so you might want to make sure it
has a date:

=IF(AND(ISNUMBER(A1),MONTH(A1)=1),"then this",IF(MONTH(A1)=2,"then
this",""))

If you want to check for all 12 of the months then a lookup table and a
lookup formula will probably be a better solution.
 
Back
Top