View Single Post
  #5   Report Post  
Ms. P.
 
Posts: n/a
Default

Thanks Alan. That's exactly what I was looking for.

"Alan" wrote:

Or this will return a blank if B1 is blank, or an error message if anything
is entered which isn't in your list.

=IF(B1="","",IF(OR(B1="LD",B1="WC"),"DIS",IF(OR(B1 ="LF",B1="LM",B1="LP"),"EXT",IF(B1="T","TMG",IF(B1 ="R","TVR",IF(OR(B1="AF",B1="AE",B1="AP"),"REG","E rror
Message"))))))

Regards,
Alan.
"Alan" wrote in message
...
=IF(OR(B1="LD",B1="WC"),"DIS",IF(OR(B1="LF",B1="LM ",B1="LP"),"EXT",IF(B1="T","TMG",IF(B1="R","TVR"," REG"))))
Regards,
Alan.
"Ms. P." wrote in message
...
I know that my "if" statement can only contain 7 nested functions, so
here's
my problem. I have the following table:

Long Term Disability = LD Active Part-Time = AP
Active Full Time = AF Terminated = T
Retired = R Family Leave = LF
Active Union Hall Extra - AE Maternity Leave = LM
Personal Leave = LP Worker's Comp = WC

The above codes are in column B. I want to put a formula in column C
that
will do the following. Look at the codes in column B and convert them
to:

LD = DIS AP=REG
AF=REG T=TMG
R=TVR LF=EXT
AE=REG LM=EXT
LP=EXT WC=DIS

I understand how to write the formula for each one individiually, but
since
I have more than 7 items, I don't know how to tell it for example:

if (B1="LD" or "WC" then "DIS", if B1="LF" or "LM" or "LP" then "EXT", if
B1="T" then "TMG", if B1="R" then "TVR" otherwise "REG")

How do I do the "or" part? Any help is much appreciated. Thanks.