Merging Columns Into One Cell With Line Breaks

Overview

Sometimes you need to pull information from multiple columns and display it neatly in a single cell. A example is combining a Full Name, Email, and State into one cell, with each value appearing on its own line.

This article walks through a simple, repeatable way to do that using Omni’s natural language formula feature within the Results tab of a query. Here are the the sample fields we will use for this exercise:

Step 1: Use Omni’s Natural Language Formula

In a new column (for example, Column D), you can use Excel’s natural language prompt or manually enter the formula.

You can ask something along the lines of:

“In a new column, combine columns A, B, and C into a single cell separated by a line break.”

The formula will look something like: =CONCAT(A1, CHAR(10), B1, CHAR(10), C1)

–> CHAR(10) tells Omni to insert a line break. The CHAR() function returns character based on its numeric code, where 10 represents line feed.

Step 2: Wrap Text

Select your concatenated column (i.e. column D) and click on the word wrap icon on the editor bar.

Your table should look something like this:

5 Likes