+ Reply to Thread
Results 1 to 6 of 6

Populate Table 1 based on values in Table 2

  1. #1
    Registered User
    Join Date
    10-18-2007
    Posts
    9

    Populate Table 1 based on values in Table 2

    Hello,

    I have a table I need to populate like below

    Table 1

    a b c d e f g
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10


    This table should be populated from the Table2 below.If the values match in table 2 I need to display as true or false value in table 1. The reason I need this is to create a vendor list for procurement.

    Table 2

    1 b
    2 f
    3 a
    4 g
    5 b
    6 f
    7 a
    8 e
    9 g
    10 a

    Any ideas how I should approach this?

    thanks for your help

    Alan

  2. #2
    Valued Forum Contributor
    Join Date
    02-09-2006
    Location
    Melbourne, Australia
    MS-Off Ver
    Office 2016
    Posts
    1,075
    Assuming table 1 starts in column A row 1 and table 2 starts in column A row 15, in cell B1 put =VLOOKUP(A1,$A$15:$B$24,2,FALSE). Copy the formula down cells B2:B10.
    Trish in Oz
    -------------
    A problem well defined is a puzzle half solved


    If you attach a sample of your workbook it will be easier to find a solution. Remember to remove/replace sensitive data before uploading the file. Look here if you need help with attachments:
    http://www.excelforum.com/faq.php?fa...b3_attachments

  3. #3
    Registered User
    Join Date
    10-18-2007
    Posts
    9
    Hello,

    I may have explained the problem incorrectly.
    Table 2 would have multiple valules

    Table 2


    a 1
    c 2
    a 3
    g 4
    b 5
    c 1
    a 7
    e 8
    g 1
    a 10

    A VLookup will not work in this occasion because it will default to the first value that it meets ignoring the rest.

  4. #4
    Registered User
    Join Date
    10-18-2007
    Posts
    9

    Bump Populate Table 1 based on values in Table 2

    Hello,

    I have attached a sample file to show my problem.

    I need to populate table 1 with a true or false based on the values in table 2.I have tried using a VLookup but it only retrieves the first value or first occurence.

    Thanks
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    10-27-2006
    Location
    United Kingdom
    MS-Off Ver
    EXCEL 2003 (2007 at home)
    Posts
    517

    The old SUMPRODUCT trick

    It's amazing how often this little gem appears in this forum.

    Assume your table 2 is in A2:B11

    Your table 1 has a to g in cells D1 to J1 and 1 to 10 in C2 to C11.
    Set D2 : =NOT(NOT(SUMPRODUCT(-($A2=$C2),-(D$1=$B2))))
    Replicate through the rest of the table.

    This uses the fact that TRUE = 1 and FALSE = 0 ...

    Mark.

  6. #6
    Registered User
    Join Date
    10-18-2007
    Posts
    9
    Thanks,

    Problem Solved

+ 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