Ms excel qry 2016

Hi Experts using excel 2016

I have six workbooks each with one worksheet. I want to combine ie create a query where I link each workbook to the other using a primary key..how do I do it..
route217JuniorAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rob HensonFinance AnalystCommented:
You will need to expand on your requirement to get some answers as there are numerous ways you can link files.

Can you upload a couple of the files and illustrate what fields are to be linked? Might be easier to demonstrate in one file with multiple sheets.
0
route217JuniorAuthor Commented:
Hi Rob thanks for the feedback.
0
route217JuniorAuthor Commented:
Hi Rob...

Test file uploaded just sample.data nothing else..
test_file.xlsx
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

route217JuniorAuthor Commented:
Need to connect project is to project is and project name to name...etc..
1
abbas abdullaCommented:
Hi,

You mentioned that your files contains one sheet, but the file you've attached is containing 3 sheets with different headers in each sheet. Anyway to merge excel files from folder together using Power Query you can use the below code.
1.  Go to Data Tab.
2. Choose New Query > From Other Sources > Blank Query
3. In the Query Editor Go to Advanced Editor.
4. Paste the code below in the Advanced Editor (Remove everything written in the editor before pasting).
5. Change the source folder path to be the path in your PC or Shared drive.

let
    Source = Folder.Files("C:\Users\abbasabdulla\Downloads\MergeXlFiles"),
    #"Removed Other Columns" = Table.SelectColumns(Source,{"Name", "Content"}),
    #"Exclude the opened files" = Table.SelectRows(#"Removed Other Columns", each not Text.Contains([Name], "~")),
    MakeContentAsTable = Table.AddColumn(#"Exclude the opened files", "MakeContentAsTable", each Excel.Workbook([Content])),
    RemoveAllOtherColumns = Table.RemoveColumns(MakeContentAsTable,{"Name", "Content"}),
    #"Expanded MakeContentAsTable" = Table.ExpandTableColumn(RemoveAllOtherColumns, "MakeContentAsTable", {"Name", "Data", "Item", "Kind", "Hidden"}, {"Name", "Data", "Item", "Kind", "Hidden"}),
    PromoteHeadersOfData = Table.AddColumn(#"Expanded MakeContentAsTable", "MyDataWithHeaders", each Table.PromoteHeaders([Data])),
    FilterOnlySheet1 = Table.SelectRows(PromoteHeadersOfData, each ([Name] = "Sheet1")),
    #"RemoveOtherColumnsExcept MyDataWithHeaders" = Table.SelectColumns(FilterOnlySheet1,{"MyDataWithHeaders"}),
    #"Expanded MyDataWithHeaders" = Table.ExpandTableColumn(#"RemoveOtherColumnsExcept MyDataWithHeaders", "MyDataWithHeaders", {"Co,mments", "ID", "Project Description", "Project Go Live", "Project Name", "Project Start Date"}, {"Co,mments", "ID", "Project Description", "Project Go Live", "Project Name", "Project Start Date"})
in
    #"Expanded MyDataWithHeaders"

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
route217JuniorAuthor Commented:
Thanks Rob...what other methods are available for learning...
0
Rob HensonFinance AnalystCommented:
It would help if you explain the correlation between the fields on each sheet. Just looking at it there does not seem to be any.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.