ysskrishna logoysskrishna
Cover image for Merge Tools for Google Sheets: Merge, Unmerge and Combine Cells Without Losing Data

Merge repeated values, or a value with the blanks after it

Chapter 3 of 6 · 3 min · Merge Tools for Google Sheets: Merge, Unmerge and Combine Cells Without Losing Data

By Value merges follow your data: runs of the same value, or a value plus the empty cells below it. Plus the two Group by options for multi-column ranges.

By Value is the mode for real data, where group sizes vary. The sidebar describes it as: "Merge repeated values along a column or row, or merge each value with the empty cells below or to the right."

Options

  • DIRECTION: e.g. "Vertical - merge down columns".
  • MODE: Merge repeated values, or Merge value with empty cells.
  • ALIGNMENT: horizontal and vertical.
  • ADVANCED OPTIONS → Group by: Each column on its own or All columns follow the first.
  • Button: Apply Merge.

Which mode

Pick the mode from what the column looks like

Mode 1: merge repeated values

Consecutive cells with the same value become one merged cell.

Before (sample)After
CoreCore (spans 3 rows)
Core
Core
WebWeb (spans 2 rows)
Web
MobileMobile

Only consecutive repeats merge. Sort by that column first if the same value appears in separate places. Nothing is lost, because the merged cells all held the same value.

Mode 2: merge value with empty cells

A value extends over the blank cells after it, until the next non-empty cell. This fits exports that already "look merged" by leaving repeats blank:

BeforeAfter
CoreCore (spans 3 rows)
(blank)
(blank)
WebWeb (spans 2 rows)
(blank)

The examples workbook's ByValue_Blanks tab shows this layout.

Group by: multi-column ranges

When the selection has several columns (say Team in A, Project in B):

Who sets the merge pattern
OptionUse when
Each column on its ownColumns are unrelated
All columns follow the firstColumns describe the same record, like Team and Team lead

"Follow the first" prevents a confusing result where Project merges across two teams just because the value repeats at the boundary.

Step by step: a team roster

  1. Columns: A Team, B Lead, C Member (sample data). Sort by Team.
  2. Select A2:B20 (Team and Lead only, not Member).
  3. By Value, DIRECTION vertical, MODE Merge repeated values, Group by All columns follow the first.
  4. Apply Merge. Each team and its lead span the team's member rows.

Practice: repeated values versus blanks

Two columns that look similar on screen need different modes:

RowColumn A (repeated)Column C (blanks)
2FinanceFinance
3Finance
4Finance
5SalesSales
6Sales
  1. Select A2:A6, open By Value, choose MODE Merge repeated values, click Apply Merge. Expected: A2:A4 becomes one "Finance" cell, A5:A6 one "Sales" cell.
  2. Select C2:C6 and choose the mode that merges each value with the empty cells below it. Expected: the same two blocks.

Running "Merge repeated values" on column C does nothing useful: no two neighbouring cells hold the same value.

Watch for look-alike values

"Finance" and "Finance " (with a trailing space) are different values, so a repeated-values merge stops at the row with the space and you get two Finance blocks. The same happens with "finance" versus "Finance". Clean the column first: the Text Power Tools add-on's Trim both and case options, or a helper column with =TRIM(A2). See Trim and clean.

Common mistakes

  • Merging an unsorted column. Repeated values only merge when they are next to each other, so sort by the column first.
  • Using "Each column on its own" for columns that describe the same record (team and team lead). If two teams share a lead, the lead blocks no longer line up with the team blocks.

Quick check

Question 1 of 4

"Core" appears in rows 2-4 and again in row 9, with other values between. What does Merge repeated values do?

Continue exploring

ProductGoogle WorkspaceGoogle Sheets Merge Tools

Google Sheets Merge Tools

Repeatable merges in Google Sheets, without the misclick marathon.
Google Sheets Merge Tools
Google Workspace Add-ons
+3
CourseCover image for Table Converter for Google Sheets: Import and Export Markdown, JSON, HTML and CSV

Table Converter for Google Sheets: Import and Export Markdown, JSON, HTML and CSV

Import Markdown, JSON, HTML and CSV tables into Google Sheets without broken columns, and export any range as clean Markdown, JSON, HTML or CSV.

Google Sheets Table Converter
Google Sheets
+1

6 chapters · 12 min

ProductGoogle WorkspaceGoogle Sheets Tab Manager

Google Sheets Tab Manager

Your workbook outgrew the tab bar. Clean it up in batches.
Google Sheets Tab Manager
Google Workspace Add-ons
+3
BlogCover image for How to Delete Multiple Tabs in Google Sheets at Once (Bulk Hide, Rename, Sort)

How to Delete Multiple Tabs in Google Sheets at Once (Bulk Hide, Rename, Sort)

Google Sheets Tab Manager
Google Workspace Add-ons
+1
2 min read
CourseCover image for Sheets Tab Manager: Delete, Hide, Rename, Colour and Sort Tabs in Bulk

Sheets Tab Manager: Delete, Hide, Rename, Colour and Sort Tabs in Bulk

Delete multiple tabs in Google Sheets at once, hide and unhide in bulk, rename with find and replace, colour and sort tabs A–Z with the free Sheets Tab Manager.

Google Sheets Tab Manager
Google Sheets
+1

6 chapters · 18 min

CourseCover image for Text Power Tools for Google Sheets: Clean, Change Case and Extract Text

Text Power Tools for Google Sheets: Clean, Change Case and Extract Text

Fix messy text in Google Sheets without formulas: trim spaces, change case and naming styles, add prefixes, and extract emails, URLs, phones and dates.

Google Sheets Text Power Tools
Google Sheets
+1

7 chapters · 17 min