+ Reply to Thread
Results 1 to 7 of 7

Thread: How to Match and fill two lists of unequal length

  1. #1
    Registered User
    Join Date
    01-24-2012
    Location
    Pennsylvania
    MS-Off Ver
    the newest one...
    Posts
    8

    How to Match and fill two lists of unequal length

    Hello,

    I have a reference list which contains codes and their corresponding txt
    and another list that contains just the codes but in multiples

    is there a way to automatically match the two lists and fill the blanks in the longer list with corresponding txt,

    e.g.

    List 1-reference
    A1 B1
    11 Xray
    12 CT-Head
    13 Foley

    List 2
    A1
    11
    11
    11
    11
    12
    12
    13
    13

    so that list two fills with the txt description based on list 1

  2. #2
    Valued Forum Contributor Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Excel 2007
    Posts
    685

    Re: How to Match and fill two lists of unequal length

    Put this in B1 of the second sheet:

    =IF(ISNA(MATCH(A1,'List 2'!A:A,0)),"",VLOOKUP(A1,'List 2'!A:B,2,0))

    then copy down as far as you need to.

    Hope this helps.

    Pete

  3. #3
    Valued Forum Contributor alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Lake County, Illinois
    MS-Off Ver
    MS Office 2010, 2007 and 2002
    Posts
    1,165

    Re: How to Match and fill two lists of unequal length

    Try using the vlookup function. Here is a tutorial on the syntax.

    http://www.techonthenet.com/excel/formulas/vlookup.php

  4. #4
    Registered User
    Join Date
    01-24-2012
    Location
    Pennsylvania
    MS-Off Ver
    the newest one...
    Posts
    8

    Re: How to Match and fill two lists of unequal length

    Quote Originally Posted by Pete_UK View Post
    Put this in B1 of the second sheet:

    =IF(ISNA(MATCH(A1,'List 2'!A:A,0)),"",VLOOKUP(A1,'List 2'!A:B,2,0))

    then copy down as far as you need to.

    Hope this helps.



    Pete

    hey thanks a lot, but one quick question, what is the "array" for the function?
    I am a little confused as to the 'List2'! meaning

    Thank you Art

  5. #5
    Registered User
    Join Date
    01-24-2012
    Location
    Pennsylvania
    MS-Off Ver
    the newest one...
    Posts
    8

    Re: How to Match and fill two lists of unequal length

    Quote Originally Posted by Pete_UK View Post
    Put this in B1 of the second sheet:

    =IF(ISNA(MATCH(A1,'List 2'!A:A,0)),"",VLOOKUP(A1,'List 2'!A:B,2,0))

    then copy down as far as you need to.

    Hope this helps.



    Pete

    hey thanks a lot, but one quick question, what is the "array" for the function?
    I am a little confused as to the 'List2'! meaning

    Thank you Art

  6. #6
    Valued Forum Contributor darknation144's Avatar
    Join Date
    01-24-2012
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    549

    Re: How to Match and fill two lists of unequal length

    'List2'! means you are referencing the sheet named List2. Look along the bottom and you will see the name on the tab. An array is an arrangement of quantities in rows and columns, as in a matrix.

  7. #7
    Registered User
    Join Date
    01-24-2012
    Location
    Pennsylvania
    MS-Off Ver
    the newest one...
    Posts
    8

    Re: How to Match and fill two lists of unequal length

    Sucess! thank you all

+ 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.2.0