Wednesday, 10 November 2010

Counting words in an Excel cell

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

I knew there must be a way of doing this - but hadn't tracked down the exact formula until now. This one piece of information made the whole Excel course worthwhile. Now that I have the link it looks like such an easy thing to Google that I can't think why I didn't manage to track it down by myself. Suppose I was just convinced that there would be a WORDCOUNT function buried somewhere in Excel.

No comments:

Post a Comment