0

I want to cut out substrings from this url XYZ.com/de/haus/dach/ and put the values each in its own columns in Google Spreadsheet.

With this url example:

  • Column A should be "de"
  • Column B should be "haus"
  • Column C should be "dach"

How can I do that?

johny
  • 159
  • 1
  • 13

1 Answers1

1
  1. Remove the characters before the first /. This can be done in a number of ways, including REGEXREPLACE or through a combination of RIGHT, LEN and FIND.
  2. SPLIT the resulting string.
=SPLIT(RIGHT(A1,(LEN(A1)-(FIND("/",A1)))),"/")

enter image description here

Iamblichus
  • 18,540
  • 2
  • 11
  • 27
  • @lamblichus Extended question: How can I do the same when there are "-" into the names? Example: https://www.XY.com/de/haus/dach-ziegel-stein// Then it shoul be - Column A >haus - Column B > dach - Column C > Ziegel - Column D > Stein – johny Jul 15 '22 at 09:36
  • @johny Consider posting a new question for this. – Iamblichus Jul 15 '22 at 09:53
  • Ok I did: https://stackoverflow.com/questions/72994448/cut-out-substrings-of-an-url-in-google-spreadsheets-with-different-characters – johny Jul 15 '22 at 13:04