Forum Discussion
Removing sentences with too much words
Hello everyone, I need help with my Excel file. I have 10.000 sentences and have to remove ones that have over 25 words. Is that somehow possible? Thank you for your responses.
Let's say A1 contains the word Sentence, and A2:A10001 contain the sentences.
In B1, enter Word Count.
In B2, enter the formula =(LEN(A2)-LEN(SUBSTITUTE(A2," ",""))>25
Fill down to B10001.
Use AutoFilter to show only the rows that have TRUE in column B.
Delete all rows from row 2 down.
Finally, turn off the filter.
2 Replies
Let's say A1 contains the word Sentence, and A2:A10001 contain the sentences.
In B1, enter Word Count.
In B2, enter the formula =(LEN(A2)-LEN(SUBSTITUTE(A2," ",""))>25
Fill down to B10001.
Use AutoFilter to show only the rows that have TRUE in column B.
Delete all rows from row 2 down.
Finally, turn off the filter.
- Lovro1Copper ContributorThank you, worked like a charm. 🙂