HomeVBA Functions LIST (Category Wise)How to use the VBA STRREVERSE Function (Syntax + Example)

What is VBA STRREVERSE Function

The VBA STRREVERSE function is listed under the text category of VBA functions. When you use it in a VBA code, it returns a string by reversing the original string supplied. In simple words, if you supply the string “Hello” it will return “olleh” in the result.

how to use it

To use VBA's STRREVERSE function you need to understand its syntax and arguments:




  • Expression: The string which you want to reverse.

Example to use STRREVERSE Function in VBA

To practically understand how to use VBA STRREVERSE function, you need to go through the below example where we have written a vba code by using it:

Sub example_STRREVERSE()
Range("B1").Value = StrReverse(Range("A1"))    
End Sub

In the above code, we have used the STRREVERSE to reverse the text from the cell A1 and return the result in the cell A1.

Related Functions

About the Author

puneet one point one

Puneet is using Excel since his college days. He helped thousands of people to understand the power of the spreadsheets and learn Microsoft Excel. You can find him online, tweeting about Excel, on a running track, or sometimes hiking up a mountain.