Want to remove everything after nth “/” from hyperlink in Notepad++ or Excel

前端 未结 2 926
情歌与酒
情歌与酒 2021-01-16 15:37

I need some help: looking for a way to remove everything after the nth occurrence (most likely 4th or 5th) of \"/\" in a hyperlink. For instance, if I have

         


        
2条回答
  •  时光说笑
    2021-01-16 16:17

    Quite simple formula, although I agree with @Scott Holtzman that you should show some effort before posting question here. In Excel enter this formula in cell B1 if your links are in cell A1.

    =IFERROR(LEFT(SUBSTITUTE(A1,"/","~~~~",5),FIND("~~~~",SUBSTITUTE(A1,"/","~~~~",5),1)-1)&"/",A1)
    

提交回复
热议问题