Articles on: Google Sheets
This article is also available in:

Duplicating queries from one sheet to another in the same document

Want to have the same Dataslayer tables in different tabs, with different accounts or date ranges, but in the same document?



Duplicating a sheet with Dataslayer tables created, WON'T duplicate the Dataslayer queries, it only duplicates the raw data.

With this tutorial, you will quickly learn how to duplicate sheets with Dataslayer tables created without breaking anything you have built before!

We have 2 different ways to duplicate queries, depending on the number of queries you want to duplicate per sheet.
Duplicate a few number of queries
Duplicate a large number of queries

Duplicating a few number of queries from one sheet to another



Build a data table with Dataslayer. If you already have your first query created, you can skip this step.


Click on any cell on the data table, wait for the pop-up menu to appear and click on the Duplicate option.


If you just want to duplicate the queries and don't mind loosing the format or formulas of your tables, go directly to step 3 and forget steps 4-7.

In a new untitled sheet, make the changes you want on the Dataslayer extension to be able to set up the new parameters. In this example, we are going to change only the Facebook Ad Account since we want the same table for a different client.


If creating a new sheet is enough for your needs, then you have finished duplicating your query! Congrats!


If you want to keep the cells format, formulas or anything you have previously prepared on your original sheet, skip step 3 and follow the next steps:

To be able to keep the cells format, formulas or anything you have previously prepared on your original sheet, make a copy of the sheet you want to duplicate. Take into account that this copy doesn't have stored the data of the query you've previously made.


Go to the copied sheet and rename it. Then, manually delete all the Dataslayer data on this sheet. Please, don't delete your custom formulas (i.e. any sum, if, division...).


In your duplicated sheet, click on the cell you want to build your table, and make the changes you want on the Dataslayer extension to be able to set up the new parameters. In this example, we are going to change only the Facebook Ad Account since we want the same table for a different client.


Once clicked on Generate table, your new data will appear, and you will have your table with the new information.



Duplicating a large number of queries from one sheet to another



Build a data table with Dataslayer. If you already have your first query created, you can skip this step.


Make a copy of the sheet you want to duplicate. This copy doesn't have stored the data of the query you've previously made.


Rename the copied sheet with the name you want and go to the DataslayerQueries hidden sheet.


Manually copy the entire row that stores the query you want to duplicate and paste it below. Do this with all the queries in that sheet.


Manually delete the columns A and B of your new copy-pasted row. Leave column A empty and fill in the column B with the new sheet name.


Click anywhere on that row, wait for the pop-up menu to appear, and click on Refresh. This action will refresh and duplicate the same query in the new sheet.


Once refreshed, the query will be automatically created. This is a copy of the query you've previously made.


Go back to your duplicated sheet, click anywhere on the data table, and wait for the pop-up menu to appear. Click on Modify to be able to make the changes you want.


Make the changes you want on the query. For this example, we are changing the Facebook Ad Account since we are duplicating sheets for different clients. Then click on Confirm changes and you will see your new client's data.


Here you can see another example where we explain the usefulness of this functionality!

Still have doubts? Contact us through our live chat on our website or via email.

Updated on: 30/03/2023

Was this article helpful?

Share your feedback

Cancel

Thank you!