Excel Supreme

Excel track · Exercise 62 of 86

CONCAT and the & operator

Join two cells into one string, with the space passed in as its own piece.

Intermediate

Two names in two columns

Read-only data · answer in B4

In B4, join the first name in A2 and the last name in B2 with a single space between them.

AB
1FirstLast
2AdaLovelace
3GraceHopper
4Full name

Download this grid (.xlsx) Two tabs: the grid you see, and the answer.

B4

What it does

CONCAT joins its arguments into one string, in the order you list them. The call =CONCAT(A2," ",B2) returns Ada Lovelace: the first name, a typed space, then the last name. The space is an argument of its own, so =CONCAT(A2,B2) returns AdaLovelace.

This sheet asks for the name in B4, built from A2 and B2. The space is the piece that goes missing, and AdaLovelace reads like a name at a glance. The grader compares the text, so a dropped character fails the answer with no other warning.

The & operator joins the same way and is shorter to type: A2&" "&B2 answers the same text. This exercise grades CONCAT because that is the function it names. Either version reads from cells, so a corrected row changes the answer without an edit.

Syntax

=CONCAT(text1, [text2], ...) and =text1 & text2

Worked example

On Two names in two columns, =CONCAT(A2," ",B2) returns Ada Lovelace.

=CONCAT(A2," ",B2)

Common errors

Error codes for CONCAT and &
ErrorWhat it means and how to fix it
#VALUE!The joined text was used in arithmetic, as when the whole call is divided by zero.
#NAME?CONCAT is typed as CONCATE, and the sheet has no function by that name.
No spaceThe call =CONCAT(A2,B2) passes no separator, so the two names come out as AdaLovelace and the grader rejects it.

At work

A mailing list where first and last names arrive in separate columns and the export needs one name field.