+ Reply to Thread
Results 1 to 9 of 9

Using Index match and small to come up with different results from same lookup

  1. #1
    Registered User
    Join Date
    03-16-2015
    Location
    calgary, alberta
    MS-Off Ver
    excel 2010
    Posts
    4

    Using Index match and small to come up with different results from same lookup

    Hi Guys

    In my worksheet I am trying to come up with a form that can assign people to their corresponding shift times.
    The problem is that I have a few instances where I have three different people assigned to the same shift time and it only comes up with the first person assigned to that time.
    From what I've read I have to do something with COUNTIF or SMALL or both. I'm new to excel so I'm having a little trouble trying to wrap my head around this formula.
    I would be grateful for any piece of advice. This is a sample of the formula below that I have in place right now.

    =IFERROR(INDEX('Insert STAS Data'!$A$3:$A$56,(MATCH(SUNDAY!E15,'Insert STAS Data'!$B$3:$B$56,0))),"")

  2. #2
    Forum Contributor
    Join Date
    08-08-2012
    Location
    USA, CA
    MS-Off Ver
    Excel 2007
    Posts
    131

    Re: Using Index match and small to come up with different results from same lookup

    Can you please attach sample data, so we can look at what you are seeing. Thanks, Newb

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

    Re: Using Index match and small to come up with different results from same lookup

    See if this is what you had in mind.

    Data Range
    A
    B
    C
    D
    E
    1
    Employee
    Shift
    ------
    Shift
    Employee
    2
    Bill
    1
    1
    Bill
    3
    Bob
    2
    Betty
    4
    Beth
    3
    Bo
    5
    Betty
    1
    Brad
    6
    Bernard
    2
    7
    Bo
    1
    8
    Babs
    3
    9
    Bridget
    2
    10
    Brad
    1
    11
    Barbra
    3


    We want to list all employees on 1st shift.

    This array formula** entered in E2:

    =IFERROR(INDEX(A:A,SMALL(IF(B$2:B$11=D$2,ROW(B$2:B$11)),ROWS(E$2:E2))),"")

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

    Copy down until you get blanks.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Registered User
    Join Date
    03-16-2015
    Location
    calgary, alberta
    MS-Off Ver
    excel 2010
    Posts
    4

    Re: Using Index match and small to come up with different results from same lookup

    This is the workbook. Thanks for any help.
    Attached Files Attached Files

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

    Re: Using Index match and small to come up with different results from same lookup

    966.3 KB

    Sorry, that's way too big for me to download.

  6. #6
    Registered User
    Join Date
    03-16-2015
    Location
    calgary, alberta
    MS-Off Ver
    excel 2010
    Posts
    4

    Re: Using Index match and small to come up with different results from same lookup

    Here is a smaller attachment. Sorry I forgot I macros in the last one.
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    08-08-2012
    Location
    USA, CA
    MS-Off Ver
    Excel 2007
    Posts
    131

    Re: Using Index match and small to come up with different results from same lookup

    --edit formula =IFERROR(INDEX($A:$A,SMALL(IF(B$2:B$12=$H$1,ROW(B$2:B$12)),ROWS(B$2:B2))),"")
    Change ROWS to B$2:B2

    Hello Sirbletch,

    I would set this up in columns. Please see attachment. upload2.xlsx

    Per Tony's formula, I edited to pull the names into time range.

    =IFERROR(INDEX($A:$A,SMALL(IF(B$2:B$12=$H$1,ROW(B$2:B$12)),ROWS(E$2:E2))),"")

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

    Thanks,
    Newb
    Last edited by newbie4; 03-17-2015 at 02:10 PM. Reason: adjustment to formula

  8. #8
    Registered User
    Join Date
    03-16-2015
    Location
    calgary, alberta
    MS-Off Ver
    excel 2010
    Posts
    4

    Re: Using Index match and small to come up with different results from same lookup

    Thanks guys this helps. I added to both reputations.

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

    Re: Using Index match and small to come up with different results from same lookup

    Good deal. Thanks for the feedback!

    If your question has been solved please mark the thread as being solved.

    In the menu bar above the very first post select Thread Tools, then select Mark this thread as solved.

+ 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. [SOLVED] INDEX MATCH SMALL ROW, Double criteria Lookup
    By GP_SRT in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-22-2013, 11:15 AM
  2. [SOLVED] Formula using INDEX, SMALL, and ISERROR functions gives skewed results
    By rspells in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-09-2013, 03:32 AM
  3. Replies: 6
    Last Post: 10-22-2013, 01:48 PM
  4. How to show results of index small if from left to right
    By suton in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-17-2013, 06:39 AM
  5. Duplicate values returned using Index Match Lookup with Small()
    By jacob@thepenpoint in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-18-2013, 10:48 AM

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