How to Join Text without Extra Spaces
Learn how to effectively use the TextJoin function in Google Sheets to combine text without introducing extra spaces, even when dealing with empty cells.
You're going to learn how to use TextJoin to join text without extra spaces in this video. Here we have an interesting problem. We have apartment numbers, streets, and cities, and we're trying to join these all together. We could even join them with a space or a comma. Here we're doing it with a space. And if you notice a little bit here, the third line, there is no apartment number , and there is a space. in the result. However, if we use TextJoin and we use this second modifier, the ignore empty and we say true, and we put in the text same here we do not get any spaces. It's going to ignore empty spaces. But I want to show you one little trick here that goes beyond how to join text without extra spaces, which is just the answer is use TextJoin , How to Merge Cells in Google Sheets Join Text Together with Concatenate, Concat and Ampersand!
add true, instead of just join. But we can also add the word apartment number before this, if this column C is blink. So let's do that. So what we're going to do is if is blink, we're going to select that C2. Now, if it is blink and it's true, we just want to join the text. If it is false, meaning it's not blink. Then we're going to prepend this with something. We can use concatenate , add apt number in quotes, and then a comma and text join. We can add a space after the number sign if we want, or not. Here now we have apartment number only when there is an apartment number here. So a little cool trick that if you have some. Duplicate Everything For Each Unique Value Join Text Together with Concatenate, Concat and Ampersand!
Blanks in your joins, you can use text join. And this nifty little extra thing is knowing that if is blank, is going to get you two separate results. If something is blank, do this. If something is not blank, do this other thing. That's a really cool addition if you're doing any kind of data cleaning, any data munging, any data analysis , and you're trying to. Smush stuff together, let's say. If you're looking to get more out of Google Sheets than you ever have before, consider subscribing here on YouTube on Better Sheets. Two Things to Know When Starting to Learn Google Sheets 5 Magical Ways To Use the IF() Formula in Google Sheets How To Grey Out Unused Cells