Have you ever wanted to repeat in another workbook a query that you already built in one Excel workbook? Have you worried that you would have to recreate all the query steps again? Or maybe you managed to copy the M code, but you had to repeat that process as many times as queries you had to transfer.

In this post, I will share with you an awesome tip on how to easily copy queries from one workbook to another one without having to recreate every step manually!

Finding the queries to copy and checking if the query we want to copy depends of other queries

Open the two workbooks side by side and open the Queries and Connections pane in each workbook.

For that, go to the Data tab, and then click the button Queries and Connections.

On this pane, you can see the Power Query queries available in each workbook.

How to Copy a Power Query query from one Excel workbook to another one

We can check how many data sources each one of the queries has, and how the queries relate to each other by going to the Data tab, and then Get Data> Launch Power Query Editor.