+ Reply to Thread
Results 1 to 9 of 9

Returning Multiple Values via Index Match that are < cell and = to another cell

  1. #1
    Registered User
    Join Date
    06-15-2015
    Location
    NY
    MS-Off Ver
    V10
    Posts
    13

    Returning Multiple Values via Index Match that are < cell and = to another cell

    Good Evening,

    I'm struggling to create a formula that creates a list of employees who fall below a certain salary.

    I have an excel file with thousands of employees - of varying jobs and roles. I've been trying to find a way to identify all of those employees of a certain job (selected in cell B2 (a text value)) who fall below the minimum market salary for that respective job (cell B6 (numeric value)). Therefore, if you select a different job in B2, a different minimum wage appears in B6.

    Say you select "waitress" in cell B2. Cell B6 now correctly shows the minimum market wage for "waitress." However, I have not been able to figure out how to identify all of the employees who fall below that specified range. I'm hoping to be able to create a list of employees that automatically updates as you select different jobs in cell B2...

    I've been trying to index-match the information and I've also been trying index with small & countif to create a "self populating" list. However, I seem to be having an error in terms of the "< than" piece.

    This is as far as I have gotten - but it just doesn't seem to be working...

    =INDEX('Employee Data'!$B$2:$B$4500,SMALL(IF(COUNTIF('Employee Data'!$D$2:$D$4500,"<"&$B$6)*COUNTIF('Employee Data'!$G$2:$G$4500,$B$2),ROW('Employee Data'!D3:D4501)-MIN(ROW('Employee Data'!D3:D4501))+1),ROW('Employee Data'!A2)),COLUMN('Employee Data'!A2))

    B2:B4500 = employee names
    D2:D4500 = employee annual salary
    G2:G4500 = job titles

    Let me know if you have any questions. I hope this makes sense
    Last edited by covanpatten2; 06-19-2015 at 11:05 PM.

  2. #2
    Forum Contributor
    Join Date
    07-10-2012
    Location
    Bangladesh
    MS-Off Ver
    Excel 2007
    Posts
    129

    Re: Returning Multiple Values via Index Match that are < cell and = to another cell

    dear please tell with file and try to use cobination if, and loop

    regards

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Returning Multiple Values via Index Match that are < cell and = to another cell

    Posting a workbook would eliminate some of the guesswork here.

    Make sure there is enough data for us to get it right.
    Remember to desensitize the sample data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Registered User
    Join Date
    06-15-2015
    Location
    NY
    MS-Off Ver
    V10
    Posts
    13

    Re: Returning Multiple Values via Index Match that are < cell and = to another cell

    Hi all,

    I've put together a template document that I hope helps you to better understand what I'm trying to accomplish. I'm trying to build the list of employees that fall under a certain wage on the "work" tab.

    Select the job in B2 and the salary data adjusts in the two boxes below to reflect that job. If there are employees who's salary falls below the minimum in B6 (and eventually also above the maximum if i can get there), a list will form with their names in cell B13 and below. When searching for employees in the "employee data" tab, they must match the job title and be < than salary specified in the "work" tab.

    Does that make sense? Let me know if I can explain further. And thanks for the feedback.

    Template.xlsx

  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,769

    Re: Returning Multiple Values via Index Match that are < cell and = to another cell

    in b13

    =IFERROR(INDEX('Employee Data'!$A$1:$A$500,SMALL(IF(('Employee Data'!$B$1:$B$500<=Work!$B$6)*('Employee Data'!$D$1:$D$500=Work!$B$2),ROW('Employee Data'!$A$1:$A$500),""),ROW(1:1))),"")

    In D13

    =IFERROR(INDEX('Employee Data'!$B$1:$B$500,SMALL(IF(('Employee Data'!$B$1:$B$500<=Work!$B$6)*('Employee Data'!$D$1:$D$500=Work!$B$2),ROW('Employee Data'!$A$1:$A$500),""),ROW(1:1))),"")

    Enter both with Ctrl+Shift+enter

    And I suggest you unwrap B2

  6. #6
    Registered User
    Join Date
    06-15-2015
    Location
    NY
    MS-Off Ver
    V10
    Posts
    13

    Re: Returning Multiple Values via Index Match that are < cell and = to another cell

    JohnTopley - thanks so much. That's EXACTLY what I was looking for, but couldn't seem to figure out!

    Just out of curiosity - for the list starting in D13, is there any reason why you suggest using that formula rather than a simple vlookup that returns the salary of the employee found in B13 (other than maybe the risk of duplication)? Thanks again!

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Returning Multiple Values via Index Match that are < cell and = to another cell

    Quote Originally Posted by JohnTopley View Post
    in b13

    =IFERROR(INDEX('Employee Data'!$A$1:$A$500,SMALL(IF(('Employee Data'!$B$1:$B$500<=Work!$B$6)*('Employee Data'!$D$1:$D$500=Work!$B$2),ROW('Employee Data'!$A$1:$A$500),""),ROW(1:1))),"")

    In D13

    =IFERROR(INDEX('Employee Data'!$B$1:$B$500,SMALL(IF(('Employee Data'!$B$1:$B$500<=Work!$B$6)*('Employee Data'!$D$1:$D$500=Work!$B$2),ROW('Employee Data'!$A$1:$A$500),""),ROW(1:1))),"")
    Better (read: more robust) to use the ROWS( ) function instead of the ROW( ) function. If you insert new rows before row 1 the formula will return incorrect results. The ROWS( ) function will account for this.

    =IFERROR(INDEX('Employee Data'!$A$1:$A$500,SMALL(IF(('Employee Data'!$B$1:$B$500<=Work!$B$6)*('Employee Data'!$D$1:$D$500=Work!$B$2),ROW('Employee Data'!$A$1:$A$500)),ROWS(B$13:B13))),"")

    =IFERROR(INDEX('Employee Data'!$B$1:$B$500,SMALL(IF(('Employee Data'!$B$1:$B$500<=Work!$B$6)*('Employee Data'!$D$1:$D$500=Work!$B$2),ROW('Employee Data'!$A$1:$A$500)),ROWS(D$13:D13))),"")

    Both formulas still array entered!
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,769

    Re: Returning Multiple Values via Index Match that are < cell and = to another cell

    @Tony: Thank you. Will correct and note for future use.

    Re Using VLOOKUP- No reason not to .. I guess I was in "automatic" mode so to just copied the formula. As array formulas are resource consuming then VLOOKUP is probably better. (Tony is better placed than me to comment on performance issues). If the volume (number of rows) is relatively low, then in practical terms it probably makes little difference,

    As you no doubt have discovered there are often many ways to solve a problem: I am always amazed at the ingenuity of the experts!

    But glad to help (plus Tony!)

  9. #9
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Returning Multiple Values via Index Match that are < cell and = to another cell

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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. Returning multiple distinct/repeating values for vlookup or index-match
    By amatvien in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-21-2018, 01:14 PM
  2. [SOLVED] Two criteria Index Match on multiple sheets returning multiple values
    By Joak in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-21-2014, 10:03 AM
  3. [SOLVED] Excel - Returning multiple values in a single cell that match criteria
    By amazinz2006 in forum Excel General
    Replies: 13
    Last Post: 01-25-2014, 09:35 PM
  4. Replies: 8
    Last Post: 06-29-2012, 10:20 PM
  5. Returning MULTIPLE values with Index and Match
    By Fly in forum Excel General
    Replies: 1
    Last Post: 06-01-2006, 12:55 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