count data set in a single cell

Viewed 25

I need a different type of calculation. I need to count every 6 digits in personelId column. I tried Len and Countif formulas. I have tried =LEN(E2)-LEN(SUBSTITUTE(E2;"-";""))+1 and =LEN([@PersonelID])/6 etc.But they didn't work. Every six digit is a personelID that I pull data from SQL database. I need to count those personelIDs. Thank you upfront

enter image description here

2 Answers

You can try something like this :
=COUNTA(TEXT.SPLIT([cell];"-"))

You can try-

=LEN(E2)-LEN(SUBSTITUTE(E2,"-",""))-1
Related