I have 350+ CSV files I need to merge into one aggregate file. Using Power Query for Excel, I was able to easily merge all of the files in a few minutes. However, after inspection, not all of the files follow the same column order or name. For example, some files go by:
first, last, address, city, state, username
But some other files goes by:
address1, address2, city, state, last_name, first_name, age
Using Power Query, Excel, VBA, or something else - is there a way to effectively merge multiple multiple CSV files with different column names and column order? I tried searching online, but none of the solutions are related to what I was looking for (example).
The end result with the example above should look like this:
username, last_name, first_name, age, address1, address2, city, state
Any extra columns that don't exist in one sheet can be blank (or null
) and the finalized column order doesn't matter because that can be rearranged later.