Concatenate cells but ignore blanks
This tutorial is going to show you how to combine cells with a certain delimiter but ignore blank cells in Excel.
How to concatenate cells but ignore blanks
As the below screenshot shown, you want to combine cells in each column with a delimiter “-” but ignore the blanks. Please do as follows.
Note: The below TEXTJOIN function is only available in Office 2019 and 365. If you are using the other Excel version, please find another formula at the end of the article.
How to use this formula?
1. Select a blank cell to output the combined texts.
2. Enter the below formula into it and press the Enter key. Select the result cell and then drag its Fill Handle right to apply the formula to other cells.
- 1. In this formula, the character "-" uses to separate the combined texts, and B3:B8 is the range of cells you will combine into a cell. Please change it as you need.
- 2. If you are using the other Excel version, please apply the below formula to achieve it. And use the IF function to join more cells if you need.
How this formula works?
The TEXTJOIN function joins multiple cells in range B3:B8 with a "-" seperator, and ignore all blank cells.