Help

Upcoming database upgrades. Airtable functionality will be reduced for ~15 minutes at 06:00 UTC on Feb. 4 / 10:00 pm PT on Feb. 3. Learn more here

How can I count the number of occurrences of a character in a paragraph?

Topic Labels: Formulas
347 1
cancel
Showing results for 
Search instead for 
Did you mean: 

How can I count the number of occurrences of a character in a paragraph?
Example: I want to check the number of occurrences of commas in a paragraph:
“182-DISPLU6-Profile 3-disneytest04@gmail.com, 161-DISPLU6-Profile 1-disneytest01@gmail.com, 162-DISPLU6-Profile 2-disneytest02@gmail.com
I want the return result is 2

1 Reply 1

If your text really is plain text, this formula should work

LEN({fieldname}) - LEN( SUBSTITUTE({fieldname}, ",", "") )

On the other hand, if your text is a lookup field, or a rollup field, this might not work, and there may also be better ways of getting the count.