根据条件分割和IF函数的数组参数大小不同

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

spliting based on a condition and Array arguments to IF are of different size

问题

I'm working on a sheet that can be extracted from a system and all the data is in one cell, so I need to split them. It is basic for all cells except for results. As you can see, test results should follow the same pattern of result status. So I regularly split one column (test status), and I tried to split test results based on an if condition.

It worked perfectly; however, for some status test results were not splitting because (Array arguments to IF are of different size.)

How do I fix this, please help.

Thank you.

英文:

I'm working on a sheet that can be extracted from a system and all the data is in one cell so i need to split them and it is basic for all cells except for resutls. as you can see test results should follow the same pattren of result status. so i regularlly splited one column (test status) and i tried to split test results based on if condition

it worked perfectly, however, for some status test results were not spliting because (Array arguments to IF are of different size.)

how do i fix this, please help

Thank you

答案1

得分: 1

因为IF()函数仅检查C2:G2范围中的第一个单元格。将它们连接成一个字符串,然后使用搜索函数来检测单词Final。尝试使用以下公式:

=IF(ISNUMBER(SEARCH("Final",JOIN(",",C2:G2))),SPLIT(H2,","),"")
英文:

Because IF() function is checking only first cell of C2:G2 range. Concat them into a single string them use search function to detect word Final. Try-

=IF(ISNUMBER(SEARCH("Final",JOIN(",",C2:G2))),SPLIT(H2,","),"")

答案2

得分: 0

=BYCOL(C2:G2, LAMBDA(Σ, (IF(Σ ≠ "Final", , INDEX(SPLIT(H2, ","), , COUNTIF(C2:Σ, Σ)))))

英文:

You may try this:

=BYCOL(C2:G2,LAMBDA(Σ,(IF(Σ<>"Final",,INDEX(SPLIT(H2,","),, COUNTIF(C2:Σ,Σ))))))

根据条件分割和IF函数的数组参数大小不同

huangapple
  • 本文由 发表于 2023年2月10日 14:08:20
  • 转载请务必保留本文链接:https://go.coder-hub.com/75407498.html
匿名

发表评论

匿名网友

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

确定