Xellos008, здравствуйте, так подойдет?
[vba]Код
Function getPhon(txt As String)
Dim objMatches As Object, objMatch As Object
Dim res$
With CreateObject("VBScript.RegExp")
.Global = True
.Pattern = "(\+7)\(\d{3}\)\d{7}"
Set objMatches = .Execute(txt)
For Each objMatch In objMatches
res = res & ", " & objMatch
Next objMatch
End With
If res <> "" Then getPhon = Mid(res, 2)
End Function
[/vba]
[vba]Код
Function removePhon(txt As String)
With CreateObject("VBScript.RegExp")
.Global = True
.Pattern = "(\+7)\(\d{3}\)\d{7}"
removePhon = .Replace(txt, "")
End With
End Function
[/vba]