+ Reply to Thread
Results 1 to 5 of 5

Help with IF AND OR

  1. #1
    Registered User
    Join Date
    03-21-2019
    Location
    Chicago
    MS-Off Ver
    2013
    Posts
    2

    Help with IF AND OR

    I'm really new at all of this and I've been racking my brain for a while on this. To no avail, I am coming up with errors.

    Here's what I'm trying to do:

    I need to get a cell to read "Flammable" only under these conditions:

    “FLAMMABLE” ONLY IF B22 > 1000, but < 8820

    AND

    “FLAMMABLE” ONLY WHEN B22 is >8820 AND THERE ARE VALUES GREATER THAN 0 in ANY of the following boxes: C22,E22:G22,I22,K22,M22,N22

    Any help would be greatly appreciated!

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2003,2007,2010
    Posts
    29,342

    Re: Help with IF AND OR

    Try:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Excel Aid

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    6,522

    Re: Help with IF AND OR

    =IF(or(AND( B22 > 1000, B22 < 8820), and(sum(B22 > 8820, C22,E22:G22,I22,K22,M22,N22)>0)), "FLAMMABLE", "")
    Last edited by mehmetcik; 03-21-2019 at 06:25 PM.
    Please Avoid Joining My List Of Blocked Users by:

    Saying Please and Thank you.

    Making requests not demands.

    Checking back on your post. I will not edit any post after 4 days.

    Marking threads as closed once your issue is resolved. How? The tools at the top

    Any reputation (*) points appreciated. None of us gets paid here.

    If you found someone's input useful, please take a second to click the * at the bottom left to let them know

  4. #4
    Valued Forum Contributor
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010
    Posts
    907

    Re: Help with IF AND OR

    I'm confused, but that's fine - ignore me if the following makes no sense.


    For the sake of the following discussion:
    Expression-1 =
    “FLAMMABLE” ONLY IF B22 > 1000, but < 8820

    Expression-2 =
    “FLAMMABLE” ONLY WHEN B22 is >8820 AND THERE ARE VALUES GREATER THAN 0 in ANY of the following boxes: C22,E22:G22,I22,K22,M22,N22

    The required result is Expression-1 AND Expression-2

    If B22>= 8820 then Expression-1 is FALSE and so the whole expression is FALSE

    If B22 < 8820 then Expression-2 is FALSE and so the whole expression is FALSE.

    So in summary we should never get Flammable = TRUE

  5. #5
    Registered User
    Join Date
    03-21-2019
    Location
    Chicago
    MS-Off Ver
    2013
    Posts
    2

    Thumbs up Re: Help with IF AND OR

    This worked perfectly mehmetcik , thank you so much.

+ 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