/

How to Count Words in LibreOffice Calc Cell

1747 views

This quick tutorial explains steps required to Count Words in LibreOffice Calc Cell.

There are no direct features available in LibreOffice that can help you to count words. In the early article, I explained how to count characters in LibreOffice Calc. In this guide, we count the words.

Count Words in LibreOffice Calc Cell

There is no specific way. This can only be achieved by combining some formulas in Calc cell. The words in a sentence in general separated by one single space, i.e. ” “.

Let’s do it via an example.

I have this following data in a Calc sheet in Column A.

Source data - words
Source data – words

The words are separated by a space. So, here’s a summary of the logic which we want to implement:

a) Remove any leading and training spaces
b) Count the length of the sentence
c) Count the length without the spaces
d) Subtract above two values and add 1. Because for a minimum of two words, there is one space!

  • Use TRIM() and LEN() function to achieve point# a and #b.
  • Use SUBSTITUTE to remove ” ” single space with “” empty string.
  • Final count of words in Column D, is subtracting and add 1.

So, if you combine them together – the following formula would give you the count of words in LibreOffice Calc cell.

=LEN(TRIM(A1))-LEN(SUBSTITUTE(TRIM(A1)," ",""))+1

In the above formula – change A1 as per your need.

Count of Words in LibreOffice Calc
Count of Words in LibreOffice Calc

I hope this give some guidance on how you can Count Words in a spreadsheet. You can modify above idea and achieve desired result by combining the concept with other means.

Let me know in the comment section below, if you are facing errors. And don’t forget to mention if it helped you.

Cheers.


Looking for something else?

Read our complete tutorial index of Calc, Writer, Impress and Draw.


Join our Telegram channel and stay informed on the move.

Related


arindam

Creator of libreofficehelp.com. The aim is to help as many people with easy-to-understand tutorials and no BS. Follow us using social channels or send us an email.

Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x