If I have in cell text “80/40/180” I need to insert into the other cell text, that is between “/s” (“40”). How do i do that? What formula i need to use?
"80/40/180" > 40
"120/880/20" > 880
Thank you.
If I have in cell text “80/40/180” I need to insert into the other cell text, that is between “/s” (“40”). How do i do that? What formula i need to use?
"80/40/180" > 40
"120/880/20" > 880
Thank you.
Hallo
one of:
=REGEX(A1; "^.*?/(\d+)/.*$" ; "$1" )
=REGEX(A1;"(?<=/)\d+";;1)
=REGEX(A1;"\d+(?=/)";;2)
=REGEX(A1;"^\d+?/|/\d+";"";"g")
=REGEX(A1;"\d+";;2)
or using an Excel-compatible trick:
=TRIM(MID(SUBSTITUTE(A1; "/";REPT(" ";100));101;100))
There’s a good tutorial:
Specifics concerning the ICU “Regex flavor” used by LibreOffice you find here:
A “positive” alternative: =REGEX(A1;"(?<=/)\d+(?=/)";;1)