Tip Printed from ExcelTip.com
Create and Add a Function for Reversed Text Characters in Microsoft Excel


  1. Click Alt+F11 to open Visual Basic Editor (VBE).
  2. From the Insert menu, select Module (to add a module).
  3. Enter the following lines of code into the module:

Function ReverseText(text) As String 

	Dim TextLen As Integer 
	Dim i As Integer 
	TextLen = Len(text) 
	For i = TextLen To 1 Step -1 
		ReverseText = ReverseText & Mid(text, i, 1) 
	Next i 

End Function 

Testing the function:
  • To test the function, open Paste Function (Shift+F3).
  • From the User Defined category, select the ReverseText function.
  • In the function box, select any cell that contains text.
  • Click OK.