TEXTJOIN / Teacher

Combine First and Last Names for Roster

I have student first names in column A and last names in column B and need to merge them into 'Last, First' format.

formula.xlsx
=TEXTJOIN(", ", TRUE, B2, A2)

How it works: The TEXTJOIN function concatenates a list or range of text strings using a delimiter you specify. Here, we use ', ' as the delimiter. The `TRUE` argument tells TEXTJOIN to ignore any empty cells. We then specify the last name (B2) and the first name (A2) in the desired order to achieve the 'Last, First' format.

Data Setup

First Name Last Name
John Doe
Jane Smith
Peter Jones

Step-by-Step Guide

1

Select the cell where you want the combined name to appear (e.g., C2).

2

Type the formula: `=TEXTJOIN(", ", TRUE, B2, A2)`

3

Press Enter. The name will appear as 'Doe, John'.

4

Drag the fill handle (the small square at the bottom-right of cell C2) down to apply the formula to the rest of your student list.

Explore More