Function CiungPesela(ByVal rng As Range) Dim objRegExp As Object Dim colMatches As Object Set objRegExp = CreateObject("VBScript.RegExp") With objRegExp .Pattern = "\d{11}" .Global = False If .Test(rng.Value) = True Then Set colMatches = .Execute(rng.Value) CiungPesela = colMatches(0) End If End With End Function