Forum Discussion
Lovro1
Oct 20, 2021Copper Contributor
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.
- Oct 20, 2021
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.
HansVogelaar
Oct 20, 2021MVP
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.
Lovro1
Oct 20, 2021Copper Contributor
Thank you, worked like a charm. 🙂