+ Reply to Thread
Results 1 to 9 of 9

Matching CSV files by the table header

  1. #1
    Registered User
    Join Date
    10-24-2022
    Location
    Germany
    MS-Off Ver
    365 MAC
    Posts
    3

    Question Matching CSV files by the table header

    Hey everyone, I have multiple CSV files with data in it. The files have the same headers like "email" or "ID" but they are not on the same position in every file. For example I have two files A and B with this tables ->

    A:
    email, ID, name, fullname

    B:
    fullname, ID, name, email

    I now want to merge the data from the two files in one sheet but if I simply paste the I get wrong data in the columns e.g. for the first column in A and B I would combine email with fullname which is wrong.

    How can I merge the data together by matching the same headers? I need to do this automatically, because I have 8 .csv files with 50 different columns each.

    Please help me!

  2. #2
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Matching CSV files by the table header

    use Power Query and Append them

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,409

    Re: Matching CSV files by the table header

    Welcome to the forum.

    PowerQuery (Get & Transform on the Data ribbon) wouold seem the most obvious solution: https://support.microsoft.com/en-us/...8-6a00041c90e4
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  4. #4
    Registered User
    Join Date
    10-24-2022
    Location
    Germany
    MS-Off Ver
    365 MAC
    Posts
    3

    Re: Matching CSV files by the table header

    Hello and Thanks a lot for your answers. I use Excel 365 on Mac and I cannot find an option to import a file. How can I do this? Thanks in advance

  5. #5
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Matching CSV files by the table header

    update your profile to 365 Mac
    excel on Mac doesn't have Power Query (in most cases)

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,409

    Re: Matching CSV files by the table header

    As Sandy has asked, please update your forum profile to include Mac - do this NOW.

  7. #7
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Matching CSV files by the table header

    FYI: as far as I know Power Query Editor for Mac is only available to the Insider's Beta Channel for Microsoft 365.

    anyway to solve your problem you can use VBA , ask mod to move this thread to the proper sub forum

  8. #8
    Registered User
    Join Date
    10-24-2022
    Location
    Germany
    MS-Off Ver
    365 MAC
    Posts
    3

    Re: Matching CSV files by the table header

    Hey guys, I updated my profile and performed the PowerQuery on a Windows PC. Thanks for the support.

    How come that Excel on Mac is so limited in functions for Data Import? I don't understand the reason for this...
    Do you know if this will change going forward?

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,409

    Re: Matching CSV files by the table header

    Ask Microsoft!!!

    Glad to have helped.

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank those who have helped you by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Matching Row and Adding Colomn with Matching Header
    By Ronnieooi in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-09-2021, 12:44 PM
  2. Seatch table for a best matching value and returning the column header
    By lordfa9 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-08-2019, 09:59 AM
  3. Replies: 0
    Last Post: 06-21-2018, 11:52 AM
  4. [SOLVED] Search nearest value above in table. return header row + header column
    By 323428 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-22-2018, 05:06 AM
  5. [SOLVED] Find & replace text in a table nested within a header for a batch of word files
    By Tino XXL in forum Word Programming / VBA / Macros
    Replies: 2
    Last Post: 09-29-2014, 08:38 AM
  6. [SOLVED] Extract the column header given the row header and highest value in a subset of a table
    By pguarino in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-20-2013, 02:05 AM
  7. matching data with header and place it below its header
    By bujji1305 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-04-2012, 02:51 AM

Tags for this Thread

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