+ Reply to Thread
Results 1 to 8 of 8

Formula to Display Values Based on 2 Criteria

  1. #1
    Forum Contributor
    Join Date
    08-10-2016
    Location
    Minneapolis, Minnesota
    MS-Off Ver
    Office 365
    Posts
    124

    Formula to Display Values Based on 2 Criteria

    Hi,

    I have attached a sample spreadsheet to better explain what needs to happen.
    In the spreadsheet, I have a table that is generated by SQL. Form this table I need to pull out certain sections. The Sections that I need to pull out are in the table next to it in yellow.
    I need to type in base (in this case W128636; This will populate the table) and SubNo (in this case 5), the result needs to be a list of rsc.

    I have tried the following array: {=IFERROR(INDEX($E$2:$E$41,MATCH(0,IF($H3=$C2:$C41,COUNTIF($H3:H3,$E$2:$E$41),""),0)),"")}
    This array work except it removes all duplicates and I need it to display everything preferably in a column (highlighted in yellow) instead of a row.

    (BASE WILL NEVER CHANGE, ONLY subNo)

    Thank you
    Attached Files Attached Files
    Last edited by YuriyBaron; 07-01-2018 at 11:09 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    04-01-2015
    Location
    The Netherlands
    MS-Off Ver
    2003/2007/2010/2016/office 365
    Posts
    880

    Re: Formula to Display Values Based on 2 Criteria

    With a pivotable?
    Test(55).xlsx

  3. #3
    Forum Contributor
    Join Date
    08-10-2016
    Location
    Minneapolis, Minnesota
    MS-Off Ver
    Office 365
    Posts
    124

    Re: Formula to Display Values Based on 2 Criteria

    How will a pivot table know the SubNo? PivotTables cannot be modified with variable inputs. PivotTables (to my knowledge) only work with preset data, not variable data.

    In this example, let's say that the SubNo changed from 5 to 7 in cell H2. How will the information in the pivot table update to represent the new variable?

  4. #4
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,447

    Re: Formula to Display Values Based on 2 Criteria

    Try this in I3:
    Please Login or Register  to view this content.
    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.
    Drag down.
    Quang PT

  5. #5
    Forum Contributor
    Join Date
    08-10-2016
    Location
    Minneapolis, Minnesota
    MS-Off Ver
    Office 365
    Posts
    124

    Re: Formula to Display Values Based on 2 Criteria

    I tried this and while everything worked, it did get rid of all duplicates. Please review this in the newly attached spreadsheet.
    Attached Files Attached Files

  6. #6
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,447

    Re: Formula to Display Values Based on 2 Criteria

    OK I see the situation. Try this instead:

    Please Login or Register  to view this content.
    CSE

  7. #7
    Forum Contributor
    Join Date
    08-10-2016
    Location
    Minneapolis, Minnesota
    MS-Off Ver
    Office 365
    Posts
    124

    Re: Formula to Display Values Based on 2 Criteria

    Worked Perfectly! Thank you for your assistance!

    Reputation added and thread closed!

  8. #8
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: Formula to Display Values Based on 2 Criteria

    Quote Originally Posted by YuriyBaron View Post
    (BASE WILL NEVER CHANGE, ONLY subNo)
    Done with PowerQuery

    Power Query for

+ 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. Display values from a second Worksheet in a userform based on Criteria
    By anthony1312002 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-12-2018, 10:02 AM
  2. Replies: 8
    Last Post: 04-17-2016, 01:21 PM
  3. Replies: 1
    Last Post: 11-09-2014, 06:04 PM
  4. [SOLVED] Lookup and display values in order based on different date criteria.
    By sandman85 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-13-2014, 02:57 AM
  5. [SOLVED] Formula to display contacts based on common criteria
    By Blubirdjim in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-19-2012, 11:31 AM
  6. Replies: 3
    Last Post: 02-06-2012, 04:55 PM
  7. How to display all values based on one criteria
    By cojast in forum Excel General
    Replies: 2
    Last Post: 07-02-2008, 01:54 PM

Tags for this Thread

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