logo elektroda
logo elektroda
X
logo elektroda

Combine Excel Tables with Common Barcode Column: Merge Data from Two Sheets by Barcode

greep 34038 6
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 8958940
    greep
    Level 19  
    I have 2 tables, in two separate sheets, for which the column named "barcode" is common.
    Is it possible in any easy way to combine these two tables using a common key which is a bar code? I would like to add that the records are in any order and sometimes a record in one table has no equivalent in the other.
    In this case, after connecting, one page of the table should be blank.
    In the example below, I have 2 tables, each with only two columns.

    Barcode | name
    44444 | Soap
    11111 | Jam
    55555 | Cheese

    Barcode | Sale

    11111 | thirty
    44444 | 140
    55555 | 233
  • ADVERTISEMENT
  • #2 8959303
    yogi009
    Level 43  
    It is possible in the Access database.
  • ADVERTISEMENT
  • Helpful post
    #3 8962916
    marek003
    Level 40  
    Take advantage of
    VLOOKUP (lookup_value, array, column_num, [search range])

    The searched value is the code, the array is the code and the second column, the column number is the column from which the information is to be provided, and now the most important:
    [search range] must be 0 then Exactly will look for the code and the data does not need to be sorted, if it cannot find the code the function returns an error. So use the IF function here (if the error is blank).
  • Helpful post
    #4 8963773
    walek33
    Level 29  
    But now I will flash. :D
    Everything as in the post above, i.e. at a friend's marek003 with only one addition.
    As you write yourself
    Quote:
    sometimes a record in one table, no match in the other
    and now:
    > if the first table has all the records used and the second table doesn't, no problem - you rely on them
    > if the second contains all of them and the first does not - similarly to the above
    > if the first one has some records and the second one also has a problem - you have to (or not, if you want to) make an additional sheet and "merge" all the codes from both sheets there (I haven't found a clever definition) so that a column with all of them is created but no duplicates.
  • ADVERTISEMENT
  • #5 8969899
    greep
    Level 19  
    Thanks for the answer.
    Only after watching the below video on youtube, everything became clear to me.
    http://www.youtube.com/watch?v=c-IazFzBrnM

    I tried as you wrote, but I didn't know what to mean by the end
    Quote:
    the array is the code and the second column "
    I thought that the board is a separate sheet, not a range of cells, for example: A1: B10 :)

    Quote:
    column number is the column from which the information is to be provided "
    Here it is worth adding that we count the column number from the beginning of the "range", not from the beginning of the "sheet". See the movie above: 02: 04-02: 15.

    greetings

    Added after 24 [minutes]:

    -------------------------------------------------- -----
    walek33 wrote:

    > if the first one has some records and the second one also has a problem - you have to (or not, if you want to) make an additional sheet and "merge" all the codes from both sheets there (I haven't found a clever definition) so that a column with all of them is created but no duplicates.


    So in this case you would have to do a vertical search in "two sides"?
    And then as you say, copy the results to a new sheet, removing duplicates?

    -------------------------------------------------- -----

    As if each of the tables that I want to join using the shared key had, say, 10 columns (and not just 2 as in the example above), using horizontal search to join tables probably would not make sense, because after the parameters of the function, I can see that this function copies only 1 column?

    Is there any other feature that would help in this situation?
    Would the most reasonable solution then be to convert an Excel file to an Access database and generate a query that would join the 2 tables?
  • #6 8974538
    walek33
    Level 29  
    Quote:
    Would the most reasonable solution then be to convert an Excel file to an Access database and generate a query that would join 2 tables

    In my humble opinion, this is the simplest and fastest solution. After all, after connecting the tables with a query, if necessary, you have the option of returning to Excel.
  • ADVERTISEMENT
  • #7 15122994
    blady2111
    Level 9  
    hey, i'd like to dig up the topic a bit.

    I have a similar problem and can't cope.
    Two columns are given.

    marcin.wp.pl | kazik
    kazik.onet.pl | marcin
    zosia.giks.eu | Sophie

    I need to compare these columns so that next to the Kazik there is an extended version, i.e. kazik.onet.pl and so with each subsequent one.
    Vlookup is looking for identical ones, so it won't work for me as for my friend.
    I am asking for an idea with a solution, thank you in advance.

    Added after 2 [hours] 16 [minutes]:

    I've already done it :D , but maybe it will be useful to someone, so I post an attachment.

Topic summary

The discussion revolves around merging two Excel tables using a common "barcode" column. Users suggest utilizing the VLOOKUP function to match records from both tables, ensuring that the lookup value is set to 0 for exact matches. If a barcode is not found, an IF function can be employed to return a blank cell. Additional advice includes creating a new sheet to consolidate all unique barcodes from both tables to facilitate the merging process. The conversation also touches on the possibility of using Access for more complex queries and emphasizes the importance of understanding the range and column indexing in Excel.
Summary generated by the language model.
ADVERTISEMENT