Automatically Fill Merged Cells in Google Sheets – Down or Across

Here, I’ll show you how to use an array formula-based approach to fill merged cells in Google Sheets, either down or to the right.

When you merge, say, ten cells in a column or row, only the first cell in the merged range actually holds a value. The rest are technically empty—even though visually it may seem like all the cells contain the same data.

That’s the problem.

By merging, you’re likely trying to convey that all those cells share the same value. While that works for presentation, worksheet functions don’t see it that way. So if you need to manipulate your data or use it in formulas, you’ll first need to fill merged cells in Google Sheets so each unmerged cell contains the correct value.

In this tutorial, I’ll show you how to do just that—vertically and horizontally.

Fill Merged Cells Down (Vertically) with Array Formula

Here’s a sample dataset:

Sample data with merged cells in range A1:B11

Let’s say cells A2:A4 are merged with the value “Tamara,” A5:A6 are merged with “Jane,” and so on.

Here’s how to fill those merged cells with the correct values after unmerging:

Steps:

Note: Before unmerging, make sure to remove any empty rows that are not part of the merged cell ranges.

  1. Select the range A2:A11 and unmerge the cells.
  2. In cell D2, insert this formula:
=ArrayFormula(
   LOOKUP(
     ROW(A2:A11),
     IF(LEN(A2:A11), ROW(A2:A11)),
     A2:A11
   )
)
Array formula output filling merged cells down in Google Sheets
  1. Select D2:D11, right-click, and choose Copy.
  2. Click on cell A2, right-click, and choose Paste special > Values only.

That’s it! You’ve now filled the previously merged cells down using an array formula.

How Does This LOOKUP Formula Work?

Here’s the formula syntax explained:

LOOKUP(search_key, search_range, result_range)
  • search_key – Row numbers from 2 to 11.
  • search_range – Only rows that contain values in A2:A11 (others become FALSE).
  • result_range – The names from A2:A11.
How LOOKUP fills down values in unmerged cells in Google Sheets

Google Sheets’ LOOKUP finds the last value less than or equal to the search key in the search range. So even if a direct match isn’t found, the last available value above it is used—perfect for filling down data.

Fill Merged Cells to the Right (Horizontally)

In the above example, we used ROW() for a vertical fill. To fill merged cells to the right in Google Sheets, we’ll use the COLUMN() function instead.

Sample Case:

Suppose the cells in B1:K1 are merged.

Sample data with merged cells across columns in range A1:K2

Steps:

  1. Unmerge B1:K1.
  2. In cell B5, enter the following formula:
=ArrayFormula(
   LOOKUP(
     COLUMN(B1:K1),
     IF(LEN(B1:K1), COLUMN(B1:K1)),
     B1:K1
   )
)
  1. Select B5:K5, copy it, and then paste values back into B1:K1.

That’s it—you’ve now filled merged cells to the right using an array formula.

Why This Method Helps

This method is especially helpful when dealing with large datasets. Instead of manually filling each merged cell, you can use this approach to automatically fill every unmerged cell with the appropriate value—either down or to the right.

If you’re working with large reports or dashboards, knowing how to fill merged cells in Google Sheets can save a lot of time and keep your data usable.

Final Tip

These formulas return dynamic results, meaning they’ll update automatically if you change the source data. If you want static values, copy the output and paste as values using Ctrl+Shift+V (or Cmd+Shift+V on Mac).

More Google Sheets Tips:

Prashanth KV
Prashanth KV
Your Trusted Google Sheets and Excel Expert Prashanth KV is a Diamond Product Expert in Google Sheets, officially recognized by Google for his contributions to the Docs Editors Help Community and featured in the Google Product Experts Directory. Explore his blog to learn advanced formulas, automation tips, and problem-solving techniques to elevate your spreadsheet skills.

Calculate Trip Days by Month (Start, End, and Full Days) in Google Sheets

If you're managing business travel in Google Sheets, you may need to calculate how...

Mode of Comma-Separated Numbers in Excel (Dynamic Array)

There is no dedicated function in Excel to directly find the mode of comma-separated...

How to Find Mode of Comma-Separated Numbers in Google Sheets

Working with comma-separated numbers inside a single cell is a common scenario in Google...

How to Count Merged Cells in Google Sheets (and Get Their Size)

Sometimes, you may have blocks of merged cells in a column or row. But...

More like this

Calculate Trip Days by Month (Start, End, and Full Days) in Google Sheets

If you're managing business travel in Google Sheets, you may need to calculate how...

How to Find Mode of Comma-Separated Numbers in Google Sheets

Working with comma-separated numbers inside a single cell is a common scenario in Google...

How to Count Merged Cells in Google Sheets (and Get Their Size)

Sometimes, you may have blocks of merged cells in a column or row. But...

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.