How to Combine 4 Excel Cells into One but Ignore Cells with Particular Data

Abstract: Combine four Excel cells into one while ignoring specific data like "Skip" or blanks using TEXTJOIN with IF conditions.

Created: 2026-09-14 by
To combine four Excel cells into a single cell while ignoring specific data, use the TEXTJOIN function with an empty string delimiter and filter out unwanted values using an IF condition. This approach ensures that blank cells or those containing exclusion criteria are skipped entirely during concatenation. The method is efficient for cleaning and merging datasets without manual intervention or complex macros.

Understanding the TEXTJOIN Function

The TEXTJOIN function is available in Excel 2019 and Microsoft 365 subscriptions. It allows you to combine text from multiple ranges or strings with a specified delimiter. Unlike older methods such as the ampersand (&) operator or the CONCATENATE function, TEXTJOIN can ignore empty cells by default if configured correctly. However, to ignore specific data (such as "N/A", "Unknown", or blank placeholders), you must pair it with logical conditions.

The syntax for TEXTJOIN is:

=TEXTJOIN(delimiter, ignore_empty, text1, [text2], ...)

The first argument is the delimiter (e.g., ", " or "-"). The second argument is a boolean value indicating whether to ignore empty cells. The remaining arguments are the text strings or ranges to join. To exclude specific non-empty data, we need to wrap the range in an IF statement within the function arguments.

Step-by-Step Implementation

Assume you have data in cells A1 through D1, and you want to combine them into cell E1. You wish to ignore any cell that contains the word "Skip" or is completely blank.

1. Constructing the Formula

You cannot directly pass a filtered array into TEXTJOIN in older versions of Excel without helper columns, but in modern Excel, you can use dynamic array logic. Here is the robust formula structure:

=TEXTJOIN(", ", TRUE, IF(A1:D1<>"Skip", A1:D1, ""))

This formula evaluates each cell in the range A1:D1. If the cell does not contain "Skip", it returns the cell's value; otherwise, it returns an empty string (""). Because the ignore_empty parameter is set to TRUE, these empty strings are ignored during the joining process.

2. Entering the Formula

  • Select the destination cell where you want the combined result.
  • Type the formula exactly as shown above, adjusting the range (A1:D1) and the exclusion text ("Skip") to match your needs.
  • If you are using Excel 365 or Excel 2021+, simply press Enter. The formula will process the array automatically.
  • If you are using an older version of Excel that supports TEXTJOIN but not dynamic arrays, you may need to confirm the formula with Ctrl+Shift+Enter, although TEXTJOIN itself is generally array-friendly in supported versions.

3. Handling Multiple Exclusion Criteria

If you need to ignore more than one type of data (e.g., both "Skip" and "N/A"), you can nest multiple IF statements or use ISERROR checks if dealing with error values. For text exclusions, a nested IF works well:

=TEXTJOIN(", ", TRUE, IF((A1:D1<>"Skip")*(A1:D1<>"N/A"), A1:D1, ""))

This uses boolean multiplication to ensure both conditions are met. Only cells that are neither "Skip" nor "N/A" will be included in the final joined string.

Alternative Methods for Older Excel Versions

If you do not have access to TEXTJOIN, you must rely on the CONCATENATE function combined with IF statements for each individual cell. This is less scalable but necessary for legacy systems.

=CONCATENATE(IF(A1<>"Skip", A1&", ", ""), IF(B1<>"Skip", B1&", ", ""), IF(C1<>"Skip", C1&", ", ""), IF(D1<>"Skip", D1, ""))

This method requires manual adjustment for every additional column. It also risks leaving trailing delimiters if not carefully managed. For large datasets, consider upgrading to a version that supports TEXTJOIN or using VBA.

Troubleshooting Common Issues

#VALUE! Error: This often occurs if the range includes non-text data types like dates or numbers without formatting. Ensure all cells in the range are formatted as Text, or wrap the range in TEXT() if necessary. Alternatively, TEXTJOIN usually handles numbers gracefully by converting them to text automatically.

Delimiters Appearing Twice: If you see double commas (e.g., "A,, B"), check if your source data contains spaces or hidden characters. Use the TRIM function on your source data before applying TEXTJOIN to remove leading/trailing whitespace.

Performance Lag: When working with hundreds of thousands of rows, volatile functions can slow down calculation. As noted in our guide on manipulating large data sets in Excel, minimizing volatile array formulas across massive ranges is crucial for maintaining performance. Consider using Power Query for static consolidation tasks instead of live worksheet formulas.

Best Practices for Data Consolidation

  • Consistent Formatting: Ensure all source cells follow the same text format. Mixed formats can lead to unexpected results when joined.
  • Backup Source Data: Always keep the original uncombined data intact. Formulas create dependencies that can break if source cells are deleted or moved.
  • Use Helper Columns: If the logic becomes too complex for a single formula, create intermediate columns to clean the data (removing exclusions) before using TEXTJOIN.

Frequently Asked Questions

Can I use TEXTJOIN in Excel 2016?

No, TEXTJOIN was introduced in Excel 2019 and Microsoft 365. Users of Excel 2016 must use workarounds involving CONCATENATE and IF statements, or upgrade their subscription.

How do I ignore cells containing errors like #N/A?

You can include error checking in the IF condition. For example: =TEXTJOIN(", ", TRUE, IF(ISERROR(A1:D1), "", A1:D1)). This replaces any error values with empty strings, which are then ignored by TEXTJOIN.

What if I want to keep the original order of the cells?

TEXTJOIN processes the range from left to right (or top to bottom) by default. As long as you specify the range in the correct order (e.g., A1, B1, C1, D1), the resulting text will maintain that sequence.

Can I combine cells from different sheets?

Yes, you can reference ranges from other sheets within the TEXTJOIN function. For example: =TEXTJOIN(", ", TRUE, Sheet2!A1:A4, Sheet3!B1:B4). Just ensure the sheet names do not contain spaces or special characters that require quoting.

Is there a limit to the number of characters TEXTJOIN can handle?

TEXTJOIN can return up to 32,767 characters, which is the maximum length for a text string in Excel. If your combined data exceeds this limit, the result will be truncated.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More