How to Combine Cells in Google Sheets and Keep Data
Trying to combine two cells in Google Sheets, only to have it delete half your data, is a frustratingly common roadblock. The standard "Merge cells" button seems straightforward until you realize it only keeps the value from the top-left cell. This article will show you several ways to properly combine cells while keeping all your valuable data intact. We'll cover simple formulas, advanced functions, and a few pro tips for clean, organized data.
Why Combine Cells in Google Sheets?
Before we dive into the "how," let's quickly cover the "why." Consolidating data into a single cell is a frequent task for anyone working with spreadsheets. It helps with formatting, data cleanup, and creating more readable reports.
Common scenarios include:
- Creating Full Names: Combining separate "First Name" and "Last Name" columns into a single "Full Name" column.
- Building Addresses: Merging street, city, state, and ZIP Code columns into one complete address line for mailing lists or CRM imports.
- Generating Product IDs or Summaries: Concatenating a product name with its SKU (e.g., "Classic T-Shirt - TS001") for easier reference.
- Consolidating Notes: Combining notes from multiple columns into a single summary cell.
In all these cases, losing data is not an option. Fortunately, Google Sheets provides powerful, non-destructive ways to get the job done.
The Problem with the Default "Merge" Button
The first tool everyone reaches for is the "Merge" button on the Google Sheets toolbar (it looks like two arrows pointing toward each other). While this feature is great for creating header cells that span an entire table, it’s not designed for combining data.
When you select multiple cells containing data and click "Merge," Google Sheets will display a warning: "Merging cells will only preserve the top-left most value. Would you like to proceed?"
If you have "John" in cell A2 and "Smith" in cell B2 and you merge them, the result is just "John." "Smith" is deleted permanently. This is why you need to use formulas instead.
Method 1: The Classic CONCATENATE Function
The tried-and-true method for joining data is the CONCATENATE function. It’s designed specifically to link multiple text strings together into a single string.
The syntax for the function is:
CONCATENATE(string1, [string2, ...])Step-by-Step Example: Combining First and Last Names
Let's say you have first names in column A and last names in column B, starting on row 2.
- Click on an empty cell where you want the combined name to appear (e.g., C2).
- Type the following formula and press Enter:
=CONCATENATE(A2, " ", B2)Breaking Down the Formula:
=CONCATENATE(...): This tells Google Sheets you want to join some items together.A2: This is the first string of text (the first name)." ": This is the second string. This is the crucial part! If you only didCONCATENATE(A2, B2), you'd get "JohnSmith" without a space. By putting a space between double quotes, you’re telling it to use a literal space character as the second item in the sequence.B2: This is your third string (the last name).
The result in cell C2 will be "John Smith."
Applying the Formula to Your Entire List
You don't need to type the formula for every row. Simply click on the cell containing your new formula (C2). You’ll see a small blue square at the bottom-right corner of the cell - this is the fill handle. Click and drag the fill handle down the column to automatically apply the formula for every row of data. Google Sheets will intelligently adjust the cell references (A3 and B3, A4 and B4, and so on).
Method 2: Using the Ampersand (&) Operator
If the CONCATENATE function feels a bit long-winded, you can use the ampersand (&) symbol as a quick and easy shorthand. The & operator tells Google Sheets to join pieces of text together, just like the function does.
Using the same First and Last Name example, the formula with the ampersand operator would be:
=A2 & " " & B2For many people, this is faster to type and easier to read, especially when combining many different cells.
Let's look at a more complex example where this method shines: creating a full address. Imagine your data is laid out like this:
- A2: 123 Main St
- B2: Anytown
- C2: NY
- D2: 12345
To combine this into a single address line, you could use the formula:
=A2 & ", " & B2 & ", " & C2 & " " & D2This would produce: "123 Main St, Anytown, NY 12345".
Notice how we can control the separators precisely - using a comma and space (, ) between some parts and just a space ( ) between others.
Method 3: The TEXTJOIN Function (The Pro-Level Choice)
For more complex jobs, the TEXTJOIN function is an incredibly effective tool introduced in more recent years. It's especially useful when you need to combine a range of cells with a consistent separator and want to gracefully handle any blank cells in your data.
The syntax for the function is:
TEXTJOIN(delimiter, ignore_empty, text1, [text2, ...])Breaking Down the TEXTJOIN Arguments:
- delimiter: The character(s) you want to place between each item. This is defined only once, making your formula much cleaner. For example, a comma and a space:
", ". - ignore_empty: A
TRUEorFALSE``` value. If set toTRUE,TEXTJOIN`` will automatically skip any empty cells in your range. This is its standout feature, as it prevents awkward extra delimiters (e.g., "Apple, , Orange"). - text1, [text2, ...]: The cells you want to join. This can be individual cells or an entire range, like
A2:D2.
Example: Combining Address Parts with a Potential Blank Cell
Let’s say you have address data, but sometimes the "Apartment #" column (B2) is blank.
- A2: 456 Oak Ave
- B2: (empty)
- C2: Springfield
- D2: IL
If you used the ampersand operator (=A2 & ", " & B2 & ", " & C2 & ", " & D2), you'd get an ugly result with an extra comma: "456 Oak Ave, , Springfield, IL"
But with TEXTJOIN, you write the formula like this:
=TEXTJOIN(", ", TRUE, A2:D2)Since we set ignore_empty to TRUE, the function sees that B2 is empty and skips it entirely, producing a clean result: "456 Oak Ave, Springfield, IL".
This function saves you from writing complex nested IF statements just to deal with potential blank cells and makes your data combination tasks much more efficient.
Practical Tips for Pristine Data Combination
Once you've mastered the formulas, keep these tips in mind to avoid common pitfalls and keep your datasheet clean.
1. Always Create a New Column First
Never try to overwrite your source data with a formula. Always perform your CONCATENATE, &, or TEXTJOIN operations in a new, empty column. Once you’re satisfied that the new, combined data is correct, you can clean up your sheet.
If you want to replace the original columns, you can do so by:
- Copying the new column with your formulas (select the cells and press Ctrl+C or Cmd+C).
- Right-clicking on the original data's column, and selecting Paste special > Values only.
This pastes the text results over the old data, removing the formulas and safely allowing you to delete any unneeded columns.
2. Clean Up Stray Spaces with TRIM
Sometimes, data imported from another source comes with unwanted leading or trailing spaces (" John " instead of "John"). These extra spaces can mess up your combined text.
You can use the TRIM function to automatically remove them by wrapping your entire formula in it. For example:
=TRIM(A2 & " " & B2)This will strip any extra spaces from the start or end of the output, ensuring consistent formatting.
3. Account for Dates and Numbers
When you join cells, all data, including numbers and dates, is converted into a plain text string. This means you can no longer perform mathematical calculations or date-based filtering on them. If you need to combine data but also keep a specific number or date format, use the TEXT function.
For example, if you have a product name in A2 and a launch date in B2, you could use this formula:
=A2 & " (Launched on: " & TEXT(B2, "mmmm d, yyyy") & ")"This would produce a clean result like: "Super Widget (Launched on: October 26, 2023)".
Final Thoughts
While the standard "Merge" button in Google Sheets leads to data loss, powerful alternatives are right at your fingertips. By mastering functions like CONCATENATE and TEXTJOIN, or using the simple & operator, you can combine information from multiple cells precisely how you want without losing a single piece of your data.
Of course, wrangling data in spreadsheets is often just the first step in a much longer reporting process. After you've cleaned everything up, you still need to build the actual pivot tables, charts, and dashboards to find insights. We’ve all been there: spending hours every week manually combining data, creating the same visuals over and over, and pulling reports from a dozen different places. With Graphed, we automate that entire cycle. Connect your sources (from Google Sheets to Shopify to Facebook Ads) and use simple English to build live dashboards and reports in seconds. It allows you to skip the manual work and get straight to the answers you need to grow your business.
Related Articles
How to Enable Data Analysis in Excel
Enable Excel's hidden data analysis tools with our step-by-step guide. Uncover trends, make forecasts, and turn raw numbers into actionable insights today!
What SEO Tools Work with Google Analytics?
Discover which SEO tools integrate seamlessly with Google Analytics to provide a comprehensive view of your site's performance. Optimize your SEO strategy now!
Looker Studio vs Metabase: Which BI Tool Actually Fits Your Team?
Looker Studio and Metabase both help you turn raw data into dashboards, but they take completely different approaches. This guide breaks down where each tool fits, what they are good at, and which one matches your actual workflow.