【问题标题】:How to split and find last index in Google Sheets?如何在 Google 表格中拆分和查找最后一个索引?
【发布时间】:2020-09-10 22:23:21
【问题描述】:

我需要在 Google 表格中实现以下目标:

tag_name    
A_B_C       C
A_B_C_D     D

我正在使用以下公式:

=INDEX(SPLIT(B2, "__"), 0, 3)

我想动态传递 split 返回的值集的最后一个索引。

【问题讨论】:

  • this link 可能会有所帮助。
  • Excel 中是否存在 split()?如果不是,请不要标记 Excel。

标签: arrays regex google-sheets google-sheets-formula array-formulas


【解决方案1】:

您可以尝试 REGEXEXTRACT 公式,我假设您的数据范围从“A1”开始。将此公式放入“A1”并根据您的要求填写

=REGEXEXTRACT(A1,"\S$")

【讨论】:

    【解决方案2】:

    对于数组公式试试:

    =ARRAYFORMULA(IFNA(REGEXEXTRACT(A1:A; "_(.)$")))
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-03-21
      • 2021-04-20
      • 1970-01-01
      • 2010-10-06
      • 1970-01-01
      • 2010-11-06
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多