+ Reply to Thread
Results 1 to 16 of 16

Merge multiple tables

  1. #1
    Registered User
    Join Date
    12-05-2022
    Location
    Berlin
    MS-Off Ver
    365
    Posts
    12

    Merge multiple tables

    Hi there,

    I want to merge twelve monthly credit card statements/CSV files into one file/table - in a dynamic way, so if source files change, the combined table changes.

    Conditions:
    1. The source data has no unique identifier per row. The date, for example, can appear many times, similar to the amount, payee, etc.
    2. I do not want to touch the original CSV files; therefore do not want to open each file before I combine them. Adding unique custom keys would not sound like an attractive solution.
    3. All "solutions" I have found use data management tools like power query, but I do not want to sum up results or combine a new entry from info from multiple tables.
    4. I know that each row has one independent data entry, so no sophistication is needed; just add one table after the other and sort by whatever.

    Is there an easy way to achieve this?

    Thanks to the community!
    Last edited by Ragazo; 12-05-2022 at 08:18 PM.

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

    Re: Merge multiple tables

    Power Query with From Folder then add Month Name to each month next Append Queries (not merge) then you can filter or use Pivot Table

  3. #3
    Registered User
    Join Date
    12-05-2022
    Location
    Berlin
    MS-Off Ver
    365
    Posts
    12

    Re: Merge multiple tables

    Wow, that was quick and almost too easy Thank you already very much!

    Even though I was trying to follow each of your steps, I think I achieved my goal already after steps 1 and 2.

    What I did was:
    Get Data/from file/from folder and then Combine &, Load - and there it was!

    But there are two issues:
    1. Each CSV File has four lines of general header and one sum row footer. Can I get rid of those using this batch method? I did not see a moment to intervene when using this method.
    2. Each CSV File has in row five table headers. I only want those once in the combined file. Any way to do this using the above method?

    Last, apologies for not following your description 1:1, but can you elaborate on what you mean by "add Month Name to each month next Append Queries (not merge)"? Not sure where I would be able to execute that.

    Thanks again!

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

    Re: Merge multiple tables

    in Power Query all is Tables so you can add new column named Month and then write there for each month table: January, February etc..., I think your csv files has name like January, February etc
    your imported csv are tables now and total row (sum row footer) and contain maybe word : Total You can filter it out
    with headers, hard to say, I would like to see this.
    - this is five lines in one cell? or five headers in five rows ?

    instead of Combine you can Hit EDIT then you will have more options to manage these files (Tables)

    edit: table should have one row of headers and no unnecessary things, total row you can add later to the result table (or Pivot - Grand Total)
    Last edited by sandy666; 12-05-2022 at 09:30 PM.

  5. #5
    Registered User
    Join Date
    12-05-2022
    Location
    Berlin
    MS-Off Ver
    365
    Posts
    12
    I will try to send it tomorrow. It’s late where I am now, and I would need to edit the content a bit, as mentioned it is credit card data Thank you already a lot!

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

    Re: Merge multiple tables

    sure, no Top Secret things !

  7. #7
    Registered User
    Join Date
    12-05-2022
    Location
    Berlin
    MS-Off Ver
    365
    Posts
    12

    Re: Merge multiple tables

    Hi!

    Below/attached are two example files. First, I want to eliminate the first four rows and the last row in each file and then have the fifth row interpreted as the header row.
    I played around with PowerQuery, now use "Combine & Transform" and understand the Query Settings Section, where I can set the rules.
    But not sure where to enter what I want as described above.

    Any help is much appreciated.

    Thank you!

    File No 1: CC_11.csv
    File No 2: CC_12.csv

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

    Cool Re: Merge multiple tables

    you will need to fix path to the csv file
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    12-05-2022
    Location
    Berlin
    MS-Off Ver
    365
    Posts
    12

    Re: Merge multiple tables

    This is so wonderful; THANK YOU!
    It helped me a lot.
    Last edited by Ragazo; 12-10-2022 at 06:02 AM.

  10. #10
    Forum Expert
    Join Date
    12-09-2014
    Location
    Trakai, Lithuania
    MS-Off Ver
    2016
    Posts
    1,405

    Re: Merge multiple tables

    Power Query (https://www.youtube.com/watch?v=AhaNv3Iis3c)
    Please Login or Register  to view this content.
    Attached Files Attached Files

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

    Re: Merge multiple tables

    Quote Originally Posted by Ragazo View Post
    This is so wonderful; THANK YOU!
    It helped me a lot.
    You are welcome

  12. #12
    Registered User
    Join Date
    12-05-2022
    Location
    Berlin
    MS-Off Ver
    365
    Posts
    12

    Re: Merge multiple tables

    Thank you, Czeslaw. I will look into this. Obviously, it does not help that I do not understand Russian to understand the video (if the video is Russian...) but I think I can get it together

  13. #13
    Forum Contributor
    Join Date
    04-09-2013
    Location
    City, World
    MS-Off Ver
    Office 365
    Posts
    248

    Re: Merge multiple tables

    Hi all
    Since the OP issue resolve so I am going to post my questions please ( I do not want to hijack this post).
    I tried your steps but I end up with some problems, here are my questions

    1) Step 3 in Power Query, what you have done exactly?

    Attachment 808921

    2) Step 4 in Power Query, what you have done exactly?

    Attachment 808922

    3) Step 6, I changed the path in the first step but now it is trying to go to D:\ drive again and I have no way to change that? Any idea how to change the path

    Attachment 808923

    Thank you very much.

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

    Re: Merge multiple tables

    Quote Originally Posted by lastnn30 View Post
    .
    Your attachments are invalid, read big yellow banner at the top of the page
    about path: you need to change path to the folder with your files (there is a Browse button)
    for the rest post new thread with your problem or Learn Power Query

  15. #15
    Forum Contributor
    Join Date
    04-09-2013
    Location
    City, World
    MS-Off Ver
    Office 365
    Posts
    248

    Re: Merge multiple tables

    Ok, thanks for your reply. I will post a new thread. Thanks a lot.

  16. #16
    Forum Contributor
    Join Date
    04-09-2013
    Location
    City, World
    MS-Off Ver
    Office 365
    Posts
    248

    Re: Merge multiple tables

    Thank you.

+ 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. [SOLVED] Merge multiple tables into one
    By JackBauer in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-12-2017, 10:49 AM
  2. How to merge multiple tables into 1 master table?
    By Ashley1016 in forum Excel General
    Replies: 11
    Last Post: 04-14-2017, 05:51 AM
  3. Help with Pivot Tables to merge two tables
    By scrawl.to.me in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-26-2015, 06:01 AM
  4. Merge multiple tables in one table
    By chiidzzz in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-28-2013, 05:16 PM
  5. Replies: 3
    Last Post: 12-06-2012, 10:51 AM
  6. merge multiple tables
    By magnus101 in forum Excel General
    Replies: 2
    Last Post: 10-31-2012, 12:36 PM
  7. [SOLVED] HOW TO MERGE TWO TABLES
    By Bill Vogel in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 11:05 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