Der Code:
Public Function rot13(Wert)
'#####################################
'Codiert / Decodiert Zelltext nach Rot13
'Autor: Jürgen Hennekes
'#####################################
Dim lngZ As Long
Dim strString As String
Dim intI As Integer
Dim SPL As Variant
Dim strRot13 As String
Dim bln As Boolean
strString = _
"A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z," _
& "a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z"
SPL = Split(strString, ",")
For lngZ = 1 To Len(Wert)
If Mid(Wert, lngZ, 1) = " " Then
strRot13 = strRot13 & " "
End If
bln = False
For intI = 0 To UBound(SPL)
If SPL(intI) = Mid(Wert, lngZ, 1) Then
strRot13 = strRot13 & LTrim(RTrim(SPL(intI + 13)))
bln = True
Exit For
End If
Next
If bln = False Then
strRot13 = strRot13 & LTrim(RTrim(Mid(Wert, lngZ, 1)))
End If
Next
rot13 = strRot13
End Function