+ Reply to Thread
Results 1 to 7 of 7

How do I set up a conditional function in Excel

  1. #1
    Kamsa
    Guest

    How do I set up a conditional function in Excel

    Help, I think I have done this before but cannot remember or how I did it.

    For a risk log, I want a formular that will pick up from 2 cells a number of
    combinations and give me the result in the third cell

    ie. Risk If cell a is "L" and cell b "L@ then cell c should be "L"
    however if a is "L" and cell b is "M" then cell c should "M"
    and if a is "L and b is "H" then c should be "M"
    and if a is "M" and b is "H" then c should "H"



  2. #2
    Bob Phillips
    Guest

    Re: How do I set up a conditional function in Excel

    =IF(A2="L",IF(B2="L","L",IF(OR(B2="M",B2="H"),"M","")),IF(AND(A2="M",B2="H")
    ,"H",""))

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Kamsa" <[email protected]> wrote in message
    news:[email protected]...
    > Help, I think I have done this before but cannot remember or how I did it.
    >
    > For a risk log, I want a formular that will pick up from 2 cells a number

    of
    > combinations and give me the result in the third cell
    >
    > ie. Risk If cell a is "L" and cell b "L@ then cell c should be "L"
    > however if a is "L" and cell b is "M" then cell c should "M"
    > and if a is "L and b is "H" then c should be "M"
    > and if a is "M" and b is "H" then c should "H"
    >
    >




  3. #3
    Peo Sjoblom
    Guest

    Re: How do I set up a conditional function in Excel

    One way

    =IF(AND(A1="L",B1="L@"),A1,IF(AND(A1="L",B1="M"),B1,IF(AND(A1="L",B1="H"),"M
    ",IF(AND(A1="M",B1="H"),B1,""))))

    assuming that if neither of the conditions are true, blank result


    Regards,

    Peo Sjoblom


    "Kamsa" <[email protected]> wrote in message
    news:[email protected]...
    > Help, I think I have done this before but cannot remember or how I did it.
    >
    > For a risk log, I want a formular that will pick up from 2 cells a number

    of
    > combinations and give me the result in the third cell
    >
    > ie. Risk If cell a is "L" and cell b "L@ then cell c should be "L"
    > however if a is "L" and cell b is "M" then cell c should "M"
    > and if a is "L and b is "H" then c should be "M"
    > and if a is "M" and b is "H" then c should "H"
    >
    >




  4. #4
    Max
    Guest

    Re: How do I set up a conditional function in Excel

    One way ..

    Assuming lookup values in cols A and B, from row1 down

    Put in the formula bar for C1,
    array-enter (press CTRL+SHIFT+ENTER):

    =INDEX({"L";"M";"M";"H"},
    MATCH(1,(A1={"L";"L";"L";"M"})*(B1={"L@";"M";"H";"H"}),0))

    Copy C1 down
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "Kamsa" <[email protected]> wrote in message
    news:[email protected]...
    > Help, I think I have done this before but cannot remember or how I did it.
    >
    > For a risk log, I want a formular that will pick up from 2 cells a number

    of
    > combinations and give me the result in the third cell
    >
    > ie. Risk If cell a is "L" and cell b "L@ then cell c should be "L"
    > however if a is "L" and cell b is "M" then cell c should "M"
    > and if a is "L and b is "H" then c should be "M"
    > and if a is "M" and b is "H" then c should "H"
    >
    >




  5. #5
    Bob Phillips
    Guest

    Re: How do I set up a conditional function in Excel

    I think the @ was a typo, there was no closing quote. I made the same
    mistake until I saw the hyperlinking <G>

    Bob

    "Max" <[email protected]> wrote in message
    news:[email protected]...
    > One way ..
    >
    > Assuming lookup values in cols A and B, from row1 down
    >
    > Put in the formula bar for C1,
    > array-enter (press CTRL+SHIFT+ENTER):
    >
    > =INDEX({"L";"M";"M";"H"},
    > MATCH(1,(A1={"L";"L";"L";"M"})*(B1={"L@";"M";"H";"H"}),0))
    >
    > Copy C1 down
    > --
    > Rgds
    > Max
    > xl 97
    > ---
    > Singapore, GMT+8
    > xdemechanik
    > http://savefile.com/projects/236895
    > --
    > "Kamsa" <[email protected]> wrote in message
    > news:[email protected]...
    > > Help, I think I have done this before but cannot remember or how I did

    it.
    > >
    > > For a risk log, I want a formular that will pick up from 2 cells a

    number
    > of
    > > combinations and give me the result in the third cell
    > >
    > > ie. Risk If cell a is "L" and cell b "L@ then cell c should be "L"
    > > however if a is "L" and cell b is "M" then cell c should "M"
    > > and if a is "L and b is "H" then c should be "M"
    > > and if a is "M" and b is "H" then c should "H"
    > >
    > >

    >
    >




  6. #6
    Max
    Guest

    Re: How do I set up a conditional function in Excel

    "Bob Phillips" wrote
    > I think the @ was a typo, there was no closing quote. I made the same
    > mistake until I saw the hyperlinking <G>


    Aha, you're right, I fell for it, just like Peo <g>
    Great razor-sharp eyesight there, Bob !
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  7. #7
    Alok
    Guest

    RE: How do I set up a conditional function in Excel

    Another way which uses an in memory table and vlookup.

    =IF(ISNA(VLOOKUP(A1 &
    B1,{"LL","L";"LM","M";"LH","M";"MH","H"},2,FALSE)),"",VLOOKUP(A1 &
    B1,{"LL","L";"LM","M";"LH","M";"MH","H"},2,FALSE))

    Alok

    "Kamsa" wrote:

    > Help, I think I have done this before but cannot remember or how I did it.
    >
    > For a risk log, I want a formular that will pick up from 2 cells a number of
    > combinations and give me the result in the third cell
    >
    > ie. Risk If cell a is "L" and cell b "L@ then cell c should be "L"
    > however if a is "L" and cell b is "M" then cell c should "M"
    > and if a is "L and b is "H" then c should be "M"
    > and if a is "M" and b is "H" then c should "H"
    >
    >


+ 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