Concatenate() Function Examples 2

View examples of Excel’s Concatenate function used to create appropriate, dynamic, text strings for the outcome values of IF functions.

Illustration of Excel's Concatenate function used inside of an IF function to create a text string that includes the names of two cities if a particular condition is met.
Transcript(click to view)
Suzanne here. Welcome to Excel Intuition’s Concatenate() Example 2 Video. I’m going to jump to the If()
Example worksheet in this companion workbook, that I recommend you make sure you have a copy of if
you would like to learn from the workbook and try some things on your own. In this workbook we’ve got
a table in which we’re comparing sales tax rates from two different cities, and then we have a message
describing the results of the comparisons. So, here we have a message telling us the sales tax rates of
Pacific Grove and Soledad are the same.

And, you can see up here, that this IF() function has a Concatenate() function embedded inside the IF()
function, in the “value if true” argument of that function. In this case, we’re using the Concatenate()
function to join four different text, FIVE different text strings together, in this case. We have a text string
in quotes: “The tax rates of “, and then comma, then the second argument is the name of the city in B7,
another comma ends that argument, then we have in quotes the text string: ” and “, and then the
comma ends that argument.

Then, the fourth text string in this Concatenate() function is the name of the city in column C of the
table, and then the final text string in this Concatenate() function is the text in quotes:

” are the same”. So we see the result: “The tax rates of Pacific Grove and Soledad that are the same”.
Now, let’s say we put in here a different city so that these aren’t the same,

and then we have a different message concatenated as the outcome, that still includes the names of the
cities. Here we have, “Soledad has a higher sales tax rate than Castroville” as our message.

If we put a

City with a higher rate than Soledad, then we have a message here: “Greenfield has a higher sales tax
rate than Soledad”. The thing that’s beautiful about being able to use the Concatenate() function this
way, is that as the contents of the table changes the messages can change automatically, because we can
mix the text values from various cells in the table, with text strings, to convey the message that we want
to convey about those two different city names. So, the Concatenate() function can have up to 255 text
strings in one function, concatenated together, to create a new text string. Multiple text strings,
concatenated to create a new text string. Thank you.