Function Problems

Combine Excel Cells with a Greater-Than Separator and Skip Blanks

Jason MillerJason Miller Dec 2, 2026 869 views

Question details

Combine values from cells D through G into one cell, separated by greater-than signs, while ignoring blank cells.

Combine Excel Cells with a Greater-Than Separator and Skip Blanks
Product
Microsoft Excel
Device & OS
not provided
Scenario
Create a single text string from the nonblank values in a row.
Observed behavior
The desired result contains a greater-than sign between each included value, with no separators for blank cells.
Before you start

Identify the row containing your values and choose an empty cell outside columns D through G for the result. The examples below use row 1; change the row number to match your data.

Solution 1Recommended

Use TEXTJOIN to combine nonblank cells

Use this formula to add a greater-than separator only between values that are not empty.

1
Select an output cell

Click an empty cell such as H1, outside the D1:G1 source range.

2
Enter the formula

In H1, enter =TEXTJOIN(" > ",TRUE,D1:G1) and press Enter. TRUE tells Excel to ignore empty cells.

3
Apply it to other rows

Drag the fill handle from the bottom-right corner of H1 down to copy the formula to other rows.

Use TEXTJOIN to combine nonblank cells
Spaces are not blank cells: A cell containing only spaces is not empty. Use the trimming solution if extra spaces need to be removed.
Combine cells in WPS Spreadsheet

Join Nonblank Cells with WPS Spreadsheet

Use TEXTJOIN in WPS Spreadsheet to combine values with a greater-than separator while skipping empty cells.

  1. 1. Open your spreadsheet: Open WPS Spreadsheet and select your workbook from Open.
  2. 2. Choose an output cell: Click an empty cell outside the source range, such as H1.
  3. 3. Join the values: Enter =TEXTJOIN(" > ",TRUE,D1:G1) and press Enter.
  4. 4. Copy the formula: Drag the fill handle down from H1 to apply the formula to additional rows.
Join row values without adding separators for empty cellsOpen and save Microsoft Excel XLSX filesCopy the formula down a column for multiple rowsEdit spreadsheets in a familiar interface
microsoft office alternative - wps office

Frequently Asked Questions

What does TRUE do in the TEXTJOIN formula?

In =TEXTJOIN(" > ",TRUE,D1:G1), TRUE tells Excel to ignore empty cells, so they do not create extra separators.

Can I use a different separator?

Yes. Replace " > " in the formula with another quoted delimiter. For example, use =TEXTJOIN(" / ",TRUE,D1:G1) for a slash surrounded by spaces.

Why does a cell containing spaces still appear in the result?

A cell containing spaces is not empty. Use =TEXTJOIN(" > ",TRUE,TRIM(D1:G1)) to remove ordinary extra spaces before joining.

Why does Excel show a #NAME? error for TEXTJOIN?

Your Excel version may not support TEXTJOIN, or the function name may be misspelled. Check the formula and use a version of Excel that supports TEXTJOIN.