Good Morning,
I was wondering whether it would have been possible peeking simple words in a cell to rearrange them in plain text.
For this reason, i have attached a "french cuisine" simple spreadsheet.
Your comments would be really appreciated.
Regards
[Solved] String manipulation trial using functions
- Nicholas59
- Banned
- Posts: 26
- Joined: Sat Oct 12, 2024 1:15 pm
[Solved] String manipulation trial using functions
- Attachments
-
- transposition texte.ods
- (10.54 KiB) Downloaded 18 times
Last edited by MrProgrammer on Tue Nov 12, 2024 4:47 pm, edited 2 times in total.
Reason: Lock topic from banned user
Reason: Lock topic from banned user
Libre Office 7.3.7 on Ubuntu 22.04
Re: String manipulation trial using functions
Libreoffice:
Code: Select all
=REGEX(C3;"^(\w+)\b.*?\b(\w+)$";"$2 de $1")
Libreoffice 7.4 on Debian 12 (Bookworm) (on RaspberryPI4)
Libreoffice 24.8… flatpak on Debian 12 (Bookworm) (on RaspberryPI4)
- Nicholas59
- Banned
- Posts: 26
- Joined: Sat Oct 12, 2024 1:15 pm
Re: String manipulation trial using functions
I beg your pardon, karolus, but it seems there are troubles with brackets. (Error #NAME).
Could however be the fact that my version is 7.3.7...
Thanks
Could however be the fact that my version is 7.3.7...
Thanks
Libre Office 7.3.7 on Ubuntu 22.04
Re: String manipulation trial using functions
#NAME error has nothing to do with brackets.
REGEX function was introduced in LO 6.2
Of course this is a specific solution for a specific case as per your sample. Doubtless your real life situation will be more varied; in which case you'll need to provide more detail on exactly what you are trying to achieve.
See column I in the attached file where Karolus' formula functions as expected.525 #NAME?
Invalid names
An identifier could not be evaluated, for example, no valid reference, no valid function name, no column/row label, no macro, incorrect decimal separator, add-in not found.
REGEX function was introduced in LO 6.2
Of course this is a specific solution for a specific case as per your sample. Doubtless your real life situation will be more varied; in which case you'll need to provide more detail on exactly what you are trying to achieve.
- Attachments
-
- transposition2.ods
- (12.49 KiB) Downloaded 13 times
Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.8.3.2; SlackBuild for 24.8.3 by Eric Hameleers
---------------------
Apache OpenOffice 4.1.15
LibreOffice 24.8.3.2; SlackBuild for 24.8.3 by Eric Hameleers
---------------------
Roses are Red, Violets are Blue
Unexpected '{' on line 32
.Re: String manipulation trial using functions
I would guess you have trouble wth copy & paste, so far I can see the localized Function-name for »REGEX« is in french also »REGEX« !!Nicholas59 wrote: ↑Sun Oct 27, 2024 11:04 am I beg your pardon, karolus, but it seems there are troubles with brackets. (Error #NAME).
btw. it seems the topic is inspired by https://ask.libreoffice.org/t/tableau-d ... ion/112848
Libreoffice 7.4 on Debian 12 (Bookworm) (on RaspberryPI4)
Libreoffice 24.8… flatpak on Debian 12 (Bookworm) (on RaspberryPI4)
- Nicholas59
- Banned
- Posts: 26
- Joined: Sat Oct 12, 2024 1:15 pm
Re: String manipulation trial using functions
Thank you karolus and robleyd. You help was precious. REGEX in italian would be ESPR.REG().
Libre Office 7.3.7 on Ubuntu 22.04
Re: [Solved]String manipulation trial using functions
Possibly even a bit simpler and easier to understand:
for the first example.
Code: Select all
=REGEX(C3;"(.*), (.*)";"$2 de $1";1)
On Windows 10: LibreOffice 24.8.3 and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
---
Lupp from München
- Nicholas59
- Banned
- Posts: 26
- Joined: Sat Oct 12, 2024 1:15 pm
Re: [Solved]String manipulation trial using functions
Bedanke mich, Lupp. Das war sehr nett.
Libre Office 7.3.7 on Ubuntu 22.04