+ Reply to Thread
Results 1 to 3 of 3

Formula to show all items that match two criteria?

  1. #1
    Forum Contributor
    Join Date
    07-22-2009
    Location
    Minneapolis, MN
    MS-Off Ver
    2016
    Posts
    220

    Formula to show all items that match two criteria?

    Row\Col
    A
    B
    C
    D
    E
    1
    ITEM QTY LOCATION LOC_TO_MATCH ITEMS_MATCH
    2
    Item 1
    -1
    Location 1 Location 3 Item 3
    3
    Item 2
    1
    Location 2 Item 5
    4
    Item 3
    -1
    Location 3 Item 7
    5
    Item 4
    1
    Location 3
    6
    Item 5
    -1
    Location 3
    7
    Item 6
    1
    Location 3
    8
    Item 7
    -1
    Location 3
    9
    Item 8
    1
    Location 4
    10
    Item 9
    -1
    Location 2
    11
    Item 10
    1
    Location 3


    Using the table above as an example, I am looking for help with a formula (probably array) for column "E". The column should list all of the items from column "A" that matches the following two criteria:

    Criteria 1: A negative value in column "B".
    Criteria 2: Column "C" match with cell "$D$2".

    The current values in column "E" are an example of what the array formula would return given the current value in "$D$2".

    Thanks in advance for the help!

  2. #2
    Forum Guru martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Formula to show all items that match two criteria?

    in e2 this array entered formula
    =IFERROR(INDEX($A$2:$A$11,SMALL(IF($C$2:$C$11=$D$2,IF($B$2:$B$11<0,ROW($A$2:$A$11))),ROW(1:1))-1),"")
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Forum Contributor
    Join Date
    07-22-2009
    Location
    Minneapolis, MN
    MS-Off Ver
    2016
    Posts
    220

    Re: Formula to show all items that match two criteria?

    Beautifully done; thank you!!!

+ 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. Replies: 3
    Last Post: 02-07-2014, 03:01 AM
  2. Show Difference of sheet1-sheet2 in sheet3 if items match?
    By nyichiban in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-23-2013, 04:03 PM
  3. List items to new sheet which match specific criteria
    By Toonces in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-25-2013, 02:14 PM
  4. Show info in Column C, if A & B match criteria
    By PowerSchoolDude in forum Excel General
    Replies: 4
    Last Post: 08-21-2009, 03:02 PM
  5. Hide/show specific Pivot Table Items based on multiple criteria
    By wotadude in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-18-2009, 05:15 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