+ Reply to Thread
Results 1 to 6 of 6

Excel 2007 : Nested IF functions

  1. #1
    Registered User
    Join Date
    11-11-2009
    Location
    Seattle
    MS-Off Ver
    Excel 2007
    Posts
    2

    Nested IF functions

    Hi,

    I am trying to set up an IF function, and it has the following conditions:

    If A1=High & B1=Maximum then C1= High
    If A1=High & B1=Moderate then C1= High
    If A1=High & B1=Lowthen C1= Moderate
    If A1=Moderate/low & B1=Low then C1= Low
    If A1=Moderate/low & B1=Moderate then C1= Low
    If A1=Moderate/low & B1=Maximum then C1= Moderate

    Is there any way to put all of that together in a single function?

    Please Help!

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Nested IF functions

    maybe this formula in C1

    Please Login or Register  to view this content.

    assuming that A1 will only ever have either of the two values and B1 only ever have one of the three you listed.
    Last edited by teylyn; 11-11-2009 at 09:57 PM.

  3. #3
    Forum Expert darkyam's Avatar
    Join Date
    03-05-2008
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    2,191

    Re: Nested IF functions

    Teylyn, just an FYI: when you use long formulas, this system puts a space after every 100 characters. For that reason, it's often best to use code wrappers for them.

  4. #4
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Nested IF functions

    thanks, darkyam. added code tags above.

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Nested IF functions

    How about:

    =IF(NOT(A1="High"), IF(B1="Maximum","Moderate","Low"), IF(B1="Low", "Moderate", "High"))

    (hat-tip to Teylyn)

    You should probably have a test to make sure the formula should run at all...something like:

    =IF(OR(A1="",B1=""), "", IF(NOT(A1="High"), IF(B1="Maximum","Moderate","Low"), IF(B1="Low", "Moderate", "High")))
    Last edited by JBeaucaire; 11-11-2009 at 10:11 PM.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  6. #6
    Registered User
    Join Date
    11-11-2009
    Location
    Seattle
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Nested IF functions

    Quote Originally Posted by teylyn View Post
    maybe this formula in C1

    Please Login or Register  to view this content.

    assuming that A1 will only ever have either of the two values and B1 only ever have one of the three you listed.
    Teylyn,

    It worked! Thank you for your help!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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