Ask Your Question
0

Formula (or function) to reverse a string?

asked 2015-10-28 16:02:26 +0100

chimak111 gravatar image

If cell A1 has MH03AZ3530, for example, is there a formula or function that will give me 0353ZA30HM in cell A2?

Please note this isn't a duplicate of In Calc, is there a way to reverse the order of text in a cell?

edit retag flag offensive close merge delete

3 Answers

Sort by » oldest newest most voted
1

answered 2015-10-28 17:35:41 +0100

karolus gravatar image

updated 2015-10-28 19:26:27 +0100

Hallo

Install the AddIn out of this german thread and use as Arrayfunction:(ctrl+shift+enter or [x]arrayOption in Formula-wizard)

=PYJOIN(MID($A$1;LEN($A$1)+1-ROW(OFFSET($A$1;0;0;LEN($A$1)));1);"")

[edit]Sorry-My fault-that Version needs explicitly the Empty String "" as second argument for pyjoin Formula corrected[/edit]

edit flag offensive delete link more
0

answered 2018-12-08 06:45:25 +0100

Could you please include this feature as a standard string function in LibreOffice? Like Excel has done in =StrRev. Thanks!

edit flag offensive delete link more

Comments

1

Could you please point to the "StrRev" function documentation for Excel? (There's none in Excel 2016 AFAIK; there's a VBA StrReverse, also present in LibreOffice's VBA compatibility mode.)

Mike Kaganski gravatar imageMike Kaganski ( 2018-12-08 07:09:00 +0100 )edit

I cannot find any documentation, but the functions described here: https://docs.microsoft.com/en-us/offi...

Philipp gravatar imagePhilipp ( 2018-12-09 08:52:37 +0100 )edit

As I said, it is not an Excel function, but a VBA function, which you cannot use in Excel as =StrReverse("ABC") (unless you create a special macro); and LibreOffice does have exactly the same function, which was mentioned in my comment.

Mike Kaganski gravatar imageMike Kaganski ( 2018-12-09 11:21:52 +0100 )edit
0

answered 2018-12-08 07:31:07 +0100

pierre-yves samyn gravatar image

Hi

No need for an add-in for this, you can use a matrix formula (to be validated by Ctrl+Shift+Enter):

=CONCAT(MID($A1;LEN($A1)+1-ROW(INDIRECT("A1:A"&LEN($A1)));1))

See C:\fakepath\InverserTexte.ods

Regards

edit flag offensive delete link more

Comments

Thanks. But I use the StrRev function very often, so using a matrix formula takes a lot of time. Therefore, I'd prefer one singe function like StrRev also in LibreOffice.

Philipp gravatar imagePhilipp ( 2018-12-09 08:59:49 +0100 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2015-10-28 16:02:26 +0100

Seen: 1,615 times

Last updated: Dec 08