I want to cut out substrings from this url XY.com/de/haus/dach-ziegel-stein/ and put the values each in its own columns in Google Spreadsheet.
I want to cut out by / and by -.
With this url example:
- Column A should be
de - Column B should be
haus - Column C should be
dach - Column D should be
ziegel - Column E should be
stein
>Solution :
You can use the following single formula for a range
=INDEX(IFERROR(SPLIT(
REGEXREPLACE(
REGEXREPLACE(A125:A128,"^\w+\.\w+\/"," "),
"\/|\-"," ")," ")))
(do adjust ranges and locale according to your needs)
Or simpler
=INDEX(IFERROR(SPLIT(
REGEXREPLACE(A125:A128,"\w+\.\w+\/"," "),"/|-")))
Functions used: