Blank cells count towards the limit if they are within the range of non blank cells. The calculation is done by multiplying the number of the last row with data by the number of the last column with data
for example:
+----+---+---+---+
| | A | B | C |
+----+---+---+---+
| 1 | x | | |
| 2 | | | |
| 3 | | | |
| 4 | | x | |
| 5 | x | | |
| 6 | | | x |
| 7 | x | | |
| 8 | | | |
| 9 | | | |
| 10 | x | | |
+----+---+---+---+
Although there are a lot of blank cells, and no more than once cell filled per row, the total cells calculation is 10 x 3 = 30
It is possible that non-visible characters are present in your spreadsheet (especially as your sheet was generated rather than manually created).
In a case such as the one below (if there is a space in the cell D4), there is no visual indicator of the final row.
+---+---+---+---+---+
| | A | B | C | D |
+---+---+---+---+---+
| 1 | x | | | |
| 2 | x | | | |
| 3 | | x | | |
| 4 | | | | |
+---+---+---+---+---+
To find out for sure what your 'end' cell is, put the focus on A1, then use Ctrl+Shift+End and the focus will move to the cell that is in the final row and the final column.
To remove any unwanted cells, select the first unwanted column, press Ctrl+Shift+Right arrow, then right-click and choose delete. Do a similar procedure to delete unwanted rows.
Best Answer
First one has to define "a word". I'll use the definition of a word as "a maximal substring of non-whitespace characters", consistent with the linked post.
One can count words in a range by using
regexreplace
twice:Here is the formula, in which A1:B4 can be replaced by any other range.
This approach can be adjusted in a straightforward way to other definitions of word. For example, if a word is defined as a substring of consecutive characters [A-Za-z], then change the character classes accordingly: inner regexreplace deals with what's acceptable in a word, the outer regexreplace deals with the rest.