Data looks like this:
Aaa, Bbb, Ccc, Ddd, Eee, Fff
Aaa, Bbb, Ccc, Ddd, Eee
Aaa, Bbb, Ccc, Ddd
Aaa, Bbb, Ccc
Aaa, Bbb
Aaa
Data in rows is split by the ',' delimiter. I want to get the number of parts that each row is split to. Here is the figure:
So, in the 1st row the data is split to 6 parts by ',' delimiter. In the 2nd - 5 parts and so on.
What formula should I use is the column B?
I'd use this formula:
=LEN(A1)-LEN(SUBSTITUTE(A1,",",""))+1
In case you need 0, when the cell is empty (the above formula returns 1), use this:
=IF(A1="",0,LEN(A1)-LEN(SUBSTITUTE(A1,",",""))+1)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With