Hey, welcome back. This video's gonna be really quick because we're just adding a word counter. In another video, we counted the characters in a cell, and that was literally one one formula here. We just did l e n for length, and we got a character count, but now we're gonna add is worked. And it takes two formulas.
So as you can see, we have this. Here, I'll put it into here and you see it's 20 words and we get 20 words here. So how did we do that? All we did is we split around, we used the split formula around all of the spaces, and then we counted essentially all of the columns in that row of that split. So how we do that is I will show you by making this a little bit bigger.
So we're gonna go equals, so if we just split, we split this text around a, the, the eliminator is a space and parenthesis, and that's gonna get us. A long row of different columns of every single word. And then we're gonna do count A C O U N T A, count all you want. Split. And see now we have counter and that's it.
Just count all. And split gets us that. But there's one thing that's gonna happen that I want to show you a challenge we gotta overcome. And if there are zero words there, it comes off as one. Why is that? Because there's always, with this split, there's always going to be a blank column to count.
So what you want to do is wrap this around an if is blank, double. So we go. Then is blank. And then we do that same b2, and if it's blank, we want it to do nothing. And then if we, it is not blank, meaning there is some words in there, we want it to count all. So the first, so there's three arguments. One is of this, And it's a true or false statement.
Is it blank? Currently it is blank. So we wanted to do the second argument, which is absolutely nothing. And if it's false, we want it to do count all split. And that's how we add that. So we do nothing. And then once we start typing, one word is now two. One is one. Do one word third, three word. I get six, and that's how you add a word counter to any document you're working with.
Bite.