How to merge data in Google Sheets

Every once in a while each Google Sheets user faces the inevitable: combining several sheets into one. Copy-pasting is tedious and time-consuming, so there has to be another way. And you're right – there are several ways, in fact. So get your tables ready and follow the steps from this article.

All the ways I describe can be used to process large tables. But to keep this guide as clear as possible, I'll keep my tables short and am going to cut down to a couple of sheets.

Reference cells in Google Sheets to pull data from another tab

The easiest way comes first. You can pull entire tables to one file by referencing cells with data from other sheets.

Note. This will do if you need to merge two or more sheets within one Google spreadsheet. To merge multiple Google spreadsheets [files] into one, jump right to the next method.

So, my data is scattered all over different sheets: June, July, August. I'd like to pull data from July and August into June to have one table as a result:

  1. Find the first blank cell right after your table [the June sheet for me] and place the cursor there.
  2. Enter your first cell reference. The first table I want to retrieve starts from A2 in the July sheet. So I put:

    =July!A2

    Note. If there are spaces in your sheet name, you must wrap it in single quotes like this:

    ='July 2022'!A2

    This immediately replicates whatever lies in that cell:

    Note. Use relative cell reference so it changes itself when copied to other cells. Otherwise, it will return incorrect data.

  3. Make sure the cell with the reference is selected and click on that little blue square at its bottom right corner. The mouse cursor will turn into a big black plus sign. Keep the mouse pressed and drag the cursor to as many columns to the right as you need to fill them with new records:
  4. Select this entire new row, click that little blue square once again, hold and drag your mouse down – this time to fill entire rows with cell references and bring new data from another sheet:

Though this is probably the first way you may think of to pull data from another tab, it's not the most elegant and quick. Luckily, Google prepared other instruments specially for this purpose.

Copy the tabs into one spreadsheet

One of the standard ways is to copy the tabs of interest into the destination spreadsheet:

  1. Open the file that contains the sheet[s] you want to transfer.
  2. Right-click the first tab you need to export and choose Copy to > Existing spreadsheet:
  3. The next thing you'll see is the pop-up window inviting you to select the spreadsheet. Browse for it, click on it to highlight it, and press Select when you're ready:
  4. Once the sheet is copied, you'll get a corresponding confirmation message:
  5. You can either hit OK and continue with the current sheet or follow the link called Open spreadsheet. It will instantly get you to another spreadsheet with the first sheet already there:

Export/import sheets

Another way to import data from multiple Google Sheets is to export each sheet first, and then import them all to a necessary file:

  1. Open the spreadsheet that contains the sheet you'd like to pull the data from.
  2. Make the sheet of interest active by selecting it.
  3. Go to File > Download > Comma-separated values [.csv]:

    The file will be downloaded to your computer.

  4. Then open another spreadsheet – the one you'd like to add the sheet to.
  5. This time, pick File > Import from the menu and go to the Upload tab in the Import file window:
  6. Hit Select a file from your device and find the sheet you've downloaded just now.
  7. Once the file is uploaded, you'll see a window with additional options for importing the sheet. To add the contents of that another sheet after your existing table, pick Append to current sheet:

    Tip. Among other settings, feel free to specify the separator and convert text to numbers, dates, and formulas.

  8. As a result, you'll get two sheets merged – one table under another:

    But since it is a .csv file you need to import, the second table remains formatted in a standard way. You will have to spend some time formatting it as you need.

Google Sheets functions to combine data from multiple spreadsheets

Of course, it wouldn't be Google if it didn't have functions to merge data in Google Sheets.

IMPORTRANGE to import data from multiple Google sheets

As the name of the function suggests, IMPORTRANGE imports data from multiple Google spreadsheets into one sheet.

Tip. The function helps Google Sheets pull data from another document as well as from other tabs from the same file.

Here's what the function requires:

=IMPORTRANGE[spreadsheet_url, range_string]

  • spreadsheet_url is nothing else than the link to the spreadsheet from where you need to pull the data. It must always be put between double-quotes.
  • range_string stands for those cells specifically that you need to bring to your current sheet.

And here's the pattern I follow to import data from multiple Google Sheets using IMPORTRANGE:

  1. Open the spreadsheet from which you want to pull the data.

    Note. Make sure you have at least viewing access to that file.

  2. Click the browser URL bar and copy the link to this file right till the hash sign [#]:
  3. Note. You'll need this URL even if you're going to combine sheets from the same file.

    Tip. Though Google says the function requires the whole URL, you can easily get by with a key – a part of the URL between /d/ and /edit:

    ...google.com/spreadsheets/d/XYZk0274gRlmluCTfMbzbMQWKiAeq1va77X4/edit

  4. Return to the spreadsheet where you want to add the info to, enter the IMPORTRANGE to where the borrowed table should appear, and insert the link as the first argument. Then separate it from the next part with a comma:
  5. Note. Remember, the link should be surrounded by double quotes.

  6. For the second part of the formula, type in the name of the sheet and the exact range that you want to pull. Confirm by pressing Enter.

    Note. Wrap the second argument in double quotes as well:

    =IMPORTRANGE["//docs.google.com/spreadsheets/d/XYZk0274gRlmluCTfMbzbMQWKiAeq1va77X4/edit","May!A2:D5"]

  7. Though the formula looks ready now, it will return the #REF error from the start. That's because the first time you try to pull data from some spreadsheet, IMPORTRANGE will ask for access to it. Once the permission is granted, you will easily import records from other sheets of that file.

    Click the cell with the error and press that blue Allow access prompt:

  8. Note. By allowing access, you let the Sheets know you don't mind any existing or potential collaborators on this spreadsheet accessing data from another file.

  9. Once the formula connects to that other sheet, it will import data from there:
  10. Note. IMPORTRANGE doesn't pull the formatting of the cells, only values. You will need to apply formatting manually afterwards.

    Tip. If the tables are rather big, just allow some time for the formula to pull all records.

    Note. The records returned by the function will be updated automatically if you change them in the original file.

Google Sheets QUERY to import ranges from multiple sheets

And thus, without haste, we've come to the QUERY function once again. :] It is so versatile that can be used in Google spreadsheets to combine data from multiple sheets [within the same file] as well.

So, I want to merge three different Google sheets [from one file]: Winter 2022, Spring 2022, and Summer 2022. They contain the names of all employees who became best in their jobs in different months.

I go to the first sheet – Winter 2022 – and add my QUERY right under the existing table:

=QUERY[{'Spring 2022'!A2:D7;'Summer 2022'!A2:D7},"select * where Col1 ''"]

Let's see what it all means:

  • {'Spring 2022'!A2:D7;'Summer 2022'!A2:D7} – are all the sheets and ranges I need to import.

    Note. The sheets should be written in between the curly brackets. If their names contain spaces, use single quotes to list the names.

    Tip. Separate the ranges with a semicolon to pull data from different tabs one under another. Use commas instead to have them imported side by side.

    Tip. Feel free to use such infinite ranges as A2:D.

  • select * where Col1 '' – I tell the formula to import all records [select *] only if cells in the first column of the tables [where Col1] are not blank ['']. I use a pair of single quotes to indicate the non-blanks.

    Note. I use '' because my column contains text. If your column contains other data type [e.g. date or time, etc.], you need to use is not null instead: "select * where Col1 is not null"

As a result, two tables from other sheets have been consolidated into one sheet one under another:

Tip. If you'd like to use Google Sheets QUERY to import ranges from multiple separate spreadsheets [files], you will have to implement IMPORTRANGE. Here's a formula to pull your data from other documents:

=QUERY[{IMPORTRANGE["XYZk0274gRlmluCTfMbzbMQWKiAeq1va77X4","Mar-Apr-May!A2:D6"];IMPORTRANGE["XYZahJZHSlhMGLSW_xA6ZBqNmt1I0ADo4N4M","Jun-Jul-Aug!A2:D4"]},"select * where Col1''"]

Tip. I use the keys from URLs rather than entire links in this long-enough formula. If you're not sure what that is, please read here.

Tip. You can also use QUERY to merge two Google sheets, update cells, add related columns & non-matching rows. Check this out in this blog post.

3 quickest ways to merge multiple Google sheets

If standard ways of Google spreadsheets to combine data from multiple sheets seem dull, and the functions scare you off, there's an easier approach.

Combine Sheets add-on

This first special add-on – Combine Sheets – was designed with a single purpose: import data from multiple Google sheets. It's clever enough to recognize the same columns in different sheets and bring data together accordingly if you need.

All you are to do is:

  1. Select sheets or entire spreadsheets to merge and specify the ranges if necessary. The possibility to do a quick search in Drive makes this even faster.
  2. Choose how to pull the data:
    • as a formula. Mark the checkbox called Use a formula to combine sheets if you want to have a master sheet that will dynamically change based on your original contents.

      Although you won't be able to edit the resulting table, its formula will be always linked to the source sheets: edit a cell or add/remove entire rows there, and the master sheet will be altered accordingly.

    • as values. If editing the resulting table manually is more important, ignore the above option and all data will be combined as values.

    Extra options are here for fine-tuning:

    • join records from the same columns into one column
    • keep the formatting
    • add a blank line between different ranges to notice them right away
  3. Decide where to place the merged table: new spreadsheet, new sheet, or in a location of your choice.

Here's a quick demonstration of how I combined my three small tables with the add-on:

Of course, your tables can be much bigger and you can merge lots of different sheets as long as the resulting spreadsheet doesn't exceed the 10M cell-limit.

Tip. Make sure to check out the help page for Combine Sheets.

One of the options this add-on offers is to add more sheets to your previously combined data. In this case on step 1, you need to pick not only the data to combine but also the existing result. Here's how it looks:

Consolidate Sheets add-on

Consolidate Sheets is a relatively new addition to our add-ons. Its main difference from the aforementioned tool is the ability to add up data in columns in Google Sheets [or rows, or single cells, for that matter].

Consolidate Sheets also recognizes common headers in all the Google sheets to join, even if they are in the leftmost column and/or the first row. There's always an option to merge Google sheets and calculate cells based on their place in the tables.

Let me break it down into steps for you as well:

  1. Select sheets to consolidate. Import more files from Drive if necessary straight from the add-on.
  2. Pick the function to consolidate in Google Sheets.
  3. Choose the way to add up cells in Google Sheets: by labels [header labels, left column labels, or both] or position.
  4. Decide where to place the consolidated data: new spreadsheet, new sheet, or any specific location within the opened file.

Here's how this process looks:

There's also an option to consolidate all your sheets using a formula. This way your result will change in sync with the values in the source sheets:

Note. There are some peculiarities you need to know about how the formula works. For example, if you consolidate from multiple different files, there will be an extra step to connect the sheets for the IMPORTRANGE in use. Please visit the instructional page for Consolidate Sheets for these and other details.

Or here's a short tutorial about the add-on work:


I truly encourage you try the add-on on your data. You'll see for yourself how much extra time you'll have after incorporating this tool to your daily work.

Merge Sheets add-on

There's one more add-on worth mentioning. Though it merges only two Google sheets at a time, it couldn't be more useful. Merge Sheets matches records from the same column in both sheets/documents and then pulls related data from the lookup sheet/document into the main one. Hence, you always have an up-to-date spreadsheet at hand.

There are 5 straightforward steps:

  1. Select your main sheet.
  2. Select your lookup sheet [even if it's in another spreadsheet].
  3. Choose columns where matching records may occur.
  4. Tick of the columns with records to update.
  5. Tweak any additional options that will help you merge two sheets and achieve the best result possible.

If these words don't speak much to you, here's a video tutorial instead:


If you're ready to try it for yourself, visit this help page for details about each step and setting.

On this note, I'm going to finish this article. Hope these ways of pulling data from multiple different sheets into one will be of use. As always, looking forward to your comments!

You may also be interested in

Chủ Đề