Ask LibreOffice - RSS feedhttps://ask.libreoffice.org/en/questions/Questions and answers for LibreOfficeenSun, 09 Dec 2018 11:21:52 +0100Formula (or function) to reverse a string?https://ask.libreoffice.org/en/question/60144/formula-or-function-to-reverse-a-string/ 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?](https://ask.libreoffice.org/en/question/37315/in-calc-is-there-a-way-to-reverse-the-order-of-text-in-a-cell)Wed, 28 Oct 2015 16:02:26 +0100https://ask.libreoffice.org/en/question/60144/formula-or-function-to-reverse-a-string/Answer by karolus for <p>If cell A1 has MH03AZ3530, for example, is there a formula or function that will give me 0353ZA30HM in cell A2?</p>
<p>Please note this isn't a duplicate of <a href="https://ask.libreoffice.org/en/question/37315/in-calc-is-there-a-way-to-reverse-the-order-of-text-in-a-cell">In Calc, is there a way to reverse the order of text in a cell?</a></p>
https://ask.libreoffice.org/en/question/60144/formula-or-function-to-reverse-a-string/?answer=60156#post-id-60156 Hallo
Install the AddIn out of this [german thread](http://de.openoffice.info/viewtopic.php?f=25&t=60394) and use as Arrayfunction:(`ctrl+shift+enter` or `[x]array`Option 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]Wed, 28 Oct 2015 17:35:41 +0100https://ask.libreoffice.org/en/question/60144/formula-or-function-to-reverse-a-string/?answer=60156#post-id-60156Answer by pierre-yves samyn for <p>If cell A1 has MH03AZ3530, for example, is there a formula or function that will give me 0353ZA30HM in cell A2?</p>
<p>Please note this isn't a duplicate of <a href="https://ask.libreoffice.org/en/question/37315/in-calc-is-there-a-way-to-reverse-the-order-of-text-in-a-cell">In Calc, is there a way to reverse the order of text in a cell?</a></p>
https://ask.libreoffice.org/en/question/60144/formula-or-function-to-reverse-a-string/?answer=175509#post-id-175509Hi
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](/upfiles/15442506439039873.ods)
RegardsSat, 08 Dec 2018 07:31:07 +0100https://ask.libreoffice.org/en/question/60144/formula-or-function-to-reverse-a-string/?answer=175509#post-id-175509Comment by Philipp for <p>Hi</p>
<p>No need for an add-in for this, you can use a matrix formula (to be validated by Ctrl+Shift+Enter):</p>
<pre><code>=CONCAT(MID($A1;LEN($A1)+1-ROW(INDIRECT("A1:A"&LEN($A1)));1))
</code></pre>
<p>See <a href="/upfiles/15442506439039873.ods">C:\fakepath\InverserTexte.ods</a></p>
<p>Regards</p>
https://ask.libreoffice.org/en/question/60144/formula-or-function-to-reverse-a-string/?comment=175626#post-id-175626Thanks. 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.Sun, 09 Dec 2018 08:59:49 +0100https://ask.libreoffice.org/en/question/60144/formula-or-function-to-reverse-a-string/?comment=175626#post-id-175626Answer by Philipp for <p>If cell A1 has MH03AZ3530, for example, is there a formula or function that will give me 0353ZA30HM in cell A2?</p>
<p>Please note this isn't a duplicate of <a href="https://ask.libreoffice.org/en/question/37315/in-calc-is-there-a-way-to-reverse-the-order-of-text-in-a-cell">In Calc, is there a way to reverse the order of text in a cell?</a></p>
https://ask.libreoffice.org/en/question/60144/formula-or-function-to-reverse-a-string/?answer=175507#post-id-175507Could you please include this feature as a standard string function in LibreOffice? Like Excel has done in =StrRev. Thanks!Sat, 08 Dec 2018 06:45:25 +0100https://ask.libreoffice.org/en/question/60144/formula-or-function-to-reverse-a-string/?answer=175507#post-id-175507Comment by Mike Kaganski for <p>Could you please include this feature as a standard string function in LibreOffice? Like Excel has done in =StrRev. Thanks!</p>
https://ask.libreoffice.org/en/question/60144/formula-or-function-to-reverse-a-string/?comment=175508#post-id-175508Could 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](https://help.libreoffice.org/latest/en-US/text/sbasic/shared/03120412.html).)Sat, 08 Dec 2018 07:09:00 +0100https://ask.libreoffice.org/en/question/60144/formula-or-function-to-reverse-a-string/?comment=175508#post-id-175508Comment by Philipp for <p>Could you please include this feature as a standard string function in LibreOffice? Like Excel has done in =StrRev. Thanks!</p>
https://ask.libreoffice.org/en/question/60144/formula-or-function-to-reverse-a-string/?comment=175624#post-id-175624I cannot find any documentation, but the functions described here:
https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/strreverse-functionSun, 09 Dec 2018 08:52:37 +0100https://ask.libreoffice.org/en/question/60144/formula-or-function-to-reverse-a-string/?comment=175624#post-id-175624Comment by Mike Kaganski for <p>Could you please include this feature as a standard string function in LibreOffice? Like Excel has done in =StrRev. Thanks!</p>
https://ask.libreoffice.org/en/question/60144/formula-or-function-to-reverse-a-string/?comment=175637#post-id-175637As 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.Sun, 09 Dec 2018 11:21:52 +0100https://ask.libreoffice.org/en/question/60144/formula-or-function-to-reverse-a-string/?comment=175637#post-id-175637