+ Reply to Thread
Results 1 to 8 of 8

IF Formula with 3 outcomes

  1. #1
    Forum Contributor
    Join Date
    04-05-2013
    Location
    CT
    MS-Off Ver
    Excel 2010
    Posts
    360

    IF Formula with 3 outcomes

    I'm looking for an IF formula that does the following:

    If cell 014 is less than or equal to 0 than = 2, if cell O14 is between 1 and 300 than = 1, if cell 014 is greater than 300 than = 0.

    Not really good with these IF formulas yet.
    Last edited by adamheon; 11-08-2013 at 10:14 AM.

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: IF Formula with 3 outcomes

    If O14 can be a fraction:
    =IF(O14<=0, 2, IF(AND(O14>=1, O14<=300), 1, IF(O14>300, 0, "")

    If O14 is a whole number
    =IF(O14<=0, 2, IF(O14<=300, 1, 0)
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: IF Formula with 3 outcomes

    =if(o14<=0,2,if(o14>300,0,1))

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: IF Formula with 3 outcomes

    Try

    =(O14<=0)+(O14<=300)

  5. #5
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: IF Formula with 3 outcomes

    A slightly different approach:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  6. #6
    Forum Contributor
    Join Date
    04-05-2013
    Location
    CT
    MS-Off Ver
    Excel 2010
    Posts
    360

    Re: IF Formula with 3 outcomes

    Great thanks!

    I just realized i actually need to to be:

    if O14 is between 0 and -300 than = 2, if greater than 1 = 1, if less than -300 = 0

  7. #7
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: IF Formula with 3 outcomes

    =if(O14>1,1,if(<-300,0,2))

  8. #8
    Forum Contributor
    Join Date
    04-05-2013
    Location
    CT
    MS-Off Ver
    Excel 2010
    Posts
    360

    Re: IF Formula with 3 outcomes

    great that worked perfect.

    Just had to had 014 after the (

    =IF(O14>1,1,IF(O14<-300,0,2))

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Formula that presents three outcomes
    By KENNYS in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-11-2013, 03:54 PM
  2. help with formula with 3 outcomes and several variables.
    By NICK W in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-10-2013, 02:31 AM
  3. IF formula with multiple outcomes
    By warrenr6 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-23-2012, 01:30 PM
  4. If formula used for multiple outcomes
    By Scottiexcel in forum Excel General
    Replies: 1
    Last Post: 07-14-2009, 10:58 PM
  5. formula with 6 outcomes to return 4
    By excellentexcel in forum Excel General
    Replies: 3
    Last Post: 04-05-2009, 07:24 AM

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