transcript

excelisfun - Excel Magic Trick 1281: TEXTJOIN & CONCAT New Excel 2016 functions (14 Examples of Joining Items)

Thumbnail of the video “excelisfun - Excel Magic Trick 1281: TEXTJOIN & CONCAT New Excel 2016 functions (14 Examples of Joining Items)”
Download Markdown
Community upload. AI output has not been independently verified.

Welcome to Excel magic trick number 1,281. Hey, if you want to download this workbook, Exom Magric 1,280 to 1,281 and follow along, click on the link below the video. You are not going to believe this video. These are new functions. TEXTJOIN is simply amazing and CONCAT is pretty amazing, too. Now, this is in Excel 2016 or later. I'm shooting this in February 2016. If you don't have these functions and you're still watching this video in the year 2016, you probably have to go and sign up for the Insider program, which I demonstrate in Excel Magic Trick 1,280. And you can click on this sheet when you download it, and it has notes. Now, we're going to look at a bunch of cool tasks for both of these functions here.

We need to join first, middle, and last name. The way I usually do it is I simply use the join symbol, and since I need a space between each name, I put a space in double quotes and then I join it. So we are joining five different things. We have four ampersands, Ctrl+Enter, double-click, and send it down. That works in the old days. Not only that, but CONCATENATE is an older function. The new function CONCAT is supposed to replace it. But I want to remind us something about CONCATENATE. Notice CONCAT comes up first. The screen tip says it concatenates a list or range of text strings. That is what this function does differently. It can take a list, a range, or individual items. If I come down and click on CONCATENATE, it says join several text strings. So you have to do things one at a time. Notice that the compatibility yellow triangle means we shouldn't use this one anymore; we should use the newer one. But I want to check this one out. Notice the screen tip says text1, text2, text3. That will be different from our CONCAT screen tip.

I also want to show you that the dialog box for CONCATENATE and CONCAT is actually easier than typing it out from the screen tip. So I'm going to use the keyboard shortcut Shift+F3, or you can click this button right here. Shift+F3 opens up the Function Arguments dialog box. Here are the three things. Watch this. I'm going to click Tab. What's easier about the dialog box is that when I type a space and then Tab to get to the next text box, it puts the double quotes in for me. That is pretty amazing. That works for both CONCATENATE and CONCAT. So: text, Tab, space, Tab, and then I click there, and that does it. Click OK. Double-click and send it down. That's still the old way.

Now let's look at CONCAT. There it is: CONCAT. Tab. It says text1, and then dot dot dot. This argument can take something like this, which we'll see later, or one at a time, one in each argument. There is the first name. Shift+F3, Tab, space, Tab, Tab, space, Tab. So CONCAT can work exactly like CONCATENATE. Click OK. Double-click and send it down.

In this particular situation, since we have a delimiter between each of the items, a space, that is where the new function TEXTJOIN is so amazing. Equals TEXTJOIN, Tab. We can read this: concatenates a list or range of text strings using a delimiter. Look at that. There's the delimiter: double quote, space, double quote, to put a space as the delimiter. And look at this: ignore empty cells, or include empty cells. In this particular situation we don't have any empty cells, but in our next example we will. Ignore empty cells: I'm going to put TRUE. Double-click, or type a comma. Then the text. We can do the same thing and join separate items, but we are just going to click the whole range. In this situation, TEXTJOIN is what we should use. Ctrl+Enter, double-click and send it down. Oh my heavens, that is simply amazing. That is a huge benefit over our earlier versions of formulas for this task.

This is where it gets better. When we have blanks, we'd have to do something like this, right? For the middle name, we had to ask a question: are you blank? If you're blank, then please join; otherwise take whatever's there, like a T, and join a space. Same with CONCATENATE. Not anymore. Equals TEXTJOIN, Tab. The delimiter is still a space, comma, and this is where ignore empty cells is just beautiful: comma, and the text. I simply highlight a range, and it knows to put the delimiter between each one, and if it sees an empty cell, it just skips over it. Close parentheses, Ctrl+Enter, double-click and send it down. I don't know how many times I've had to deal with situations with empty cells. That is just amazing.

Now let's look at a situation for CONCAT. Oftentimes we're making product codes, and we have a bunch of different elements that go into the product code. If there's no delimiter between them, this is where the CONCAT function is so awesome. CONCAT, Tab. I simply highlight the range. That is amazing. So many times I've had items and I always used the ampersand, but no more. CONCAT is what I'm going to use.

If you happen to need a dash between the first item but not between the second, CONCAT can do that too. I can type CONCAT, Tab. The first text is simply supplier. Then I'm going to use the screen tip: double quote, space, double quote, comma. And then, for text, I can highlight a range. So I can combine a single cell or a range. Close parentheses, Ctrl+Enter, double-click and send it down. I see that I put a space there, and it really was supposed to be a dash. So the whole column is highlighted. I'm going to hit F2 to put it in edit mode, and I really wanted to backspace and make it a dash. Ctrl+Enter to populate this edited formula down through the column.

What if you needed a dash here and a slash here? This is not uncommon: we have multiple items we're joining together, and we need a different delimiter between each one. This is how I would do it. I would simply join, in double quotes, a dash to this one, join, and the next delimiter is a slash. That's easy enough, right? Ctrl+Enter, double-click and send it down. Well, guess what? The TEXTJOIN function can do this with the delimiter. We can put both delimiters in. Now we have to know array syntax: curly bracket, and then in double quotes a dash, comma, and then in double quotes our forward slash, end curly bracket. Array syntax. Many functions can handle multiple items if you just type them in. Comma, ignore, I'm going to say 1, Tab, and then the text: I simply highlight the whole range, and it will know to put the first delimiter between the first two items and the second delimiter between the second two. Close parenthesis, Ctrl+Enter, double-click and send it down. That is amazing. And guess what: this will also work if our delimiters are in cells off to the side. I'm going to hit F4 to lock it, and there is my relative cell range. Close parentheses, Ctrl+Enter, double-click and send it down. Pretty amazing. But it gets even more amazing.

Here is another example, and I'll do this one quickly. TEXTJOIN. I need a space, comma, 1, comma, and there is the number of plies for the wood, the size for the aircraft birch plywood, and the unit. Ctrl+Enter, double-click and send it down.

Here's another example for TEXTJOIN. This is a situation I've been in many times throughout the years. I have a column of emails. I do not have this as a group in Outlook. I have not set up a mail merge. I just need each of these emails separated by a semicolon so I can copy and paste them into my email editor, whatever it might be. I've done this for years. This is how I do it: ampersand, double quotes, semicolon, close double quotes, ampersand. Then I simply highlight this, copy, and then press Ctrl+V. That took a long time, but it's faster than any other way I can think of. Ctrl+Enter, and there it is. But I do not have to do that anymore. Here's my new favorite use for TEXTJOIN: I simply highlight, close parentheses, and I don't even press Ctrl+Enter. I go like this, because I'm going to paste it into my email. I highlight, press F9, Ctrl+Z, and then hit Enter. Now if I go over to my email editor and press Ctrl+V, there is all the text.

One more example for TEXTJOIN. If we wanted to take this data set and make a single column of delimited data, I know there's Save As text and CSV, which does it, but maybe you want to do it right here in the cell. Now we simply use a comma delimiter: comma, 1, comma, and there it is: first, last, email, phone. Close parentheses, Ctrl+Enter, double-click and send it down. TEXTJOIN, and to a lesser extent CONCAT, simply come to our rescue. Amazing.

So if you don't have the Insider program, you can go ahead and download it if you're watching this video in later years. You have to have Excel 2016 or later to get TEXTJOIN or CONCAT. I can't wait for the next video, where we'll talk about some of the other new functions. See you in the next video.