Public Function ReverseString(sText As String, Optional bMirror As Boolean = False) As String 'Reverses the order of words (default) or individual characters in a string 'Requires Option Base 0 Dim iCtr As Integer If Not bMirror Then 'Reverse the order of words only Dim sTmpA() As String sTmpA = Split(sText, " ") sText = "" For iCtr = UBound(sTmpA) To 0 Step -1 sText = sText & sTmpA(iCtr) & " " Next iCtr ReverseString = Trim(sText) Else 'Mirror the string (Reverse the order of individual characters) Dim sTmp As String For iCtr = Len(sText) To 1 Step -1 sTmp = sTmp & Mid(sText, iCtr, 1) Next iCtr ReverseString = sTmp End If End Function Public Function ReverseString(sText As String) As String 'Uses the built-in VBA strReverse function ReverseString = StrReverse(sText) End Sub