Results 1 to 4 of 4
  1. #1
    Star Lounger
    Join Date
    Jan 2002
    Location
    Houston, Texas, USA
    Posts
    91
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Lookup Table (Excel 2003)

    I'm not sure if it's a Lookup Table I want, but I think it might be. I have a list of codes that will correspond to a description. (These codes may change periodically, so they'll need to lookup the correct description for the new code--possibly in a Lookup Table??). So, in cell A1, I'll have a code (number 1, for example) and in cell A2, the code might be 2 and so on down the column. In cell B1, I'd like the description that matches that code to appear. My lookup table (preferably on a separate sheet) will have corresponding codes with the descriptions next to them so that those descriptions will appear automatically in the list. For example, my code 1 would run down to the lookup table and see Code 1 and pull the description listed next to it and copy it into the appropriate description cell in my list at cell A2 (or wherever). What would be the best way to do this? The whole object is so that if these codes change, I don't have to retype each of the descriptions (there might be twenty code 5s and fifty code 2s, etc. And any one of those codes might get changed at any time. If the code changes, it'll just pull the corresponding description out of the Lookup Table and replace it in the list. Can I do that? I hope all of this makes sense.

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Lookup Table (Excel 2003)

    I think you have a typo in that formula shouldn't:

    <code>
    =VLOOKUP(A1,Lookup!$A$1:SB$3,2,FALSE)
    </code>

    be

    <code>
    =VLOOKUP(A1,Lookup!$A$1:$B$3,2,FALSE)
    </code>


    With the "S" in front of the B$3 Cahnged to a "$".
    Legare Coleman

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Lookup Table (Excel 2003)

    Yep, thanks! I'll edit my reply.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Lookup Table (Excel 2003)

    Edited by HansV to correct a typo - thanks to Legare for pointing it out!

    Let's say that you create a table on a sheet named Lookup:

    <table border=1><td></td><td align=center>A</td><td align=center>B</td><td align=center>1</td><td align=right>1</td><td>A random description</td><td align=center>2</td><td align=right>2</td><td>Something else</td><td align=center>3</td><td align=right>3</td><td>Yet another one</td></table>
    On the sheet where you want to use this table, enter the following formula in cell B1:

    =VLOOKUP(A1,Lookup!$A$1:$B$3,2,FALSE)

    and fill down. Obviously, you must adjust the 3 in range $A$1:$B$3. If you want to avoid #N/A if the cell in column A is blank, use

    =IF(ISNA(VLOOKUP(A1,Lookup!$A$1:$B$3,2,FALSE)),"", VLOOKUP(A1,Lookup!$A$1:$B$3,2,FALSE))

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •