This post will guide you how to reverse text string in Excel. How do I reverse text string in one cell with an Excel User Defined Function. How to reverse a text string in one cell with a formula in Excel.
Reverse Text String with User Defined Function
You can easily write down a User Defined Function to reverse a text string in one cell. Just do the following steps:
#1 open your excel workbook and then click on “Visual Basic” command under DEVELOPER Tab, or just press “ALT+F11” shortcut.
#2 then the “Visual Basic Editor” window will appear.
#3 click “Insert” ->”Module” to create a new module.
#4 paste the below VBA code into the code window. Then clicking “Save” button.
Function reverseString(str As String) As String
reverseString = StrReverse(Trim(str))
#5 Type the following formula into blank cells and then press Enter key.
Reverse Text String with Formula
You can also use an Excel Array formula based on the TEXTJOIN function, the MID function, the ROW function, the INDIRECT function and the LEN function to reverse text string in one cell. Like this:
Type this formula into a blank cell, and then press Ctrl + Shift + Enter keys.