HomeGoogle DocsSpreadsheetCopy-Paste Merged Cells Without Blank Rows/Spaces in Google Sheets

Copy-Paste Merged Cells Without Blank Rows/Spaces in Google Sheets

Published on

How to copy-paste merged cells’ values without blank rows in Google Sheets?

Without copy-paste commands, transferring data thru’ a computer’s interface won’t be easier as we think. On Windows, you can use Ctrl+C to copy and Ctrl+V to paste. On Mac, just use the ‘Command’ key instead of the Ctrl.

In Google Sheets, we can use these commands to complete our tasks ASAP. I am not undermining the importance of the Cut command. It’s equally useful.

Other than the above commands there is a special command in Google Sheets and it’s ‘Paste special. I’ll come back to this.

There is no option in Google Sheets to copy-paste merged cells without blank rows or spaces. If you copy and simply paste, the values will be pasted as it is.

If you apply the paste special (Ctrl+Shift+V), then the values will be pasted as un-merged but with blank cells. Then what about pasting the copied values to another application? Se the below screenshots.

  • Extra blank rows in the pasted (paste special) column (column B) in Google Sheets (Screenshot # 1).
Copy merged cells and paste special in another column
  • Extra spaces in Notepad (Screenshot # 2).
Merged cells pasted in Notepad

To copy-paste merged cells without blank rows as well as spaces, you can follow the below approaches.

How to Copy and Paste Merged Cells Without Blank Rows in Sheets

If your purpose is to just copy the merged cells’ values in a column to another column that without blank rows in between, use the Filter formula.

For example, consider the scenario # 1 (screenshot # 1) above. In that in column B that ideally, in cell B1, you can use the below Filter formula.

=filter(A1:A,A1:A<>"")

It will filter out blank rows. In other words, it will extract the values in column A leaving blank rows caused by merging of rows.

Query is another way to remove blank rows from a merged column of data.

=query(A1:A,"Select A where A<>''")

What about scenario # 2? I mean how to paste the above values in column A to notepad without spaces. No more extra steps here. Use the Filter/Query formula and copy that formula output to Notepad.

Merged Cells to Unmerged Cells – Multiple Columns

In the case of merged cells in multiple columns, you can use the above Query formula as below.

Example: Merged cells in column A and B and the Query output in column D.

=query({A1:A;B1:B},"Select Col1 where Col1<>''")
Copy-Paste merged cells without blank rows - two column

Here as you can see the formula returns the values in merged cells in two columns into a single column. If you want the output in two columns, you can use the earlier filter formula in cell D1 and drag to the right.

Two column merged values to two column un-merged values

See that the values in each columns are getting pasted to adjacent cells to the down and right.

That’s all about how to copy-paste merged cells without blank rows in Google Docs Sheets. Thanks for the stay, enjoy!

More Google Sheets Tips and Tricks:

  1. How to Count If Not Blank in Google Sheets [Tips and Tricks].
  2. Vlookup in Google Sheets – 10 Formula Variations, Tips, and Tricks.
  3. 10 Best Tick Box Tips and Tricks in Google Sheets.
  4. How to Fill 0 in Blank Cells in Google Sheets [Tips and Tricks].
  5. Date Related Conditional Formatting Rules in Google Sheets.
Prashanth KV
Prashanth KV
Your Trusted Google Sheets and Excel Guide Prashanth KV brings a wealth of experience in Google Sheets and Excel, cultivated through years of work with multinational corporations in Mumbai and Dubai. As a recognized Google Product Expert in Docs Editors, Prashanth shares his expertise through insightful blogging since 2012. Explore his blog for practical tips and guidance on maximizing your spreadsheet skills.

SORT and SORTBY – Excel Vs Google Sheets

While Excel offers the SORT and SORTBY functions for sorting a table, Google Sheets...

Get Top N Values Using Excel’s FILTER Function

When using the FILTER function in Excel to extract the top N values, it's...

XLOOKUP in Excel: Working with Visible Rows in a Table

In Excel, the XLOOKUP function isn't inherently designed to exclusively work with visible rows;...

SUMPRODUCT Differences: Excel vs. Google Sheets

The core purpose of the SUMPRODUCT function remains consistent across both Excel and Google...

More like this

Interactive Random Task Assigner in Google Sheets

You have multiple tasks and multiple people. Here's a fun way to randomly assign...

Google Sheets Bar and Column Chart with Target Coloring

To color each data point in the column or bar chart according to the...

Analyzing Column A Between Non-Adjacent Values in Column B: Google Sheets

This tutorial addresses a common scenario encountered in Google Sheets: how to sum, average,...

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.