XL.CountWords function: count the number of words in a range

How to use CountWords function for Excel: formula and results
XL.CountWords function – Text function type – returns the amount of words in a single cell or range of cells.

Before you begin, add Functions to Excel

Functions are one of the 20+ features within XLTools Add-in for Excel. Works in Excel 2019, 2016, 2013, 2010, desktop Office 365.

Get started with XLTools ribbon
– free trial gives you 14 days of full access to all features.

Syntax

=XL.CountWords(text)
ArgumentDescription
text
[required]
Any text string or a range of cells where you want to count the number of words

Examples [download]

Download this spreadsheet with examples and try the function yourself.


FormulaDescription
=XL.CountWords(A2)Counts the number of words in cell A2
=XL.CountWords("One small sentence.")Counts the number of words in the specified text string
=XL.CountWords(Table1[Text])Counts the number of words column Text in the Table1

Any questions or suggestions?
How can we help?