Are all the numbers separated by "-"
If so try this
=LEN(A1)-LEN(SUBSTITUTE(A1,"-",""))+1
Option Explicit
Function UniqueCount(r As String) As Long
Dim v, s As String, i As Long
s = "~"
For Each v In Split(r, "-")
If v <> 0 Then If InStr(s, "~" & v & "~") = 0 Then s = s & v & "~": i = i + 1
Next
UniqueCount = i
End Function
Use Ctrl+Shift+Enter and not only Enter to enter the formula
=SUM(--(FREQUENCY(--MID(SUBSTITUTE(A1,"-",REPT(" ",LEN(A1))),1+(ROW(INDIRECT("1:"&(LEN(A1)-LEN(SUBSTITUTE(A1,"-",""))+1)))-1)*LEN(A1),LEN(A1)),
--MID(SUBSTITUTE(A1,"-",REPT(" ",LEN(A1))),1+(ROW(INDIRECT("1:"&(LEN(A1)-LEN(SUBSTITUTE(A1,"-",""))+1)))-1)*LEN(A1),LEN(A1)))>0))
This should ignore the "0"
=SUMPRODUCT(--(FREQUENCY(--TRIM(MID(SUBSTITUTE("-"&SUBSTITUTE(A1,"-0",""),"-",REPT(" ",187)),187*(ROW(INDIRECT("1:"&1+LEN(SUBSTITUTE(A1,"-0",""))-LEN(SUBSTITUTE(SUBSTITUTE(A1,"-0",""),"-","")))))+1,187)),--TRIM(MID(SUBSTITUTE("-"&SUBSTITUTE(A1,"-0",""),"-",REPT(" ",187)),187*(ROW(INDIRECT("1:"&1+LEN(SUBSTITUTE(A1,"-0",""))-LEN(SUBSTITUTE(SUBSTITUTE(A1,"-0",""),"-","")))))+1,187)))>0))
Great. In most scenarios working fine, but I notice that do not recognize "0" when is entered as a first digital.
Another problem for me is when I apply this formula in B1 to read A1 is working OK, but when I trying to apply to my scenario (BX827 as a cell with value ) I can not get the result in CD827.
Use only Enter to enter the formula
=SUMPRODUCT(--(FREQUENCY(--MID(SUBSTITUTE(A1,"-",REPT(" ",LEN(A1))),1+(ROW(INDIRECT("1:"&(LEN(A1)-LEN(SUBSTITUTE(A1,"-",""))+1)))-1)*LEN(A1),LEN(A1)),
--MID(SUBSTITUTE(A1,"-",REPT(" ",LEN(A1))),1+(ROW(INDIRECT("1:"&(LEN(A1)-LEN(SUBSTITUTE(A1,"-",""))+1)))-1)*LEN(A1),LEN(A1)))>0))