Henry
Henry

Reputation: 25

How to count specific symbol in google sheets

I have a list of word that is separated by comma. So I just want to count each comma and return the total amount in one cell. I used:

=ArrayFormula(len(REGEXREPLACE(B2:B11, "[^,]", "")))

While it will count comma of each cell but it display the total per cell instead of total of all cells. So how do I have the total commas count to display in one cell only? thanks.

enter image description here

Upvotes: 0

Views: 73

Answers (1)

Nabnub
Nabnub

Reputation: 1055

That's pretty straightforward:

=sum(ArrayFormula(len(REGEXREPLACE(B2:B11, "[^,]", ""))))

enter image description here

Upvotes: 2

Related Questions