+ Reply to Thread
Results 1 to 3 of 3

Return value when two conditions are met

  1. #1
    Registered User
    Join Date
    12-17-2018
    Location
    Barcelona
    MS-Off Ver
    Home 2013
    Posts
    4

    Return value when two conditions are met

    Hello, I would appreciate some help to finish a formula, I am a bit stuck at the moment.

    I attached an XSL with similar table for more clarity.

    What I am trying to achieve is to return a "DANGER" text in the last column of my table when two conditions are met simultaneously, not just one or the other.

    Currently, the "DANGER" is returned when:
    A) the 4th column ("Duplicados") contains a text value "Duplicado" (I realise this one is a wrong approach, but can't think of a good way to do it)
    B) the 3rd column "Quantity"'s value is greater than 99. (This condition should be fine)

    However, what I would actually need is a slight change of the first condition, so the "DANGER" text value is only returned when Quantity is greater than 100 in duplicated products.

    If Two (or more) clients order +100 oranges, then I need the DANGER value to be returned for those oranges whose quantity value is +100, not the -100 oranges.

    So, for example, in this mock document, Orange should have the "Danger" Value because at least two clients asked for more than 100 oranges, but not the apples because only one client asked for more than 100 apples.

    Thanks a lot in advance (and sorry if I didn't explain myself well)
    Attached Files Attached Files

  2. #2
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Return value when two conditions are met

    Is this right?

    Please try at E2 and drag down

    =IF((SUMPRODUCT(--(($B$11:$B$17=B11)*$C$11:$C$17>99))>1)*(D11="Duplicado")*(C11>99),"DANGER","OK")
    or
    No need column Duplicados
    =IF((SUMPRODUCT(--(($B$11:$B$17=B11)*$C$11:$C$17>99))>1)*(COUNTIF($B$11:$B$17,B11)>1)*(C11>99),"DANGER","OK")

  3. #3
    Registered User
    Join Date
    12-17-2018
    Location
    Barcelona
    MS-Off Ver
    Home 2013
    Posts
    4

    Re: Return value when two conditions are met

    Edit: It does actually work, I must have copied something wrong. Thank you a lot!!
    Last edited by Blaon; 02-03-2019 at 04:27 PM.

+ 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. Return value with two if conditions
    By alecoute in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-18-2018, 09:47 PM
  2. [SOLVED] Return value with two if conditions
    By alecoute in forum Excel General
    Replies: 1
    Last Post: 11-19-2018, 12:08 PM
  3. [SOLVED] Return a Y / N but with many conditions
    By IantheIan in forum Excel General
    Replies: 3
    Last Post: 08-28-2015, 11:56 AM
  4. Return the conditions from Nos.
    By thilag in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-25-2013, 05:59 AM
  5. How to return value if several conditions are met?
    By Coco_Nut in forum Excel General
    Replies: 5
    Last Post: 01-25-2012, 09:29 AM
  6. Return a value from a row where two conditions are met
    By pinkshirt in forum Excel General
    Replies: 1
    Last Post: 07-04-2011, 10:18 AM
  7. Excel 2007 : Return value if two conditions are met
    By MariusH10 in forum Excel General
    Replies: 2
    Last Post: 01-18-2011, 05:01 PM

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