Reputation: 69
What formula can I use to get a count of emoji and characters in a single cell?
For example, In cells, A1,A2 and A3:
๐๐๐
๐คโ๏ธ๐๐ค๐ค
??๐๐๐
Total Count of characters in each cell(Desired Output):
3
5
5
Upvotes: 5
Views: 3185
Reputation: 18717
=COUNTA(FILTER(
SPLIT(REGEXREPLACE(A1,"(.)","#$1"),"#"),
SPLIT(REGEXREPLACE(A1,"(.)","#$1"),"#")<>""
))
Based on the answer by @I'-'I
Some emojis contain from multiple emojis joined by char(8205)
:
๐จโ๐ฉโ๐งโ๐ฆโ๐ฆโ๐
The result differs and depends on a browser you use.
I wonder, how do we count them?
Upvotes: 1
Reputation: 50644
For the given emojis, This will work well:
=LEN(REGEXREPLACE(A13,".","."))
This contains a literal man emoji๐จ, a woman emoji๐ฉ,a girl emoji๐ง and a boy emoji๐ฆ-all joined by a ZeroWidthJoiner. You could even swap the boy for a another girl with this formula:
=SUBSTITUTE("โ๐จโ๐ฉโ๐งโ๐ฆ","๐ฆ","๐ง")
It'll become like this:
Upvotes: 3