Counting words in cells

B

BeechBoy

Is there a way of counting the number of words in a cell, basically an Excel version of the NUMWORD field in Word
If not, if there a clever trick I can use to end up with the same result?
 
C

Chip Pearson

Try the following formula:

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


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


BeechBoy said:
Is there a way of counting the number of words in a cell, basically an
Excel version of the NUMWORD field in Word?
 
B

BeechBoy

Brilliant! Both work equally well (although Frank's returns 1 for empty cells - not a problem for me though)
Thanks very much for your quick replies
Cheers
 
Top