Skip to main content

Count the number of times a text appears in a string

  • January 27, 2021
  • 2 replies
  • 69 views

Forum|alt.badge.img+6

Hello, I have a text string of which I need to know how many times a word appears.

For this example “Enviar” appears 3 times and “Pendiente” 4.

With what function do I do this count?

Thank you very much for your support

2 replies

  • New Participant
  • January 28, 2021

FIND(stringToFind, whereToSearch,[startFromPosition])

Finds an occurrence of stringToFind in whereToSearch string starting from an optional startFromPosition.(startFromPosition is 0 by default.) If no occurrence of stringToFind is found, the result will be 0.

Similar to SEARCH(), though SEARCH() returns empty rather than 0 if no occurrence of stringToFind is found.

FIND(“fox”, “quick brown fox”)

=> 13


Forum|alt.badge.img+6
  • Author
  • Participating Frequently
  • January 29, 2021

FIND(stringToFind, whereToSearch,[startFromPosition])

Finds an occurrence of stringToFind in whereToSearch string starting from an optional startFromPosition.(startFromPosition is 0 by default.) If no occurrence of stringToFind is found, the result will be 0.

Similar to SEARCH(), though SEARCH() returns empty rather than 0 if no occurrence of stringToFind is found.

FIND(“fox”, “quick brown fox”)

=> 13


Thank you very much for your help

I already tried it but it only works when it is a single text not to count in the whole string the times that the same text appears. :frowning: