+ Reply to Thread
Results 1 to 6 of 6

Index Match + UDF

  1. #1
    Forum Contributor
    Join Date
    05-27-2012
    Location
    New Brunswick, Canada
    MS-Off Ver
    Excel 2016
    Posts
    327

    Index Match + UDF

    I have the following UDF to get the first colored cell in a range. What I'd like to do is find the first colored cell in a range but use Index Match to determine the range/row to look in.

    Q2:Q12 has the numbers I want to match from Column B
    I've manually added the answers into R2:R12
    S2 has an example of the Function below.

    Does anyone know if that's possible? If it can be done without the UDF, that would be even better but I suspect not.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Index Match + UDF

    This appears to work w/o a UDF...
    =IF(VLOOKUP(Q2,$B$2:$C$40,2,FALSE)<>"X",VLOOKUP(Q2,$B$2:$C$40,2,FALSE),IF(VLOOKUP(Q2,$B$2:$D$40,3,FALSE)<>"X",VLOOKUP(Q2,$B$2:$D$40,3,FALSE),VLOOKUP(Q2,$B$2:$E$40,4,FALSE)))
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Index Match + UDF

    BTW, I'm not crazy about using table names so I just used the cell addresses but they do refer to your table areas.

  4. #4
    Forum Contributor
    Join Date
    05-27-2012
    Location
    New Brunswick, Canada
    MS-Off Ver
    Excel 2016
    Posts
    327

    Re: Index Match + UDF

    Hey Sam,
    I appreciate your answer but I guess I should've mentioned that the letters will all be X's - it's basically a chart to indicate what skills people have but I just removed the sensitive information. The only reason I used different letters was so I could tell if it was giving me the right cell.

  5. #5
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,910

    Re: Index Match + UDF

    Try this in R2

    =FindCellOfColor(INDEX($C$2:$G$40,MATCH(Q2,$B$2:$B$40,0),0),3)

  6. #6
    Forum Contributor
    Join Date
    05-27-2012
    Location
    New Brunswick, Canada
    MS-Off Ver
    Excel 2016
    Posts
    327

    Re: Index Match + UDF

    Ah there we go! Thanks! I was racking my brain on getting the right cell references and syntax. Much appreciated!

+ 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 instead of VLOOKUP+MATCH, why is INDEX a better choice and how to re-write?
    By Renejorgensen in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-23-2016, 10:54 AM
  2. [SOLVED] Index / Match - match 3 input values and return the results from the index
    By t83357 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-08-2016, 07:34 PM
  3. [SOLVED] Match-Index in stead of Index-Match lookup Array among Arrays
    By Numnum in forum Excel General
    Replies: 2
    Last Post: 10-15-2015, 02:08 PM
  4. INDEX MATCH MATCH/OFFSET MATCH MATCH with named ranges
    By Andrew-Mark in forum Excel General
    Replies: 3
    Last Post: 02-27-2015, 10:56 PM
  5. Replies: 6
    Last Post: 04-30-2014, 02:42 AM
  6. Replies: 6
    Last Post: 11-08-2013, 10:29 PM
  7. Replies: 3
    Last Post: 05-02-2013, 01:31 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