up vote 1 down vote favorite
share [g+] share [fb]

Are there any built-in Excel functions that will reverse a string?

link|improve this question

62% accept rate
feedback

2 Answers

up vote 4 down vote accepted

There is no built-in function that I know of, but you can create your own custom function.

First - create a new module:

  1. Get into VBA (Press Alt+F11)
  2. Insert a new module (Insert > Module)

Second - paste the following function in your new module (Reference):

Function Reverse(Text As String) As String
    Dim i As Integer
    Dim StrNew As String
    Dim strOld As String
    strOld = Trim(Text)
    For i = 1 To Len(strOld)
      StrNew = Mid(strOld, i, 1) & StrNew
    Next i
    Reverse = StrNew
End Function

Now you should be able to use the Reverse function in your spreadsheet

link|improve this answer
feedback

You can go to http://xcell05.free.fr/morefunc/english/index.htm to check out their morefunc package.

There is a reversetext function provided.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.