How to remove all text from right after certain characters in excel

前端 未结 3 806
你的背包
你的背包 2021-01-24 23:58

Sorry I\'m a noob in excel and need help with this. Say I have the following text in my excel.

  1. D:/folder A/ folder B.1/text_01.txt
  2. D:/folder A/Folder C/
3条回答
  •  無奈伤痛
    2021-01-25 00:06

    If you have Excel 2016+ with the TEXTJOIN function, you can use this array formula:

    =TEXTJOIN("/",TRUE,FILTERXML("" & SUBSTITUTE(A1,"/","")& "","//s[position()

    Since this is an array formula, you need to "confirm" it by holding down ctrl + shift while hitting enter. If you do this correctly, Excel will place braces {...} around the formula as observed in the formula bar

提交回复
热议问题