+ Reply to Thread
Results 1 to 49 of 49

Nested "If" Function

  1. #1
    Alan
    Guest

    Re: Nested "If" Function

    Thats Good,
    "Ms. P." <[email protected]> wrote in message
    news:[email protected]...
    > 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","Error
    >> Message"))))))
    >>
    >> Regards,
    >> Alan.
    >> "Alan" <[email protected]> wrote in message
    >> news:[email protected]...
    >> > =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." <[email protected]> wrote in message
    >> > news:[email protected]...
    >> >>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.
    >> >
    >> >

    >>
    >>
    >>




  2. #2
    Biff
    Guest

    Re: Nested "If" Function

    Hi!

    Create a 2 column table:

    LD..........DIS
    AF..........REG
    R............TVR
    AE..........REG
    etc
    etc

    Assume this table is in the range D1:E10

    Formula:

    =VLOOKUP(B1,D1:E10,2,0)

    Biff

    "Ms. P." <[email protected]> wrote in message
    news:[email protected]...
    >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.




  3. #3
    Biff
    Guest

    Re: Nested "If" Function

    Hi!

    If you're going to use that long inefficient nested IF formula, might as
    well make it shorter:

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

    Biff

    "Alan" <[email protected]> wrote in message
    news:[email protected]...
    > Thats Good,
    > "Ms. P." <[email protected]> wrote in message
    > news:[email protected]...
    >> 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","Error
    >>> Message"))))))
    >>>
    >>> Regards,
    >>> Alan.
    >>> "Alan" <[email protected]> wrote in message
    >>> news:[email protected]...
    >>> > =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." <[email protected]> wrote in message
    >>> > news:[email protected]...
    >>> >>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.
    >>> >
    >>> >
    >>>
    >>>
    >>>

    >
    >




  4. #4
    Ms. P.
    Guest

    Re: Nested "If" Function

    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","Error
    > Message"))))))
    >
    > Regards,
    > Alan.
    > "Alan" <[email protected]> wrote in message
    > news:[email protected]...
    > > =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." <[email protected]> wrote in message
    > > news:[email protected]...
    > >>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.

    > >
    > >

    >
    >
    >


  5. #5
    Alan
    Guest

    Re: Nested "If" Function

    Hi Biff,
    Why is a nested IF formula inefficient? Especially in a small file such as
    Ms P. describes? Surely you cant be talking eighties to mid nineties
    processor speeds and disc space? There will be no discernable difference in
    speed of calculation between a nested IF or a VLOOKUP formula in a case such
    as this unless you are using literally thousands of them on a modern PC.
    I would personally use the VLOOKUP option that you proposed that more
    experienced users such as you and I know already about, but, if it does the
    job for someone who is apparently not au fait with Excel formulas then
    what's the beef? The formula I posted leaves little room for expansion as
    there are six IF's there already, but it works so what's the problem?
    Good use of the{}'s by the way,
    Regards,
    Alan.
    Regards,
    Alan.
    "Biff" <[email protected]> wrote in message
    news:[email protected]...
    > Hi!
    >
    > If you're going to use that long inefficient nested IF formula, might as
    > well make it shorter:
    >
    > =IF(B1="","",IF(OR(B1={"LD","WC"}),"DIS",IF(OR(B1={"LF","LM","LP"}),"EXT",IF(B1="T","TMG",IF(B1="R","TVR",IF(OR(B1={"AF","AE","AP"}),"REG","Error
    > Message"))))))
    >
    > Biff
    >
    > "Alan" <[email protected]> wrote in message
    > news:[email protected]...
    >> Thats Good,
    >> "Ms. P." <[email protected]> wrote in message
    >> news:[email protected]...
    >>> 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","Error
    >>>> Message"))))))
    >>>>
    >>>> Regards,
    >>>> Alan.
    >>>> "Alan" <[email protected]> wrote in message
    >>>> news:[email protected]...
    >>>> > =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." <[email protected]> wrote in message
    >>>> > news:[email protected]...
    >>>> >>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.
    >>>> >
    >>>> >
    >>>>
    >>>>
    >>>>

    >>
    >>

    >
    >




  6. #6
    Alan
    Guest

    Re: Nested "If" Function

    =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." <[email protected]> wrote in message
    news:[email protected]...
    >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.




  7. #7
    Biff
    Guest

    Re: Nested "If" Function

    Hi Alan!

    No beef and no problem!

    When I was a typical spreadsheet user I used to build formulas like that
    myself. Back then I had no idea there were forums for this stuff so
    everything I knew I taught myself. Then I found this forum and my knowledge
    grew exponentially!

    The great thing about spreadsheets is that there are usually many ways to
    accomplish a task but usually one of those ways is the best way out of all
    the choices. When I post a reply I try to suggest that best way based solely
    on my experience and knowledge. There are still a lot of things I don't know
    so my suggestions may not always be the best way! In fact, I participate
    here so that I can learn more!

    If we both agree (I think we do!) that a lookup is the best way to go about
    this particular situtation then from my point of view, and as I explained
    above, why not suggest that to the poster?

    No beef and no problem!

    Cheers

    Biff

    "Alan" <[email protected]> wrote in message
    news:[email protected]...
    > Hi Biff,
    > Why is a nested IF formula inefficient? Especially in a small file such as
    > Ms P. describes? Surely you cant be talking eighties to mid nineties
    > processor speeds and disc space? There will be no discernable difference
    > in speed of calculation between a nested IF or a VLOOKUP formula in a case
    > such as this unless you are using literally thousands of them on a modern
    > PC.
    > I would personally use the VLOOKUP option that you proposed that more
    > experienced users such as you and I know already about, but, if it does
    > the job for someone who is apparently not au fait with Excel formulas then
    > what's the beef? The formula I posted leaves little room for expansion as
    > there are six IF's there already, but it works so what's the problem?
    > Good use of the{}'s by the way,
    > Regards,
    > Alan.
    > Regards,
    > Alan.
    > "Biff" <[email protected]> wrote in message
    > news:[email protected]...
    >> Hi!
    >>
    >> If you're going to use that long inefficient nested IF formula, might as
    >> well make it shorter:
    >>
    >> =IF(B1="","",IF(OR(B1={"LD","WC"}),"DIS",IF(OR(B1={"LF","LM","LP"}),"EXT",IF(B1="T","TMG",IF(B1="R","TVR",IF(OR(B1={"AF","AE","AP"}),"REG","Error
    >> Message"))))))
    >>
    >> Biff
    >>
    >> "Alan" <[email protected]> wrote in message
    >> news:[email protected]...
    >>> Thats Good,
    >>> "Ms. P." <[email protected]> wrote in message
    >>> news:[email protected]...
    >>>> 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","Error
    >>>>> Message"))))))
    >>>>>
    >>>>> Regards,
    >>>>> Alan.
    >>>>> "Alan" <[email protected]> wrote in message
    >>>>> news:[email protected]...
    >>>>> > =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." <[email protected]> wrote in message
    >>>>> > news:[email protected]...
    >>>>> >>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.
    >>>>> >
    >>>>> >
    >>>>>
    >>>>>
    >>>>>
    >>>
    >>>

    >>
    >>

    >
    >




  8. #8
    Alan
    Guest

    Re: Nested "If" Function

    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","Error
    Message"))))))

    Regards,
    Alan.
    "Alan" <[email protected]> wrote in message
    news:[email protected]...
    > =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." <[email protected]> wrote in message
    > news:[email protected]...
    >>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.

    >
    >




  9. #9
    Alan
    Guest

    Re: Nested "If" Function

    Thats Good,
    "Ms. P." <[email protected]> wrote in message
    news:[email protected]...
    > 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","Error
    >> Message"))))))
    >>
    >> Regards,
    >> Alan.
    >> "Alan" <[email protected]> wrote in message
    >> news:[email protected]...
    >> > =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." <[email protected]> wrote in message
    >> > news:[email protected]...
    >> >>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.
    >> >
    >> >

    >>
    >>
    >>




  10. #10
    Biff
    Guest

    Re: Nested "If" Function

    Hi!

    If you're going to use that long inefficient nested IF formula, might as
    well make it shorter:

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

    Biff

    "Alan" <[email protected]> wrote in message
    news:[email protected]...
    > Thats Good,
    > "Ms. P." <[email protected]> wrote in message
    > news:[email protected]...
    >> 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","Error
    >>> Message"))))))
    >>>
    >>> Regards,
    >>> Alan.
    >>> "Alan" <[email protected]> wrote in message
    >>> news:[email protected]...
    >>> > =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." <[email protected]> wrote in message
    >>> > news:[email protected]...
    >>> >>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.
    >>> >
    >>> >
    >>>
    >>>
    >>>

    >
    >




  11. #11
    Alan
    Guest

    Re: Nested "If" Function

    Hi Biff,
    Why is a nested IF formula inefficient? Especially in a small file such as
    Ms P. describes? Surely you cant be talking eighties to mid nineties
    processor speeds and disc space? There will be no discernable difference in
    speed of calculation between a nested IF or a VLOOKUP formula in a case such
    as this unless you are using literally thousands of them on a modern PC.
    I would personally use the VLOOKUP option that you proposed that more
    experienced users such as you and I know already about, but, if it does the
    job for someone who is apparently not au fait with Excel formulas then
    what's the beef? The formula I posted leaves little room for expansion as
    there are six IF's there already, but it works so what's the problem?
    Good use of the{}'s by the way,
    Regards,
    Alan.
    Regards,
    Alan.
    "Biff" <[email protected]> wrote in message
    news:[email protected]...
    > Hi!
    >
    > If you're going to use that long inefficient nested IF formula, might as
    > well make it shorter:
    >
    > =IF(B1="","",IF(OR(B1={"LD","WC"}),"DIS",IF(OR(B1={"LF","LM","LP"}),"EXT",IF(B1="T","TMG",IF(B1="R","TVR",IF(OR(B1={"AF","AE","AP"}),"REG","Error
    > Message"))))))
    >
    > Biff
    >
    > "Alan" <[email protected]> wrote in message
    > news:[email protected]...
    >> Thats Good,
    >> "Ms. P." <[email protected]> wrote in message
    >> news:[email protected]...
    >>> 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","Error
    >>>> Message"))))))
    >>>>
    >>>> Regards,
    >>>> Alan.
    >>>> "Alan" <[email protected]> wrote in message
    >>>> news:[email protected]...
    >>>> > =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." <[email protected]> wrote in message
    >>>> > news:[email protected]...
    >>>> >>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.
    >>>> >
    >>>> >
    >>>>
    >>>>
    >>>>

    >>
    >>

    >
    >




  12. #12
    Ms. P.
    Guest

    Re: Nested "If" Function

    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","Error
    > Message"))))))
    >
    > Regards,
    > Alan.
    > "Alan" <[email protected]> wrote in message
    > news:[email protected]...
    > > =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." <[email protected]> wrote in message
    > > news:[email protected]...
    > >>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.

    > >
    > >

    >
    >
    >


  13. #13
    Alan
    Guest

    Re: Nested "If" Function

    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","Error
    Message"))))))

    Regards,
    Alan.
    "Alan" <[email protected]> wrote in message
    news:[email protected]...
    > =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." <[email protected]> wrote in message
    > news:[email protected]...
    >>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.

    >
    >




  14. #14
    Biff
    Guest

    Re: Nested "If" Function

    Hi Alan!

    No beef and no problem!

    When I was a typical spreadsheet user I used to build formulas like that
    myself. Back then I had no idea there were forums for this stuff so
    everything I knew I taught myself. Then I found this forum and my knowledge
    grew exponentially!

    The great thing about spreadsheets is that there are usually many ways to
    accomplish a task but usually one of those ways is the best way out of all
    the choices. When I post a reply I try to suggest that best way based solely
    on my experience and knowledge. There are still a lot of things I don't know
    so my suggestions may not always be the best way! In fact, I participate
    here so that I can learn more!

    If we both agree (I think we do!) that a lookup is the best way to go about
    this particular situtation then from my point of view, and as I explained
    above, why not suggest that to the poster?

    No beef and no problem!

    Cheers

    Biff

    "Alan" <[email protected]> wrote in message
    news:[email protected]...
    > Hi Biff,
    > Why is a nested IF formula inefficient? Especially in a small file such as
    > Ms P. describes? Surely you cant be talking eighties to mid nineties
    > processor speeds and disc space? There will be no discernable difference
    > in speed of calculation between a nested IF or a VLOOKUP formula in a case
    > such as this unless you are using literally thousands of them on a modern
    > PC.
    > I would personally use the VLOOKUP option that you proposed that more
    > experienced users such as you and I know already about, but, if it does
    > the job for someone who is apparently not au fait with Excel formulas then
    > what's the beef? The formula I posted leaves little room for expansion as
    > there are six IF's there already, but it works so what's the problem?
    > Good use of the{}'s by the way,
    > Regards,
    > Alan.
    > Regards,
    > Alan.
    > "Biff" <[email protected]> wrote in message
    > news:[email protected]...
    >> Hi!
    >>
    >> If you're going to use that long inefficient nested IF formula, might as
    >> well make it shorter:
    >>
    >> =IF(B1="","",IF(OR(B1={"LD","WC"}),"DIS",IF(OR(B1={"LF","LM","LP"}),"EXT",IF(B1="T","TMG",IF(B1="R","TVR",IF(OR(B1={"AF","AE","AP"}),"REG","Error
    >> Message"))))))
    >>
    >> Biff
    >>
    >> "Alan" <[email protected]> wrote in message
    >> news:[email protected]...
    >>> Thats Good,
    >>> "Ms. P." <[email protected]> wrote in message
    >>> news:[email protected]...
    >>>> 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","Error
    >>>>> Message"))))))
    >>>>>
    >>>>> Regards,
    >>>>> Alan.
    >>>>> "Alan" <[email protected]> wrote in message
    >>>>> news:[email protected]...
    >>>>> > =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." <[email protected]> wrote in message
    >>>>> > news:[email protected]...
    >>>>> >>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.
    >>>>> >
    >>>>> >
    >>>>>
    >>>>>
    >>>>>
    >>>
    >>>

    >>
    >>

    >
    >




  15. #15
    Alan
    Guest

    Re: Nested "If" Function

    =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." <[email protected]> wrote in message
    news:[email protected]...
    >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.




  16. #16
    Biff
    Guest

    Re: Nested "If" Function

    Hi!

    Create a 2 column table:

    LD..........DIS
    AF..........REG
    R............TVR
    AE..........REG
    etc
    etc

    Assume this table is in the range D1:E10

    Formula:

    =VLOOKUP(B1,D1:E10,2,0)

    Biff

    "Ms. P." <[email protected]> wrote in message
    news:[email protected]...
    >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.




  17. #17
    Biff
    Guest

    Re: Nested "If" Function

    Hi!

    Create a 2 column table:

    LD..........DIS
    AF..........REG
    R............TVR
    AE..........REG
    etc
    etc

    Assume this table is in the range D1:E10

    Formula:

    =VLOOKUP(B1,D1:E10,2,0)

    Biff

    "Ms. P." <[email protected]> wrote in message
    news:[email protected]...
    >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.




  18. #18
    Alan
    Guest

    Re: Nested "If" Function

    =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." <[email protected]> wrote in message
    news:[email protected]...
    >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.




  19. #19
    Alan
    Guest

    Re: Nested "If" Function

    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","Error
    Message"))))))

    Regards,
    Alan.
    "Alan" <[email protected]> wrote in message
    news:[email protected]...
    > =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." <[email protected]> wrote in message
    > news:[email protected]...
    >>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.

    >
    >




  20. #20
    Ms. P.
    Guest

    Re: Nested "If" Function

    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","Error
    > Message"))))))
    >
    > Regards,
    > Alan.
    > "Alan" <[email protected]> wrote in message
    > news:[email protected]...
    > > =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." <[email protected]> wrote in message
    > > news:[email protected]...
    > >>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.

    > >
    > >

    >
    >
    >


  21. #21
    Alan
    Guest

    Re: Nested "If" Function

    Thats Good,
    "Ms. P." <[email protected]> wrote in message
    news:[email protected]...
    > 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","Error
    >> Message"))))))
    >>
    >> Regards,
    >> Alan.
    >> "Alan" <[email protected]> wrote in message
    >> news:[email protected]...
    >> > =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." <[email protected]> wrote in message
    >> > news:[email protected]...
    >> >>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.
    >> >
    >> >

    >>
    >>
    >>




  22. #22
    Biff
    Guest

    Re: Nested "If" Function

    Hi!

    If you're going to use that long inefficient nested IF formula, might as
    well make it shorter:

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

    Biff

    "Alan" <[email protected]> wrote in message
    news:[email protected]...
    > Thats Good,
    > "Ms. P." <[email protected]> wrote in message
    > news:[email protected]...
    >> 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","Error
    >>> Message"))))))
    >>>
    >>> Regards,
    >>> Alan.
    >>> "Alan" <[email protected]> wrote in message
    >>> news:[email protected]...
    >>> > =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." <[email protected]> wrote in message
    >>> > news:[email protected]...
    >>> >>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.
    >>> >
    >>> >
    >>>
    >>>
    >>>

    >
    >




  23. #23
    Alan
    Guest

    Re: Nested "If" Function

    Hi Biff,
    Why is a nested IF formula inefficient? Especially in a small file such as
    Ms P. describes? Surely you cant be talking eighties to mid nineties
    processor speeds and disc space? There will be no discernable difference in
    speed of calculation between a nested IF or a VLOOKUP formula in a case such
    as this unless you are using literally thousands of them on a modern PC.
    I would personally use the VLOOKUP option that you proposed that more
    experienced users such as you and I know already about, but, if it does the
    job for someone who is apparently not au fait with Excel formulas then
    what's the beef? The formula I posted leaves little room for expansion as
    there are six IF's there already, but it works so what's the problem?
    Good use of the{}'s by the way,
    Regards,
    Alan.
    Regards,
    Alan.
    "Biff" <[email protected]> wrote in message
    news:[email protected]...
    > Hi!
    >
    > If you're going to use that long inefficient nested IF formula, might as
    > well make it shorter:
    >
    > =IF(B1="","",IF(OR(B1={"LD","WC"}),"DIS",IF(OR(B1={"LF","LM","LP"}),"EXT",IF(B1="T","TMG",IF(B1="R","TVR",IF(OR(B1={"AF","AE","AP"}),"REG","Error
    > Message"))))))
    >
    > Biff
    >
    > "Alan" <[email protected]> wrote in message
    > news:[email protected]...
    >> Thats Good,
    >> "Ms. P." <[email protected]> wrote in message
    >> news:[email protected]...
    >>> 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","Error
    >>>> Message"))))))
    >>>>
    >>>> Regards,
    >>>> Alan.
    >>>> "Alan" <[email protected]> wrote in message
    >>>> news:[email protected]...
    >>>> > =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." <[email protected]> wrote in message
    >>>> > news:[email protected]...
    >>>> >>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.
    >>>> >
    >>>> >
    >>>>
    >>>>
    >>>>

    >>
    >>

    >
    >




  24. #24
    Biff
    Guest

    Re: Nested "If" Function

    Hi Alan!

    No beef and no problem!

    When I was a typical spreadsheet user I used to build formulas like that
    myself. Back then I had no idea there were forums for this stuff so
    everything I knew I taught myself. Then I found this forum and my knowledge
    grew exponentially!

    The great thing about spreadsheets is that there are usually many ways to
    accomplish a task but usually one of those ways is the best way out of all
    the choices. When I post a reply I try to suggest that best way based solely
    on my experience and knowledge. There are still a lot of things I don't know
    so my suggestions may not always be the best way! In fact, I participate
    here so that I can learn more!

    If we both agree (I think we do!) that a lookup is the best way to go about
    this particular situtation then from my point of view, and as I explained
    above, why not suggest that to the poster?

    No beef and no problem!

    Cheers

    Biff

    "Alan" <[email protected]> wrote in message
    news:[email protected]...
    > Hi Biff,
    > Why is a nested IF formula inefficient? Especially in a small file such as
    > Ms P. describes? Surely you cant be talking eighties to mid nineties
    > processor speeds and disc space? There will be no discernable difference
    > in speed of calculation between a nested IF or a VLOOKUP formula in a case
    > such as this unless you are using literally thousands of them on a modern
    > PC.
    > I would personally use the VLOOKUP option that you proposed that more
    > experienced users such as you and I know already about, but, if it does
    > the job for someone who is apparently not au fait with Excel formulas then
    > what's the beef? The formula I posted leaves little room for expansion as
    > there are six IF's there already, but it works so what's the problem?
    > Good use of the{}'s by the way,
    > Regards,
    > Alan.
    > Regards,
    > Alan.
    > "Biff" <[email protected]> wrote in message
    > news:[email protected]...
    >> Hi!
    >>
    >> If you're going to use that long inefficient nested IF formula, might as
    >> well make it shorter:
    >>
    >> =IF(B1="","",IF(OR(B1={"LD","WC"}),"DIS",IF(OR(B1={"LF","LM","LP"}),"EXT",IF(B1="T","TMG",IF(B1="R","TVR",IF(OR(B1={"AF","AE","AP"}),"REG","Error
    >> Message"))))))
    >>
    >> Biff
    >>
    >> "Alan" <[email protected]> wrote in message
    >> news:[email protected]...
    >>> Thats Good,
    >>> "Ms. P." <[email protected]> wrote in message
    >>> news:[email protected]...
    >>>> 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","Error
    >>>>> Message"))))))
    >>>>>
    >>>>> Regards,
    >>>>> Alan.
    >>>>> "Alan" <[email protected]> wrote in message
    >>>>> news:[email protected]...
    >>>>> > =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." <[email protected]> wrote in message
    >>>>> > news:[email protected]...
    >>>>> >>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.
    >>>>> >
    >>>>> >
    >>>>>
    >>>>>
    >>>>>
    >>>
    >>>

    >>
    >>

    >
    >




  25. #25
    Alan
    Guest

    Re: Nested "If" Function

    =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." <[email protected]> wrote in message
    news:[email protected]...
    >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.




  26. #26
    Alan
    Guest

    Re: Nested "If" Function

    Thats Good,
    "Ms. P." <[email protected]> wrote in message
    news:[email protected]...
    > 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","Error
    >> Message"))))))
    >>
    >> Regards,
    >> Alan.
    >> "Alan" <[email protected]> wrote in message
    >> news:[email protected]...
    >> > =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." <[email protected]> wrote in message
    >> > news:[email protected]...
    >> >>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.
    >> >
    >> >

    >>
    >>
    >>




  27. #27
    Biff
    Guest

    Re: Nested "If" Function

    Hi!

    If you're going to use that long inefficient nested IF formula, might as
    well make it shorter:

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

    Biff

    "Alan" <[email protected]> wrote in message
    news:[email protected]...
    > Thats Good,
    > "Ms. P." <[email protected]> wrote in message
    > news:[email protected]...
    >> 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","Error
    >>> Message"))))))
    >>>
    >>> Regards,
    >>> Alan.
    >>> "Alan" <[email protected]> wrote in message
    >>> news:[email protected]...
    >>> > =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." <[email protected]> wrote in message
    >>> > news:[email protected]...
    >>> >>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.
    >>> >
    >>> >
    >>>
    >>>
    >>>

    >
    >




  28. #28
    Alan
    Guest

    Re: Nested "If" Function

    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","Error
    Message"))))))

    Regards,
    Alan.
    "Alan" <[email protected]> wrote in message
    news:[email protected]...
    > =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." <[email protected]> wrote in message
    > news:[email protected]...
    >>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.

    >
    >




  29. #29
    Biff
    Guest

    Re: Nested "If" Function

    Hi Alan!

    No beef and no problem!

    When I was a typical spreadsheet user I used to build formulas like that
    myself. Back then I had no idea there were forums for this stuff so
    everything I knew I taught myself. Then I found this forum and my knowledge
    grew exponentially!

    The great thing about spreadsheets is that there are usually many ways to
    accomplish a task but usually one of those ways is the best way out of all
    the choices. When I post a reply I try to suggest that best way based solely
    on my experience and knowledge. There are still a lot of things I don't know
    so my suggestions may not always be the best way! In fact, I participate
    here so that I can learn more!

    If we both agree (I think we do!) that a lookup is the best way to go about
    this particular situtation then from my point of view, and as I explained
    above, why not suggest that to the poster?

    No beef and no problem!

    Cheers

    Biff

    "Alan" <[email protected]> wrote in message
    news:[email protected]...
    > Hi Biff,
    > Why is a nested IF formula inefficient? Especially in a small file such as
    > Ms P. describes? Surely you cant be talking eighties to mid nineties
    > processor speeds and disc space? There will be no discernable difference
    > in speed of calculation between a nested IF or a VLOOKUP formula in a case
    > such as this unless you are using literally thousands of them on a modern
    > PC.
    > I would personally use the VLOOKUP option that you proposed that more
    > experienced users such as you and I know already about, but, if it does
    > the job for someone who is apparently not au fait with Excel formulas then
    > what's the beef? The formula I posted leaves little room for expansion as
    > there are six IF's there already, but it works so what's the problem?
    > Good use of the{}'s by the way,
    > Regards,
    > Alan.
    > Regards,
    > Alan.
    > "Biff" <[email protected]> wrote in message
    > news:[email protected]...
    >> Hi!
    >>
    >> If you're going to use that long inefficient nested IF formula, might as
    >> well make it shorter:
    >>
    >> =IF(B1="","",IF(OR(B1={"LD","WC"}),"DIS",IF(OR(B1={"LF","LM","LP"}),"EXT",IF(B1="T","TMG",IF(B1="R","TVR",IF(OR(B1={"AF","AE","AP"}),"REG","Error
    >> Message"))))))
    >>
    >> Biff
    >>
    >> "Alan" <[email protected]> wrote in message
    >> news:[email protected]...
    >>> Thats Good,
    >>> "Ms. P." <[email protected]> wrote in message
    >>> news:[email protected]...
    >>>> 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","Error
    >>>>> Message"))))))
    >>>>>
    >>>>> Regards,
    >>>>> Alan.
    >>>>> "Alan" <[email protected]> wrote in message
    >>>>> news:[email protected]...
    >>>>> > =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." <[email protected]> wrote in message
    >>>>> > news:[email protected]...
    >>>>> >>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.
    >>>>> >
    >>>>> >
    >>>>>
    >>>>>
    >>>>>
    >>>
    >>>

    >>
    >>

    >
    >




  30. #30
    Alan
    Guest

    Re: Nested "If" Function

    Hi Biff,
    Why is a nested IF formula inefficient? Especially in a small file such as
    Ms P. describes? Surely you cant be talking eighties to mid nineties
    processor speeds and disc space? There will be no discernable difference in
    speed of calculation between a nested IF or a VLOOKUP formula in a case such
    as this unless you are using literally thousands of them on a modern PC.
    I would personally use the VLOOKUP option that you proposed that more
    experienced users such as you and I know already about, but, if it does the
    job for someone who is apparently not au fait with Excel formulas then
    what's the beef? The formula I posted leaves little room for expansion as
    there are six IF's there already, but it works so what's the problem?
    Good use of the{}'s by the way,
    Regards,
    Alan.
    Regards,
    Alan.
    "Biff" <[email protected]> wrote in message
    news:[email protected]...
    > Hi!
    >
    > If you're going to use that long inefficient nested IF formula, might as
    > well make it shorter:
    >
    > =IF(B1="","",IF(OR(B1={"LD","WC"}),"DIS",IF(OR(B1={"LF","LM","LP"}),"EXT",IF(B1="T","TMG",IF(B1="R","TVR",IF(OR(B1={"AF","AE","AP"}),"REG","Error
    > Message"))))))
    >
    > Biff
    >
    > "Alan" <[email protected]> wrote in message
    > news:[email protected]...
    >> Thats Good,
    >> "Ms. P." <[email protected]> wrote in message
    >> news:[email protected]...
    >>> 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","Error
    >>>> Message"))))))
    >>>>
    >>>> Regards,
    >>>> Alan.
    >>>> "Alan" <[email protected]> wrote in message
    >>>> news:[email protected]...
    >>>> > =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." <[email protected]> wrote in message
    >>>> > news:[email protected]...
    >>>> >>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.
    >>>> >
    >>>> >
    >>>>
    >>>>
    >>>>

    >>
    >>

    >
    >




  31. #31
    Ms. P.
    Guest

    Re: Nested "If" Function

    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","Error
    > Message"))))))
    >
    > Regards,
    > Alan.
    > "Alan" <[email protected]> wrote in message
    > news:[email protected]...
    > > =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." <[email protected]> wrote in message
    > > news:[email protected]...
    > >>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.

    > >
    > >

    >
    >
    >


  32. #32
    Biff
    Guest

    Re: Nested "If" Function

    Hi!

    Create a 2 column table:

    LD..........DIS
    AF..........REG
    R............TVR
    AE..........REG
    etc
    etc

    Assume this table is in the range D1:E10

    Formula:

    =VLOOKUP(B1,D1:E10,2,0)

    Biff

    "Ms. P." <[email protected]> wrote in message
    news:[email protected]...
    >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.




  33. #33
    Biff
    Guest

    Re: Nested "If" Function

    Hi!

    Create a 2 column table:

    LD..........DIS
    AF..........REG
    R............TVR
    AE..........REG
    etc
    etc

    Assume this table is in the range D1:E10

    Formula:

    =VLOOKUP(B1,D1:E10,2,0)

    Biff

    "Ms. P." <[email protected]> wrote in message
    news:[email protected]...
    >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.




  34. #34
    Alan
    Guest

    Re: Nested "If" Function

    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","Error
    Message"))))))

    Regards,
    Alan.
    "Alan" <[email protected]> wrote in message
    news:[email protected]...
    > =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." <[email protected]> wrote in message
    > news:[email protected]...
    >>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.

    >
    >




  35. #35
    Alan
    Guest

    Re: Nested "If" Function

    =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." <[email protected]> wrote in message
    news:[email protected]...
    >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.




  36. #36
    Biff
    Guest

    Re: Nested "If" Function

    Hi Alan!

    No beef and no problem!

    When I was a typical spreadsheet user I used to build formulas like that
    myself. Back then I had no idea there were forums for this stuff so
    everything I knew I taught myself. Then I found this forum and my knowledge
    grew exponentially!

    The great thing about spreadsheets is that there are usually many ways to
    accomplish a task but usually one of those ways is the best way out of all
    the choices. When I post a reply I try to suggest that best way based solely
    on my experience and knowledge. There are still a lot of things I don't know
    so my suggestions may not always be the best way! In fact, I participate
    here so that I can learn more!

    If we both agree (I think we do!) that a lookup is the best way to go about
    this particular situtation then from my point of view, and as I explained
    above, why not suggest that to the poster?

    No beef and no problem!

    Cheers

    Biff

    "Alan" <[email protected]> wrote in message
    news:[email protected]...
    > Hi Biff,
    > Why is a nested IF formula inefficient? Especially in a small file such as
    > Ms P. describes? Surely you cant be talking eighties to mid nineties
    > processor speeds and disc space? There will be no discernable difference
    > in speed of calculation between a nested IF or a VLOOKUP formula in a case
    > such as this unless you are using literally thousands of them on a modern
    > PC.
    > I would personally use the VLOOKUP option that you proposed that more
    > experienced users such as you and I know already about, but, if it does
    > the job for someone who is apparently not au fait with Excel formulas then
    > what's the beef? The formula I posted leaves little room for expansion as
    > there are six IF's there already, but it works so what's the problem?
    > Good use of the{}'s by the way,
    > Regards,
    > Alan.
    > Regards,
    > Alan.
    > "Biff" <[email protected]> wrote in message
    > news:[email protected]...
    >> Hi!
    >>
    >> If you're going to use that long inefficient nested IF formula, might as
    >> well make it shorter:
    >>
    >> =IF(B1="","",IF(OR(B1={"LD","WC"}),"DIS",IF(OR(B1={"LF","LM","LP"}),"EXT",IF(B1="T","TMG",IF(B1="R","TVR",IF(OR(B1={"AF","AE","AP"}),"REG","Error
    >> Message"))))))
    >>
    >> Biff
    >>
    >> "Alan" <[email protected]> wrote in message
    >> news:[email protected]...
    >>> Thats Good,
    >>> "Ms. P." <[email protected]> wrote in message
    >>> news:[email protected]...
    >>>> 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","Error
    >>>>> Message"))))))
    >>>>>
    >>>>> Regards,
    >>>>> Alan.
    >>>>> "Alan" <[email protected]> wrote in message
    >>>>> news:[email protected]...
    >>>>> > =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." <[email protected]> wrote in message
    >>>>> > news:[email protected]...
    >>>>> >>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.
    >>>>> >
    >>>>> >
    >>>>>
    >>>>>
    >>>>>
    >>>
    >>>

    >>
    >>

    >
    >




  37. #37
    Alan
    Guest

    Re: Nested "If" Function

    Hi Biff,
    Why is a nested IF formula inefficient? Especially in a small file such as
    Ms P. describes? Surely you cant be talking eighties to mid nineties
    processor speeds and disc space? There will be no discernable difference in
    speed of calculation between a nested IF or a VLOOKUP formula in a case such
    as this unless you are using literally thousands of them on a modern PC.
    I would personally use the VLOOKUP option that you proposed that more
    experienced users such as you and I know already about, but, if it does the
    job for someone who is apparently not au fait with Excel formulas then
    what's the beef? The formula I posted leaves little room for expansion as
    there are six IF's there already, but it works so what's the problem?
    Good use of the{}'s by the way,
    Regards,
    Alan.
    Regards,
    Alan.
    "Biff" <[email protected]> wrote in message
    news:[email protected]...
    > Hi!
    >
    > If you're going to use that long inefficient nested IF formula, might as
    > well make it shorter:
    >
    > =IF(B1="","",IF(OR(B1={"LD","WC"}),"DIS",IF(OR(B1={"LF","LM","LP"}),"EXT",IF(B1="T","TMG",IF(B1="R","TVR",IF(OR(B1={"AF","AE","AP"}),"REG","Error
    > Message"))))))
    >
    > Biff
    >
    > "Alan" <[email protected]> wrote in message
    > news:[email protected]...
    >> Thats Good,
    >> "Ms. P." <[email protected]> wrote in message
    >> news:[email protected]...
    >>> 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","Error
    >>>> Message"))))))
    >>>>
    >>>> Regards,
    >>>> Alan.
    >>>> "Alan" <[email protected]> wrote in message
    >>>> news:[email protected]...
    >>>> > =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." <[email protected]> wrote in message
    >>>> > news:[email protected]...
    >>>> >>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.
    >>>> >
    >>>> >
    >>>>
    >>>>
    >>>>

    >>
    >>

    >
    >




  38. #38
    Ms. P.
    Guest

    Re: Nested "If" Function

    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","Error
    > Message"))))))
    >
    > Regards,
    > Alan.
    > "Alan" <[email protected]> wrote in message
    > news:[email protected]...
    > > =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." <[email protected]> wrote in message
    > > news:[email protected]...
    > >>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.

    > >
    > >

    >
    >
    >


  39. #39
    Biff
    Guest

    Re: Nested "If" Function

    Hi!

    If you're going to use that long inefficient nested IF formula, might as
    well make it shorter:

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

    Biff

    "Alan" <[email protected]> wrote in message
    news:[email protected]...
    > Thats Good,
    > "Ms. P." <[email protected]> wrote in message
    > news:[email protected]...
    >> 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","Error
    >>> Message"))))))
    >>>
    >>> Regards,
    >>> Alan.
    >>> "Alan" <[email protected]> wrote in message
    >>> news:[email protected]...
    >>> > =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." <[email protected]> wrote in message
    >>> > news:[email protected]...
    >>> >>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.
    >>> >
    >>> >
    >>>
    >>>
    >>>

    >
    >




  40. #40
    Alan
    Guest

    Re: Nested "If" Function

    Thats Good,
    "Ms. P." <[email protected]> wrote in message
    news:[email protected]...
    > 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","Error
    >> Message"))))))
    >>
    >> Regards,
    >> Alan.
    >> "Alan" <[email protected]> wrote in message
    >> news:[email protected]...
    >> > =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." <[email protected]> wrote in message
    >> > news:[email protected]...
    >> >>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.
    >> >
    >> >

    >>
    >>
    >>




  41. #41
    Biff
    Guest

    Re: Nested "If" Function

    Hi!

    Create a 2 column table:

    LD..........DIS
    AF..........REG
    R............TVR
    AE..........REG
    etc
    etc

    Assume this table is in the range D1:E10

    Formula:

    =VLOOKUP(B1,D1:E10,2,0)

    Biff

    "Ms. P." <[email protected]> wrote in message
    news:[email protected]...
    >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.




  42. #42
    Ms. P.
    Guest

    Nested "If" Function

    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.

  43. #43
    Alan
    Guest

    Re: Nested "If" Function

    Thats Good,
    "Ms. P." <[email protected]> wrote in message
    news:[email protected]...
    > 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","Error
    >> Message"))))))
    >>
    >> Regards,
    >> Alan.
    >> "Alan" <[email protected]> wrote in message
    >> news:[email protected]...
    >> > =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." <[email protected]> wrote in message
    >> > news:[email protected]...
    >> >>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.
    >> >
    >> >

    >>
    >>
    >>




  44. #44
    Alan
    Guest

    Re: Nested "If" Function

    =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." <[email protected]> wrote in message
    news:[email protected]...
    >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.




  45. #45
    Alan
    Guest

    Re: Nested "If" Function

    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","Error
    Message"))))))

    Regards,
    Alan.
    "Alan" <[email protected]> wrote in message
    news:[email protected]...
    > =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." <[email protected]> wrote in message
    > news:[email protected]...
    >>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.

    >
    >




  46. #46
    Biff
    Guest

    Re: Nested "If" Function

    Hi Alan!

    No beef and no problem!

    When I was a typical spreadsheet user I used to build formulas like that
    myself. Back then I had no idea there were forums for this stuff so
    everything I knew I taught myself. Then I found this forum and my knowledge
    grew exponentially!

    The great thing about spreadsheets is that there are usually many ways to
    accomplish a task but usually one of those ways is the best way out of all
    the choices. When I post a reply I try to suggest that best way based solely
    on my experience and knowledge. There are still a lot of things I don't know
    so my suggestions may not always be the best way! In fact, I participate
    here so that I can learn more!

    If we both agree (I think we do!) that a lookup is the best way to go about
    this particular situtation then from my point of view, and as I explained
    above, why not suggest that to the poster?

    No beef and no problem!

    Cheers

    Biff

    "Alan" <[email protected]> wrote in message
    news:[email protected]...
    > Hi Biff,
    > Why is a nested IF formula inefficient? Especially in a small file such as
    > Ms P. describes? Surely you cant be talking eighties to mid nineties
    > processor speeds and disc space? There will be no discernable difference
    > in speed of calculation between a nested IF or a VLOOKUP formula in a case
    > such as this unless you are using literally thousands of them on a modern
    > PC.
    > I would personally use the VLOOKUP option that you proposed that more
    > experienced users such as you and I know already about, but, if it does
    > the job for someone who is apparently not au fait with Excel formulas then
    > what's the beef? The formula I posted leaves little room for expansion as
    > there are six IF's there already, but it works so what's the problem?
    > Good use of the{}'s by the way,
    > Regards,
    > Alan.
    > Regards,
    > Alan.
    > "Biff" <[email protected]> wrote in message
    > news:[email protected]...
    >> Hi!
    >>
    >> If you're going to use that long inefficient nested IF formula, might as
    >> well make it shorter:
    >>
    >> =IF(B1="","",IF(OR(B1={"LD","WC"}),"DIS",IF(OR(B1={"LF","LM","LP"}),"EXT",IF(B1="T","TMG",IF(B1="R","TVR",IF(OR(B1={"AF","AE","AP"}),"REG","Error
    >> Message"))))))
    >>
    >> Biff
    >>
    >> "Alan" <[email protected]> wrote in message
    >> news:[email protected]...
    >>> Thats Good,
    >>> "Ms. P." <[email protected]> wrote in message
    >>> news:[email protected]...
    >>>> 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","Error
    >>>>> Message"))))))
    >>>>>
    >>>>> Regards,
    >>>>> Alan.
    >>>>> "Alan" <[email protected]> wrote in message
    >>>>> news:[email protected]...
    >>>>> > =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." <[email protected]> wrote in message
    >>>>> > news:[email protected]...
    >>>>> >>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.
    >>>>> >
    >>>>> >
    >>>>>
    >>>>>
    >>>>>
    >>>
    >>>

    >>
    >>

    >
    >




  47. #47
    Alan
    Guest

    Re: Nested "If" Function

    Hi Biff,
    Why is a nested IF formula inefficient? Especially in a small file such as
    Ms P. describes? Surely you cant be talking eighties to mid nineties
    processor speeds and disc space? There will be no discernable difference in
    speed of calculation between a nested IF or a VLOOKUP formula in a case such
    as this unless you are using literally thousands of them on a modern PC.
    I would personally use the VLOOKUP option that you proposed that more
    experienced users such as you and I know already about, but, if it does the
    job for someone who is apparently not au fait with Excel formulas then
    what's the beef? The formula I posted leaves little room for expansion as
    there are six IF's there already, but it works so what's the problem?
    Good use of the{}'s by the way,
    Regards,
    Alan.
    Regards,
    Alan.
    "Biff" <[email protected]> wrote in message
    news:[email protected]...
    > Hi!
    >
    > If you're going to use that long inefficient nested IF formula, might as
    > well make it shorter:
    >
    > =IF(B1="","",IF(OR(B1={"LD","WC"}),"DIS",IF(OR(B1={"LF","LM","LP"}),"EXT",IF(B1="T","TMG",IF(B1="R","TVR",IF(OR(B1={"AF","AE","AP"}),"REG","Error
    > Message"))))))
    >
    > Biff
    >
    > "Alan" <[email protected]> wrote in message
    > news:[email protected]...
    >> Thats Good,
    >> "Ms. P." <[email protected]> wrote in message
    >> news:[email protected]...
    >>> 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","Error
    >>>> Message"))))))
    >>>>
    >>>> Regards,
    >>>> Alan.
    >>>> "Alan" <[email protected]> wrote in message
    >>>> news:[email protected]...
    >>>> > =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." <[email protected]> wrote in message
    >>>> > news:[email protected]...
    >>>> >>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.
    >>>> >
    >>>> >
    >>>>
    >>>>
    >>>>

    >>
    >>

    >
    >




  48. #48
    Ms. P.
    Guest

    Re: Nested "If" Function

    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","Error
    > Message"))))))
    >
    > Regards,
    > Alan.
    > "Alan" <[email protected]> wrote in message
    > news:[email protected]...
    > > =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." <[email protected]> wrote in message
    > > news:[email protected]...
    > >>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.

    > >
    > >

    >
    >
    >


  49. #49
    Biff
    Guest

    Re: Nested "If" Function

    Hi!

    If you're going to use that long inefficient nested IF formula, might as
    well make it shorter:

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

    Biff

    "Alan" <[email protected]> wrote in message
    news:[email protected]...
    > Thats Good,
    > "Ms. P." <[email protected]> wrote in message
    > news:[email protected]...
    >> 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","Error
    >>> Message"))))))
    >>>
    >>> Regards,
    >>> Alan.
    >>> "Alan" <[email protected]> wrote in message
    >>> news:[email protected]...
    >>> > =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." <[email protected]> wrote in message
    >>> > news:[email protected]...
    >>> >>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.
    >>> >
    >>> >
    >>>
    >>>
    >>>

    >
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1