+ Reply to Thread
Results 1 to 5 of 5

How to get TRUE or FALSE based on 2 conditions?

  1. #1
    Registered User
    Join Date
    01-02-2013
    Location
    Cocytus
    MS-Off Ver
    Excel 2016
    Posts
    9

    How to get TRUE or FALSE based on 2 conditions?

    Hello everyone, first of all sorry for making new thread while probably there are already similiar thread. I'm in middle confusion and deadline, so I really need your help.

    In the attachment is sample cases of my problem. In the Sheet1 I have table with Store 1-7 and Product A-D. I need to fill the cell B4 to D10 with a word stating that shop have the product. While the data that contains the list in Sheet2.

    For example, Store 1 got Product A, B, and D. So in the cells B4, C4, and E4 there will be 'TRUE' for stating.

    I try using VLOOKUP, but I can't get it to working under 2 conditions.

    Here's the attachment:
    task.xls


    Pardon my bad English. Thank you for your time to read this and kindly help.

  2. #2
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: How to get TRUE or FALSE based on 2 conditions?

    If you are using Excel 2007:
    =COUNTIFS(Sheet2!$B$3:$B$11,"A",Sheet2!$C$3:$C$11,1)>0
    will return TRUE if there is productA for Store1. If you can change your table headers to only use A and 1 then you can use the same formula in all cells in the table:
    =COUNTIFS(Sheet2!$B$3:$B$11,B$3,Sheet2!$C$3:$C$11,$A4)>0

    If you must use Excel 2003 or an earlier version then you may use:
    =SUMPRODUCT((Sheet2!$B$3:$B$11=B$3)*(Sheet2!$C$3:$C$11=$A4))>0

  3. #3
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: How to get TRUE or FALSE based on 2 conditions?

    task.xls
    With small changes to your layout.
    (it is possible to make formula based on your current layout but it will be much longer)
    If you are http://www.excelforum.com/image.php?type=sigpic&userid=125481&dateline=1392355029happy with the results, please add to the contributor's
    reputation by clicking the reputation icon (star icon).




    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.
    To undo, select Thread Tools-> Mark thread as Unsolved.
    http://www.excelaris.co.uk

  4. #4
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: How to get TRUE or FALSE based on 2 conditions?

    welcome to the forum, vlc_over. try this in B4:
    =COUNTIFS(Sheet2!$B$3:$B$11,SUBSTITUTE(B$3,"PRODUCT ",""),Sheet2!$C$3:$C$11,SUBSTITUTE($A4,"STORE ",""))>0

    i had to use SUBSTITUTE because your data dont match. in sheet1 it's STORE1. in sheet2, it's 1. suppose your real data has no such issues, then:
    =COUNTIFS(Sheet2!$B$3:$B$11,B$3,Sheet2!$C$3:$C$11,$A4)>0

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  5. #5
    Registered User
    Join Date
    01-02-2013
    Location
    Cocytus
    MS-Off Ver
    Excel 2016
    Posts
    9

    Re: How to get TRUE or FALSE based on 2 conditions?

    Everyone, thank you so much for your help!

    Finally, my problem is solved. Once again, thank you very much.

+ 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. with conditions create formula for true or false
    By perusjosh in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-07-2013, 02:09 AM
  2. [SOLVED]True, False conditions and numbers to grab
    By S3b in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-20-2011, 03:18 PM
  3. Check four conditions return TRUE or FALSE
    By mkvassh in forum Excel General
    Replies: 6
    Last Post: 11-16-2009, 07:26 AM
  4. How do I satisfy 3 of 4 conditions and get a true/false result?
    By Baron J79 in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 04-15-2008, 03:21 AM
  5. how to use true or false conditions
    By buff in forum Excel General
    Replies: 2
    Last Post: 05-21-2006, 06:40 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