How to Reverse Text String in LibreOffice or OpenOffice

After spending a bit of time trying to figure out how to reverse the text in a LibreOffice cell, I found some information from mikekaganski which solved the problem for me.  I find it easier to learn such things with written information rather than a combination of written and video, so I’m reproducing the steps here.

Once LibreOffice is launched:

  1. Tools -> Macros -> Edit Macros
  2. Under “Module 1” copy and paste the code below
  3. Save and close this window
  4. Use the function “=(StrRev(A1))” to reverse the text of A1
Option VBASupport 1
Function StrRev(str As String) As String
StrRev = StrReverse(Trim(str))
End Function

That’s it!

Photo courtesy of Tim Samoff