To analyse this data they wanted to count how many words were in each cell containing keyword searches. Excel provides many text functions for managing and manipulating the text in the cells of your spreadsheet. The following formula did the job.

**=LEN(TRIM(A2))-LEN(SUBSTITUTE(TRIM(A2),” “,””))+1**

This formula subtracts a version of the cell without spaces between each word from a version still with spaces. This finds out how many spaces there are. There will be one less space than there are words so the resulting answer has a 1 added to it to find how many words there are.

The Len function is used to find how many text characters are in the cell.

The Substitute function is used to replace the spaces between each word with nothing making one long word.

The Trim function is used to remove any spaces at the beginning or end of the cell content. This cleanses the cells of any erroneous spaces put in by user error, or error on import.

Count the Number of Words in a Cell – Microsoft Excel Tips and Tricks

You can count, sum, average and find the maximum or minimum number in a range simply by selecting the numbers you want to calculate.

- Right click on the Status Bar at the bottom of the screen
- Select the type of calculations you want to perform.

In Excel 2007 and above you can display all five formula results if you wanted to. In Excel 2003 only one can be visible at any given time, but you just need to come to the Status Bar to switch formula when needed

- Select the cells that contain the numbers you want to calculate
- The formula results are displayed on the Status Bar

Use the MID and FIND functions to extract parts of text

]]>