Forum Discussion

Lovro1's avatar
Lovro1
Copper Contributor
Oct 20, 2021
Solved

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.

 

 

  • Lovro1 

    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

  • Lovro1 

    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's avatar
      Lovro1
      Copper Contributor
      Thank you, worked like a charm. 🙂

Resources