+ Reply to Thread
Results 1 to 3 of 3

Match lookup array more than 1 column

  1. #1
    Registered User
    Join Date
    06-20-2019
    Location
    Los Angeles, USA
    MS-Off Ver
    2019
    Posts
    5

    Question Match lookup array more than 1 column

    Hello, I'm trying to find the first cell value that matches 2 conditions:
    1st condition is the Registered day
    2nd condition is the desired professor for the shift

    When both conditions are met, the first person to match the conditions goes on top of the corresponding shift with professor.

    Here is what my sheet1 looks like:
    1.png

    And here is what my sheet 2 should looks like:
    2.png

    I used
    =INDEX(Sheet1!B2:B51, MATCH(1, (Sheet1!D2:D51=Sheet2!A2)*(Sheet1!I2:I51=Sheet2!B6),0), 1)
    and works fine for Person 1's Monday AM schedule

    but this does not go through columns E to H or J to M so I edited to
    =INDEX(Sheet1!B2:B51, MATCH(1, (Sheet1!D2:H51=Sheet2!A2)*(Sheet1!I2:M51=Sheet2!B6),0), 1)
    and I'm getting #N/A error.

    I figured that lookup array only sweeps 1 column but would there be any alternative way I can make this work?



    ps. I couldn't attach the excel file in the previous post so I've deleted the old post to repost
    Attached Files Attached Files
    Last edited by ams3401; 06-23-2019 at 04:14 AM.

  2. #2
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: Match lookup array more than 1 column

    =IFERROR(INDEX(Sheet1!$B$1:$B$51, AGGREGATE(15,6, ROW(Sheet1!$B$2:$B$51)/ISNUMBER(SEARCH(A$2,Sheet1!$D$2:$D$51))/(Sheet1!$I$2:$I$51=B$5)/ISNUMBER(SEARCH(A$4,Sheet1!$D$2:$D$51)),ROWS($A$6:$A6))), "")
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    06-20-2019
    Location
    Los Angeles, USA
    MS-Off Ver
    2019
    Posts
    5

    Re: Match lookup array more than 1 column

    Quote Originally Posted by tim201110 View Post
    =IFERROR(INDEX(Sheet1!$B$1:$B$51, AGGREGATE(15,6, ROW(Sheet1!$B$2:$B$51)/ISNUMBER(SEARCH(A$2,Sheet1!$D$2:$D$51))/(Sheet1!$I$2:$I$51=B$5)/ISNUMBER(SEARCH(A$4,Sheet1!$D$2:$D$51)),ROWS($A$6:$A6))), "")
    Thanks for the reply!
    I think it's probably me that cannot put this formula into application but,
    would there be any way to get this formula to sweep through D:H and I:M?

    For example, Person 4 can have Wednesday PM with corresponding Supervisor as a first shift in column D
    but our current formula only thinks column D is for Monday AM.

    Thanks again in advance



    UPDATE

    Nvm, solved with this fuction
    =IFERROR(INDEX(Sheet1!$B$1:$B$51, AGGREGATE(15,6, ROW(Sheet1!$B$2:$B$51)/ISNUMBER(SEARCH($A$3,Sheet1!$D$2:$H$51))/(Sheet1!$I$2:$M$51=A$5)/ISNUMBER(SEARCH(A$4,Sheet1!$D$2:$H$51)),ROWS(A$6:A6))), "")
    Now, I'm trying to figure out how each person gets its cell filled with corresponding color of level
    Ex. Level 3 person gets purple color, Level 1 gets yellow, so on.
    Last edited by ams3401; 06-23-2019 at 02:46 AM.

+ 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] Deleted
    By ams3401 in forum Excel General
    Replies: 2
    Last Post: 06-22-2019, 02:42 AM
  2. Use Index Match or lookup to create array from array
    By kinemagichemistry in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-01-2018, 02:27 PM
  3. [SOLVED] Index Match with Partial Match in Lookup Array
    By AliGW in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-22-2016, 03:13 PM
  4. [SOLVED] 2 Column Lookup with 6 Column array Col index number is Varies Within Entire Array
    By Weasyb in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-05-2015, 12:54 PM
  5. Replies: 6
    Last Post: 04-30-2014, 02:42 AM
  6. Replies: 7
    Last Post: 06-19-2011, 12:51 PM
  7. Array and Match/Lookup
    By consigo in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-13-2010, 08:25 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