ich habe ein kleines Probelm. Ich möchte folgende Formel anwenden:
Function Telefon(Nr$, Code$)
Nr = Application.Substitute(Nr, " ", "")
Nr = Application.Substitute(Nr, "-", "")
Nr = Application.Substitute(Nr, "/", "")
If Left(Nr, 2) = "(0" Then
Nr = Application.Substitute(Nr, "(", "")
End If
Nr = Application.Substitute(Nr, "(0", "")
Nr = Application.Substitute(Nr, "(", "")
Nr = Application.Substitute(Nr, ")", "")
Nr = Application.Substitute(Nr, "+" & Code & "0", "+" & Code)
Nr = Application.Substitute(Nr, "00" & Code, "+" & Code)
Nr = Application.Substitute(Nr, Code & "0", Code)
If Left(Nr, 1) = "0" Then
Nr = "+" & Code & Right(Nr, Len(Nr) - 1)
End If
Telefon = Nr
End Function
Leider habe ich jedoch keine Ahnung, wie ich das in VBA eingeben muss, damit ich in Excel die Formel "Telefon" anwenden kann. Kann mir vielleicht jemand eine kleine Anleitung geben?
Vielen vielen Dank...