# Counting words on Glide table!

Hello Gliders, I believe it is possible to count words on google sheet using COUNTA function along with SPLIT " " etc if I am not mistaken. I tried COUNTA function on google sheet but it only counted the single cell. As you can see in this example below, 264 words found in H2 which counted the entire words in G2. I tried Arrayformula but didnâ€™t work and really hard to keep dragging the formula to keep it running. If there is any way around to achieve it?

Would it be possible to achieve it on Glide instead as it will keep counting words instantaneously which is really cool!

Thank you in advance for any helpful tips anyone of you might have.

Working example is ready. What this does is to replace all â€śtextâ€ť characters by an empty one so what is left are all â€śspacesâ€ť.

Letâ€™s say you have a sentence like â€śA B Câ€ť then the regexreplace will leave the 2 spaces. Hence we have to add 1 to that to get the total number of words.

4 Likes

It worked perfectly with a little increase which I am trying to understand. I admit that I am a beginner on Google sheet trying to understand it.

Mine is on Column H which is based on SPACE using COUNTA(SPLIT(G2," "). Yours is somehow magic but what is it based on? Space?

I suspect thatâ€™s because of the â€śnext lineâ€ť characters. Will try to find a way out of it.

@DareSteps it should be ok to test again now.

Yours is the highlighted one (Column J) and it indeed minimized the difference. Compared to mine (Column G), there is a little difference. I guess mine is wrong because it splits up words based on space. Yours splits up words based on? length of words? or space? orâ€¦

It does the things below:

• Brings all words into â€śone lineâ€ť (clear all the new lines characters and brings words onto the same line).

• Replace all â€śtextâ€ť characters as empty, which leaves the space characters only.

• Calculate the number of space characters and add 1 to get the final result.

2 Likes

So clear. Thank you so much.

2 Likes