{=MID([COLOR=blue]$A1,MIN([COLOR=red]SEARCH([COLOR=green]{0,1,2,3,4,5,6,7,8,9},$A1&"0123456789"[/COLOR])[/COLOR]),MAX([COLOR=red]IF([COLOR=green]ISNUMBER([COLOR=purple]VALUE([COLOR=teal]MID([COLOR=#ff00ff]$A1,ROW([COLOR=navy]INDIRECT([COLOR=blue]"1:" & LEN([COLOR=red]$A1[/COLOR])[/COLOR])[/COLOR]),1[/COLOR])[/COLOR])[/COLOR]),ROW([COLOR=purple]INDIRECT([COLOR=teal]"1:" & LEN([COLOR=#ff00ff]$A1[/COLOR])[/COLOR])[/COLOR])[/COLOR])[/COLOR])-MIN([COLOR=red]SEARCH([COLOR=green]{0,1,2,3,4,5,6,7,8,9},$A1&"0123456789"[/COLOR])[/COLOR])+1[/COLOR])}