Sample Header Ad - 728x90

What formula will count the number of words in a cell, ignoring dashes and other standalone punctuation?

1 vote
1 answer
101 views
I need to count the words in each cell of a table. There’s no built-in wordcount function, so I’ve previously used a couple of methods that effectively count the number of spaces, adding 1 to get the correct total. But this is inadequate since my text often includes dashes as punctuation which get counted as extra words. A complication is that if two words are joined by a hyphen without whitespace, they should be counted as a single word, so I don’t just want to treat all hyphens as whitespace in a solution. What formula can accurately count the number of words in a cell?
Asked by Guybrush McKenzie (135 rep)
May 8, 2024, 05:55 AM
Last activity: Jun 2, 2025, 01:02 PM