Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/arrays/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Arrays 如何在谷歌工作表中拆分和查找最后一个索引?_Arrays_Regex_Google Sheets_Google Sheets Formula_Array Formulas - Fatal编程技术网

Arrays 如何在谷歌工作表中拆分和查找最后一个索引?

Arrays 如何在谷歌工作表中拆分和查找最后一个索引?,arrays,regex,google-sheets,google-sheets-formula,array-formulas,Arrays,Regex,Google Sheets,Google Sheets Formula,Array Formulas,我需要在谷歌表单中实现以下功能: tag_name A_B_C C A_B_C_D D 我使用以下形式: =INDEX(SPLIT(B2, "__"), 0, 3) 我想动态传递split返回的值集的最后一个索引。您可以尝试REGEXEXTRACT公式,我假设您的数据范围从“A1”开始。将此公式填入“A1”,并根据您的要求填写 =REGEXEXTRACT(A1,"\S$") 对于阵列公式,请尝试: =ARRAYFORMULA(IFNA(REGEXEXTRACT(

我需要在谷歌表单中实现以下功能:

tag_name    
A_B_C       C
A_B_C_D     D
我使用以下形式:

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

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

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

=REGEXEXTRACT(A1,"\S$")

对于阵列公式,请尝试:

=ARRAYFORMULA(IFNA(REGEXEXTRACT(A1:A; "_(.)$")))
可能会有帮助。Excel中是否存在split()?如果没有,请不要标记Excel。