# Counting words on Glide table!

**URL:** <https://community.glideapps.com/t/counting-words-on-glide-table/19929>\
**Category:** Ask for Help\
**Created:** [December 16, 2020, 12:19am UTC](https://community.glideapps.com/t/counting-words-on-glide-table/19929 "2020-12-16T00:19:45Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![DareSteps](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/daresteps/32/11716_2.png) [@DareSteps](https://community.glideapps.com/u/DareSteps)\
**Post date:** [December 16, 2020, 12:19am UTC](https://community.glideapps.com/t/counting-words-on-glide-table/19929/1 "2020-12-16T00:19:45Z")

</div>

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?  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/4/44acee62f2067d095057e31c882bbf7cb59601b5.png)

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

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/c/5c31fdde907c896b5d66134680831b9702a4222b.png)

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

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [December 16, 2020, 12:23am UTC](https://community.glideapps.com/t/counting-words-on-glide-table/19929/2 "2020-12-16T00:23:22Z")

</div>

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.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/0/a04a0d58ca7413fb953bde109a04b593c4db2070.png)

> **[Thinh Dinh's lab V2.0](https://docs.google.com/spreadsheets/d/1JzBrp4R1zK9CMfmTzWWcPPep9-ZCl3OXxgWu27NWCy8/edit#gid=335901927)**
>
> Transpose data
> 
> Company,Telephone,Email,Company,Datatype,Data...

---

<div class="post-metadata">

**Author:** ![DareSteps](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/daresteps/32/11716_2.png) [@DareSteps](https://community.glideapps.com/u/DareSteps)\
**Post date:** [December 16, 2020, 12:36am UTC](https://community.glideapps.com/t/counting-words-on-glide-table/19929/3 "2020-12-16T00:36:42Z")

</div>

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?

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/4/a498456bf4257dfa5f7baff0d3ea2fecbcc81ef2.png)

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [December 16, 2020, 12:44am UTC](https://community.glideapps.com/t/counting-words-on-glide-table/19929/4 "2020-12-16T00:44:16Z")

</div>

I suspect that’s because of the “next line” characters. Will try to find a way out of it.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [December 16, 2020, 12:51am UTC](https://community.glideapps.com/t/counting-words-on-glide-table/19929/5 "2020-12-16T00:51:47Z")

</div>

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/5/5538a0fce254df1396bd40d79d13e5232bd29536.png)

@DareSteps it should be ok to test again now.

---

<div class="post-metadata">

**Author:** ![DareSteps](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/daresteps/32/11716_2.png) [@DareSteps](https://community.glideapps.com/u/DareSteps)\
**Post date:** [December 16, 2020, 1:28am UTC](https://community.glideapps.com/t/counting-words-on-glide-table/19929/6 "2020-12-16T01:28:37Z")

</div>

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…

[![](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/e/4ebf23857940146a5da04bd3860dc211e2896c62.png) ](https://dl.dropboxusercontent.com/s/oyydhz1e0z4hc65/Screen%20Shot%202020-12-16%20at%204.25.15%20AM.png?dl=0)

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [December 16, 2020, 1:31am UTC](https://community.glideapps.com/t/counting-words-on-glide-table/19929/7 "2020-12-16T01:31:37Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![DareSteps](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/daresteps/32/11716_2.png) [@DareSteps](https://community.glideapps.com/u/DareSteps)\
**Post date:** [December 16, 2020, 1:34am UTC](https://community.glideapps.com/t/counting-words-on-glide-table/19929/8 "2020-12-16T01:34:12Z")

</div>

So clear. Thank you so much.
