在Google Sheets中如何分割没有分隔符的字符串?

huangapple go评论59阅读模式
英文:

How to split string which has no delimiter in Google Sheets?

问题

我正在尝试在Google表格中在第16个字符后拆分。我尝试使用LEFT、RIGHT和MID函数,但不起作用。
例如
从1列trlr_id:
010810HARD01AFXNHV2202865
到2列
010810HARD01AFXN 和 HV2202865

010810HARD01HJBBHMKD801679 到 010810HARD01HJBB 和 HMKD801679

英文:

I'm trying to split after the 16th character in Google Sheets. I tried using LEFT RIGHT & MID functions but not working.
For example
From 1 column trlr_id:
010810HARD01AFXNHV2202865
to 2 columns
010810HARD01AFXN & HV2202865

010810HARD01HJBBHMKD801679 to 010810HARD01HJBB & HMKD801679

答案1

得分: 1

*您可以尝试:*

    =split(regexreplace(A1,"(.{16})","$1|"),"|")

[![在此输入图像描述][1]][1]

用于`数据透视表/计算字段`的使用:

    =left(URL,16)

    =mid(URL,17,9^9)

[![在此输入图像描述][2]][2]

  [1]: https://i.stack.imgur.com/P5fre.png
  [2]: https://i.stack.imgur.com/Kv5jF.png
英文:

<!-- language-all: js -->

You may try:

=split(regexreplace(A1,&quot;(.{16})&quot;,&quot;$1|&quot;),&quot;|&quot;)

在Google Sheets中如何分割没有分隔符的字符串?

For use in pivot/calculated field(s) use:

=left(URL,16)

and

=mid(URL,17,9^9)

在Google Sheets中如何分割没有分隔符的字符串?

huangapple
  • 本文由 发表于 2023年6月29日 02:39:09
  • 转载请务必保留本文链接:https://go.coder-hub.com/76575873.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定