+ Reply to Thread
Results 1 to 14 of 14

vlookup alphanumerics vs. index(match thingy

  1. #1
    Forum Contributor
    Join Date
    06-11-2012
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2010
    Posts
    124

    vlookup alphanumerics vs. index(match thingy

    I have an alphanumeric table that I wish to have a vlookup function to derive a score.

    Primary Alignment (XX) | Secondary Alignment (YY) | Alignment Value

    Any Good | Any Evil | -2
    Lawful Good | Lawful Good, Lawful Neutral, | +2
    Lawful Good | Neutral, Neutral Good, Chaotic Good | +1
    Lawful Neutral | Lawful Neutral |+3
    Lawful Evil | Lawful Evil, Lawful Neutral | +2
    Lawful Evil, Lawful Neutral | Neutral, Neutral Evil | +1
    Neutral Good, Neutral | Lawful Neutral | +1
    Neutral Evil, Neutral Lawful Neutral +1

    There's three columns, xx | yy | Alignment Value

    How would I have excel cross reference the first and second column to derive a value from the third column?

    Cheers,
    Last edited by Joah; 06-19-2012 at 11:07 AM.

  2. #2
    Forum Contributor
    Join Date
    08-22-2011
    Location
    Texas, United States
    MS-Off Ver
    Excel 2007 and 2010
    Posts
    516

    Re: vlookup alphanumerics

    You could try and concantinate the first and second column with something like &. In other words create a new column to the left of your first one and put in the formula

    =A1&"&"&B1

    This will should give you unique values of column 1 and 2 combined. Then from anywhere you can vlookup into that table using the concantinated value that you have created. Let me know if this helps.

  3. #3
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: vlookup alphanumerics

    Hi Joah, hi Amotto11,

    in the example in E2 and F2 the two strings:


    Please Login or Register  to view this content.
    Hope it helps
    -----------------------------------------------------

    At Excelforum, you can say "Thank you!" by clicking the star icon ("Add Reputation") below the post.

    Please, mark your thread [SOLVED] if you received your answer.

  4. #4
    Forum Contributor
    Join Date
    06-11-2012
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2010
    Posts
    124

    Re: vlookup alphanumerics

    Hope is a good thing,

    I've always said that the power of the internet is in man.

    The way I've been approaching this wonderful excel forum is to try and understand everything that people are helping me with, feed a man a fish, teach a man to fish principle, hey I'm a holyman what can I say.

    So I'm unfamiliar with index and it sounds like something I certainly can broaden my tool-set with. Do I need to create my list somewhere?

    The index is from c2 to c1000?

    Cheers,

  5. #5
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: vlookup alphanumerics

    Index is sort of a vlookup with a lot more power.

    In it's simplest form,
    = INDEX(Array, row #, Column #)
    The array is your data, it might be in table form (rows and columns) or just a row or a column. It's where you want your result pulled from.
    Please Login or Register  to view this content.
    Assuming Table is in A1:D4
    Data is in B2:D4
    INDEX($B$2:$D$4, 2,3) returns the data value in 2nd row of data and 3rd column or 2' 6"
    Typically you'd use a formula to get the rows and columns

    For row, MATCH("Dwarf", $A$2:$A$4,0)
    For Column, MATCH("Child", $B$1:$D$1,0)

    so entire function would be
    =INDEX($B$2:$D$4, MATCH("Dwarf", $A$2:$A$4,0), MATCH("Child",$B$1:$D$1,0))

    and you'd probably have dwarf and child in cells, let's say F1 and F2 so it would be
    =INDEX($B$2:$D$4, MATCH(F1, $A$2:$A$4,0), MATCH(F2",$B$1:$D$1,0))

    Hope that helped.
    Last edited by ChemistB; 06-15-2012 at 01:31 PM. Reason: formatting
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  6. #6
    Forum Contributor
    Join Date
    06-11-2012
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2010
    Posts
    124

    Re: vlookup alphanumerics

    Yes, you've been very helpful, I feel like your my guardian techangel.

    Cheers,

  7. #7
    Forum Contributor
    Join Date
    06-11-2012
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2010
    Posts
    124

    Re: vlookup alphanumerics

    Ok, I was tempted to assign another column to my columns, but seeing as that would exceed the redundancy factory, I will raise my melon to higher expectations.

    Say I have these exact values:

    Lawful Good | Lawful Good | 1
    Lawful Good | Lawful Neutral | 2
    Lawful Good | Lawful Evil | 3

    How would I get the result from the third column if I choose from my from Lawful Good (column 1) and Lawful Neutral (column 2)?

    Cheers,

  8. #8
    Forum Contributor
    Join Date
    06-11-2012
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2010
    Posts
    124

    Re: vlookup alphanumerics vs. index(match thingy

    Is it even possible to get a result from two different choices? heh heh

  9. #9
    Forum Contributor
    Join Date
    06-11-2012
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2010
    Posts
    124

    Re: vlookup alphanumerics

    Wait, maybe I gotta put my 3d glasses on,

  10. #10
    Forum Contributor
    Join Date
    06-11-2012
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2010
    Posts
    124

    Re: vlookup alphanumerics

    ^_________________Lawful Good_______Lawful Neutral__________Lawful Evil
    |
    Lawful Good_____________3_________________2_________________1
    |
    Lawful Neutral___________2_________________3_________________2
    |
    Lawful Evil______________1_________________2_________________3

    uight?

  11. #11
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: vlookup alphanumerics vs. index(match thingy

    Yes, with that table (Post #10) Use the INDEX with first reference (LG/LN/LE) in A1 and second reference (LG/LN/LE) in A2 and your table in C1:F4

    =INDEX($D$2:$F$4, MATCH($A$1, $C$2:$C$4,0), MATCH($A$2, $D$1:$F$1,0))
    Does that work for you?

  12. #12
    Forum Contributor
    Join Date
    06-11-2012
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2010
    Posts
    124

    Re: vlookup alphanumerics vs. index(match thingy

    Hey being dyslexic has it's advantages, especially in this environment.

    -- Didja hear about the dyslexic paranoid? He always thought he was following someone?
    -- Did you hear about the dyslexic rock star........... he choked to death on his own Vimto!
    -- Two dyslexic men walk into a bank shouting... “Air in the hands mother stickers this is a #uckup!”

    Cheers,

  13. #13
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: vlookup alphanumerics

    There are ways to use a VLOOKUP with multiple criteria but I think the above way is best

  14. #14
    Forum Contributor
    Join Date
    06-11-2012
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2010
    Posts
    124

    Re: vlookup alphanumerics vs. index(match thingy

    Absolutely, I was just having to unlearn what I learned, the vlookup is strictly up and down whereas index is left and right.

    Cheers,

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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