Reversing a string in Excel

String Reverse in Excel
Examples : Reverse a String

In my many years of rummaging through the internet for help, I have seen countless posts where troubled help seekers are told that VBA does not have a built in function to reverse a string. Amature know-alls suggest a makeshift solution using a for-loop; and everyone is happy. Contrary to popular belief, Visual Basics does have a built in function to reverse a string: StrReverse()

For the benefit of Excel-VBA beginners, I thought I would post a Wrapper function that would make this functionality available in the Excel Interface.

Function StringReverse(ByVal WhichString As String) As Variant
 StringReverse = StrReverse(WhichString)
End Function
String Reverse in Excel
Example : Reverse a String

3 Comments

  1. This is quite amazing! I never knew hat they had such function in Excel ๐Ÿ™‚ Thanks for this awesome posting.

    • Hi Erica, One thing a Day – Accomplished!

      Even I came to know about this only recently.

Comments are closed