[Solved] Extract string after specific character in cell

Discuss the spreadsheet application
Post Reply
itsolidude12
Posts: 2
Joined: Sat Sep 25, 2021 8:10 pm

[Solved] Extract string after specific character in cell

Post by itsolidude12 »

Hello there,
I have a file where I need to extract all the text before a delimiter which in this case is "/" into a cell and then also all the text after the "/" into a different cell.

I've managed to get the first command working but can't get the second task for the other cell working.

For the first one I've used:

Code: Select all

=LEFT(TRIM(Products.D2);FIND("/";TRIM(Products.D2))-1)
The problem with the second one is, that when I use the

Code: Select all

RIGHT
keyword, I can't get it to ONLY take things AFTER the "/"

I'm pulling the data from a different file, which would be cell

Code: Select all

Products.D2
and I would like to extract it to the cell C20.

Example Data:
Temperature Displaying Smart Ring / Silver – 9
Thank you for any help in advance!
Last edited by MrProgrammer on Sat Oct 02, 2021 3:42 pm, edited 1 time in total.
Reason: Tagged ✓ [Solved]
OpenOffice 3.1.0 Windows 10
User avatar
Zizi64
Volunteer
Posts: 11353
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Extract a String after a specific character from a cell

Post by Zizi64 »

Please upload sample file/s/ here.

Try to use the length of the string in the formula. The parameter for the RIGHT() part of the string can be calculated based on the position of the delimiter character and the length of the string.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
itsolidude12
Posts: 2
Joined: Sat Sep 25, 2021 8:10 pm

Re: Extract a String after a specific character from a cell

Post by itsolidude12 »

Hey there,
Give me a moment to prepare those files.
The problem is that not every string is the same length. I'd need it so that the length of the string wouldn't matter.
OpenOffice 3.1.0 Windows 10
User avatar
RusselB
Moderator
Posts: 6646
Joined: Fri Jan 03, 2014 7:31 am
Location: Sarnia, ON

Re: Extract a String after a specific character from a cell

Post by RusselB »

After reading the original post, my first suggestion would be to consider using Data -> Text to Columns
OpenOffice 4.1.7, LibreOffice 7.0.1.2 on Windows 7 Pro, Ultimate & Windows 10 Home (2004)
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
User avatar
Zizi64
Volunteer
Posts: 11353
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Extract a String after a specific character from a cell

Post by Zizi64 »

The problem is that not every string is the same length.
You can to get the actual length by the function LEN().
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Post Reply