Count words in a cell
Q I use Excel to manipulate text and often need to count the words in a cell. I use the LEN function to return the number of characters, but I can't figure out how to count the words. I'd prefer to avoid using a macro if possible. - Peter Courtland A Perhaps the simplest solution is to write a custom VBA worksheet function. But since you prefer a nonmacro solution, I developed a rather complex array formula. The number of words in a cell is equal to the number of space characters (character code 32), plus 1. Use the following array formula to return the number of words in a cell (in this case, Cell F9): | Category: Spreadsheet Issue: Feb 1998 Pages: 166 |
These Web pages are produced by Australian PC World © 1997 IDG Communications