修剪Google工作表中的文本

时间:2019-08-08 02:37:46

标签: google-sheets google-sheets-formula

https://videows1.douyucdn.cn/live/high_12350844720190721092508-upload-f6cd/0704ae76898440f99c6e738c687d413a_0000000.ts?k=db7c96ce8829f45a9b473a453c73dd8a&t=15d4b829f&nlimit=5&u=275209677&ct=web&vid=10201331&pt=2&cdn=ws&d=6c1ede202b60f1196d299eb100091501

我想像这样在Google表格中的3行中修剪此URL

A1:

https://videows1.douyucdn.cn/live/high_12350844720190721092508-upload-f6cd/0704ae76898440f99c6e738c687d413a

A2:

_0000000.ts

A3:

?k=db7c96ce8829f45a9b473a453c73dd8a&t=15d4b829f&nlimit=5&u=275209677&ct=web&vid=10201331&pt=2&cdn=ws&d=6c1ede202b60f1196d299eb100091501

1 个答案:

答案 0 :(得分:0)

单元格 A1:

=LEFT(INDEX(SPLIT(A6, "?"),,1),LEN(INDEX(SPLIT(A6, "?"),,1))-11)

单元格 A2:

=RIGHT(INDEX(SPLIT(A6, "?"),,1), 11)

单元格 A3:

="?"&INDEX(SPLIT(A6, "?"),,2)

全部合为一体

={LEFT(INDEX(SPLIT(A6, "?"),,1),LEN(INDEX(SPLIT(A6, "?"),,1))-11);
  RIGHT(INDEX(SPLIT(A6, "?"),,1), 11);
  "?"&INDEX(SPLIT(A6, "?"),,2)}

0