+ Reply to Thread
Results 1 to 7 of 7

VLOOKUP or INDEX Match for Grades based on Team

  1. #1
    Forum Contributor
    Join Date
    07-17-2015
    Location
    Roanoke, Virginia
    MS-Off Ver
    2010
    Posts
    173

    VLOOKUP or INDEX Match for Grades based on Team

    Looking for a singular formula to look at a grade chart D-A based on a selected Team and give the grade.
    Formula is found in U3
    Mock up file attached

    Basically trying to connect these three stand-alone formulas
    =IF(X1="LCAD",VLOOKUP(Y1,$X$3:$AA$6,4))
    =IF(X1="AI",VLOOKUP(Y1,$Y$3:$AA$6,3))
    =IF(X1="FW",VLOOKUP(Y1,$Z$3:$AA$6,2))

    X1 changes based on team selected
    Y1 is always the calculated numeric grade

    I'm not locked into VLOOKUP if something else will work more efficiently.

    Thanks for the assist.
    Jim
    Attached Files Attached Files

  2. #2
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: VLOOKUP or INDEX Match for Grades based on Team

    How about this:

    Please Login or Register  to view this content.
    Cheers,
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

  3. #3
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,748

    Re: VLOOKUP or INDEX Match for Grades based on Team

    A quick way to combine all three would be a nested IF

    =IF(X1="LCAD",VLOOKUP(Y1,$X$3:$AA$6,4))
    =IF(X1="AI",VLOOKUP(Y1,$Y$3:$AA$6,3))
    =IF(X1="FW",VLOOKUP(Y1,$Z$3:$AA$6,2))

    =IF(X1="LCAD",VLOOKUP(Y1,$X$3:$AA$6,4) , IF(X1="AI",VLOOKUP(Y1,$Y$3:$AA$6,3) , IF(X1="FW",VLOOKUP(Y1,$Z$3:$AA$6,2) ."" )))
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  4. #4
    Forum Contributor
    Join Date
    07-17-2015
    Location
    Roanoke, Virginia
    MS-Off Ver
    2010
    Posts
    173

    Re: VLOOKUP or INDEX Match for Grades based on Team

    Thanks - this is perfect - one of these days I really need to learn INDEX MATCH with proficiency like this.
    Thanks Again
    Jim

  5. #5
    Forum Contributor
    Join Date
    07-30-2014
    Location
    USA
    MS-Off Ver
    Version 14.4.3, Mac 2011
    Posts
    145

    Re: VLOOKUP or INDEX Match for Grades based on Team

    An explanation for help with your proficiency! :D

    =INDEX(AA4:AA6, MATCH(Y1, INDEX(X3:Z6,0,MATCH(X1,X2:Z2,0)), 1), 1)

    The way this works :
    INDEX( Array , Row #, Column #)

    So you know you are looking at the letter grade column "AA4:AA6" but you want to know which one to pick.
    Because this is only a single column we can either put "1" or "0" or nothing in the last argument of INDEX (column #).
    Thus so far we have:
    INDEX(AA4:AA6 , Row #, 1 )
    Now we need the row number, this is the fun part.

    MATCH(Value, ARRAY, [Match Type])
    This amazing formula allows us to determine the place of any entered Value within an array. The [Match Type] can be used to say, we would like to find an exact match for the Value in the ARRAY (fill in a 0)
    or we would like to find the largest value less than or equal to our Value (fill in a 1)
    or the smallest value greater than or equal to our Value (fill in a -1).
    Here we will choose a "1" meaning choose the largest value in the range that is less than our value entered, which makes sense since we haven't passed the cut off for getting the higher grade!
    The Value you have generated is in Y1 so we put that badboy in.
    MATCH(Y1 , ARRAY , 1)
    So far our main formula is now:
    INDEX(AA4:AA6 , MATCH(Y1, ARRAY, 1) , 1 )

    FINDING THE ARRAY!
    So what column are we matching Y1 in? Surely X1 will change "LCAD" to other metrics "AI" or "FW" as you would like so we need a way of selecting a column based on X1. What column is LCAD in? ENTER ANOTHER MATCH FORMULA!
    Find the column # from X2 to Z2 that equals exactly X1!
    MATCH(X1, X2:Z2 , 0)
    Beautiful.
    Now we will get a "1" from this if you have "LCAD" written in X1.
    A "2" if you have "AI" written in X1.
    Or a "3" if you have "FW" written in X1.

    This next step is where Conne did the real magic and stepped out of the mortal realm of INDEX MATCH: INDEX-MATCH-CEPTION.
    First, we take the match function we just created that chooses the correct column number and throw it into an INDEX function of the table of number grades (X4:Z6).
    This says look at the 3x3 table (X4:Z6) and focus on whichever column the MATCH function picks (1, 2, or 3).
    INDEX(X4:Z6, 0,MATCH(X1, X2:Z2 , 0))
    Not too intuitively, the result of this function actuallyis changing from X4:X6 -> Y4:Y6 -> Z:Z6 depending on if we have "LCAD", "AI", or "FW".

    Stick this into the main formula's MATCH's ARRAY so we can properly look up values from the correct column.

    INDEX(AA4:AA6 , MATCH(Y1, ARRAY, 1) , 1 )
    becomes
    INDEX(AA4:AA6 , MATCH(Y1, INDEX(X4:Z6, 0, MATCH(X1, X2:Z2 , 0)), 1) , 1 )
    Which is our final formula.

    INDEX( Array , Row #, Column #)
    INDEX(Letter Grades, (The Row # of a Grade number in a column (selected from 3 choices of columns based on the text in X1) that is less than the generated number in Y1) , Letter Grades is only 1 column wide)

    I hope this was helpful and didn't absolutely confuse you!
    Red
    Last edited by RedSummer; 03-18-2016 at 03:12 PM.

  6. #6
    Forum Contributor
    Join Date
    07-17-2015
    Location
    Roanoke, Virginia
    MS-Off Ver
    2010
    Posts
    173

    Re: VLOOKUP or INDEX Match for Grades based on Team

    Thanks Red - helps alot.
    I think I may need to go cold turkey from Vlookup for a few weeks just so I can get my brain to do this naturally.
    Thanks for taking the time to explain
    Have a great weekend.
    Jim

  7. #7
    Forum Contributor
    Join Date
    07-30-2014
    Location
    USA
    MS-Off Ver
    Version 14.4.3, Mac 2011
    Posts
    145

    Re: VLOOKUP or INDEX Match for Grades based on Team

    No problem,
    I tend to solidify my own learning when I try and write out things like that.
    I also stopped used V lookups a long time ago since I learned about Index Match :D
    Enjoy yours as well

+ 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. Vlookup OR Index Function to locate Team Values based on Drop Down Selections
    By Miskondukt in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-04-2016, 12:53 PM
  2. Replies: 1
    Last Post: 06-18-2015, 08:45 AM
  3. Replies: 6
    Last Post: 03-06-2015, 03:20 PM
  4. [SOLVED] Conditional formatting based on VLOOKUP/INDEX:MATCH
    By strud in forum Excel General
    Replies: 2
    Last Post: 06-13-2013, 07:02 AM
  5. Replies: 4
    Last Post: 05-24-2012, 06:44 AM
  6. INDEX/MATCH & VLOOKUP based on month number
    By pixifaery in forum Excel General
    Replies: 2
    Last Post: 07-08-2010, 06:48 AM
  7. Match a name to a team - VLOOKUP?
    By djfatboyfats in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-22-2008, 10:26 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