+ Reply to Thread
Results 1 to 7 of 7

Don't know

  1. #1
    Registered User
    Join Date
    10-25-2005
    Posts
    23

    Don't know

    Sorry.. title is strange..

    I have two worksheets.. In both of them I have two same columns - Code and Name..

    In one worksheet is a list of all codes and names, and I want in other one to put only a code in a cell and to get a name from the other worksheet (that has a same code).. if you know what I mean

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996
    See if this example covers your situation

    On Sheet1 you have a list.
    A1: Code
    A2 through A??: code numbers
    B1: Name
    B2 through B??: names

    On Sheet2:

    A1: Code
    A2: (a code number)

    B1: Name
    B2: =VLOOKUP(A2,Sheet1!A1:B100,2,0)
    (returns the name on Sheet1 that is associated with the code in A2)

    Copy that formula down as far as needed

    Does that help?

    Regards,
    Ron

  3. #3
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996
    Actually, for copying the formula down, it needs this form:

    B2: =VLOOKUP(A2,Sheet1!$A$1:$B$100,2,0)

    Or

    you could name the lookup range on Sheet1 and use that name.

    Sheet1, select the list range
    Edit>Names>Define
    Names in workbook: LU_NameCode
    Refers to: (the already selected range)
    Click the [OK] button

    Sheet2:
    B2: =VLOOKUP(A2,LU_NameCode,2,0)

    I hope that helps.

    Regards,
    Ron

  4. #4
    Jonathan Cooper
    Guest

    RE: Don't know

    =VLOOKUP('codes without names'!A2,'codes with names'!$A$2:$B$4,2,FALSE)

    'codes without names'!A2............ is the code your trying to lookup

    'codes with names'!$A$2:$B$4.......is the table that has both codes and names.


    "alen_re" wrote:

    >
    > Sorry.. title is strange..
    >
    > I have two worksheets.. In both of them I have two same columns - Code
    > and Name..
    >
    > In one worksheet is a list of all codes and names, and I want in other
    > one to put only a code in a cell and to get a name from the other
    > worksheet (that has a same code).. if you know what I mean
    >
    >
    > --
    > alen_re
    > ------------------------------------------------------------------------
    > alen_re's Profile: http://www.excelforum.com/member.php...o&userid=28331
    > View this thread: http://www.excelforum.com/showthread...hreadid=501721
    >
    >


  5. #5
    Registered User
    Join Date
    10-25-2005
    Posts
    23
    I've tried what you said.. but it's probably up to me, and I can't get it to work.. I'm not so good with excel

    So, I'll try to be more specific..

    Sheet1
    A1 - Code (A2 - A.. actual codes)
    B2 - Product name (B2 - B.. actual names)

    (This sheet has the list of 500 codes with names)

    Sheet2
    A1 - Code
    B2 - Product name
    (C3 - Quantity)

    So.. I want to add quantity in Sheet2 and to put only a code.. and I want formula to find a product name for the code..
    I fill only A2 in Sheet 2 and it gets me a name in B2..
    Last edited by alen_re; 01-16-2006 at 02:43 PM.

  6. #6
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996
    Your references seem to include some typos, but.....

    On Sheet2, if you enter a Code in cell A2, then this formula (which I posted earlier) should return the Product Name associated with that code:

    B2: =VLOOKUP(A2,Sheet1!$A$1:$B$100,2,0)

    Adjust the sheet and range range references to suit your situation.

    Does that help?

    Regards,
    Ron

  7. #7
    Registered User
    Join Date
    10-25-2005
    Posts
    23
    Thanks a lot for the help... It helped me ofcourse.. but I found one thing that didn't fit..

    You said: B2: =VLOOKUP(A2,Sheet1!$A$1:$B$100,2,0)
    I made a correction: B2: =VLOOKUP(A2;Sheet1!$A$1:$B$100;2)

    Problem with ; and ,

    I'm using Office 2000.. why is this ?!



    Quote Originally Posted by Ron Coderre
    Your references seem to include some typos, but.....

    On Sheet2, if you enter a Code in cell A2, then this formula (which I posted earlier) should return the Product Name associated with that code:

    B2: =VLOOKUP(A2,Sheet1!$A$1:$B$100,2,0)

    Adjust the sheet and range range references to suit your situation.

    Does that help?

    Regards,
    Ron

+ 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