+ Reply to Thread
Results 1 to 4 of 4

Don't Understand vLookup reference

  1. #1
    Registered User
    Join Date
    04-06-2016
    Location
    Oklahoma City, Oklahoma
    MS-Off Ver
    2016
    Posts
    29

    Don't Understand vLookup reference

    I've attached a sample worksheet from a free online tutorial. The exercise was how to use IFERROR and VLOOKUP together. I understand the concept, BUT I don't understand how THIS spreadsheet works. I wanted to reach out to the person who created the spreadsheet and posted it, but I cannot find contact information for him anywhere.

    I absolutely cannot figure out how one of cell references works in this spreadsheet. I keep thinking that the two tables have to be linked in some way. But, I've tried looking at the formats and cannot see any indication of how they are linked. If they are NOT linked, I don't have any idea how the cell reference works in this scenario.

    If someone has time, could you take a look at the attached spreadsheet? I've made some notes on it. It is too convoluted to explain it in the body of this email.

    Oh, and I'm using Excel 2016, if that makes any difference to anyone.

    Thanks, Diane
    Attached Files Attached Files

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Don't Understand vLookup reference

    The VLOOKUP function is structured like this: VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])

    Let's take the formula in J10 for example. =IFERROR(VLOOKUP($J$9,$B$3:$E$32,H10,FALSE),"")

    This formula is looking for "Teague" in column B and returning the value in the same row of the 2nd column of the range B3:E32.
    The 2nd column in columns B:E is C so the VLOOKUP is returning the value in column C that is in the same row as "Teague" in column B.

    The reason why the VLOOKUP function is looking into the 2nd column is because H10 = 2.

    That being said, there is a way to do this without using the numbers in column H.
    If you are interested, we can show you how to reference the actual header names using an INDEX MATCH MATCH formula.

    Note that the formulas in K10:K13 are not the same as the formulas that are in J10:J13.
    Instead of surrounding the formulas with quotes, you could have used the FORMULATEXT function ( K10 =FORMULATEXT(J10) ) since you have Excel 2016.

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Don't Understand vLookup reference

    I don't understand how the H1, H2, H3, H4 reference works in this particular scenario. I would have thought we would match on the actual name of the column (ex: City, Adult Population). I don't know if this other little section is a pivot table, table, linked table, or what. I can't tell HOW the 1-4 were generated.
    The formula could be rewritten to match in the fashion you describe. In this case, the numbers in col H were manually entered by matching the description in col I with the column number in the table, which would break if a column were inserted in the body of the table.

    You could instead use, in H2

    =MATCH(I3, $B$2:$F$2, 0)

    ... and copy down.
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,827

    Re: Don't Understand vLookup reference

    It might help to review the help file for the VLOOKUP() function: https://support.office.com/en-us/art...8-93a18ad188a1

    The 3rd argument (the one pointing to the numbers in column H) tells VLOOKUP() which column in the lookup table to get the return value from. It sounds like you understand that. However, when you get the empty string value from the IFERROR() part of the formula, that tells you that VLOOKUP() is returning an error. As explained in the "common problems" section
    Quote Originally Posted by Excel help
    If col_index_num is greater than the number of columns in table-array, you'll get the #REF! error value.
    . Your "table array" is only referring to B:E, and does not include the "test" column in column F. When you ask VLOOKUP() to return the value in the 5th column from a 4 column wide range, VLOOKUP() throws up its hands and says that it can't do that.

    What you are trying to do should work just fine, if you will expand the lookup_table reference to include column F.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

+ 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. Reference in a vlookup trying to understand what it is looking for?
    By davethewelder in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 01-07-2015, 04:02 PM
  2. [SOLVED] Cannot understand a response in a field when using VLookup
    By babak_jani in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-13-2013, 10:55 PM
  3. Need help with VLOOKUP, I don't understand where I am going wrong!
    By mozz792002 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-14-2013, 05:46 AM
  4. [SOLVED] I just don't understand Vlookup and Match
    By stockgoblin42 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-19-2013, 05:26 PM
  5. [SOLVED] R1C1 Reference in Macro, Don't Understand
    By DM2 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-09-2012, 11:38 PM
  6. Replies: 1
    Last Post: 09-18-2007, 02:07 PM
  7. Making VLookup Absolute reference and deleting worksheet reference question
    By crowdx42 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-24-2006, 12:45 PM

Tags for this Thread

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