Skip to main content
Solved

How do I count phrases in a list?

  • May 19, 2022
  • 1 reply
  • 19 views

I am trying to count the number of key phrases in a list (text field). I found help on Split Text to Columns on how to count words, but am wondering if I can adapt the formula in such a way that counts phrases instead? Here are some screenshots! In the first image I would like record 1 to have a word count of 2 rather than 4. The second image shows the current word count formula.


Best answer by augmented

Hi Jo. The SUBSTITUTE should be changed to sub out the comma instead of white space.

IF(Words, LEN(Words) - LEN(SUBSTITUTE(Words, ',', ''))+1, 0)

I think that will do what you want.

1 reply

Forum|alt.badge.img+18
  • Inspiring
  • Answer
  • May 19, 2022

Hi Jo. The SUBSTITUTE should be changed to sub out the comma instead of white space.

IF(Words, LEN(Words) - LEN(SUBSTITUTE(Words, ',', ''))+1, 0)

I think that will do what you want.