Custom Formula to Reverse a String in Excel
This is a very small but useful Custom Function which can be used to reverse a string in excel. In VBA (Excel Macro) there is an Inbuilt function to reverse a string but in Excel Formula there is no formula as such to reverse a string. Using that built-in function you can create your own custom formula to reverse a string.
Following is the code to reverse a string in VBA function which needs to pasted in your Workbook Module. To know the procedure of creating a User Defined Function in Excel read this Article How to create Custom Formulas in Excel
VBA Code for creating your Custom Formula to reverse a string in Excel Sheet
'Custom Function to reverse a string Public Function strReverse(ByVal cell As Range) As String strReverse = VBA.strReverse(cell.Value) End Function
Cell Address goes as Input in the above formula. It will read the value stored in that cell and display the reverse of that string in the cell where Formula is typed. Refer the below image.
My name is Vishwamitra Mishra. Friends Call me Vishwa. This blog is authored by me. I am an Excel Geek. Well, this blog talks a lot about my passion in Excels & Macros so I’ll not talk about it :) I am very much passionate about traveling & quite recently discovered that I am a good photographer too..:P
AND GET A FREE!
E-BOOK FOR EXCEL VBA BEGINNERS
DON'T MISS ANY NEW ARTICLE !
Get your FREE! E-Book & Have Every New Article Delivered Straight To Your Email-Box