Excel公式不让我按Enter并显示错误?

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

Excel Fomrula doesn't let me press enter and displays an error?

问题

这个公式为什么会导致错误,阻止我按回车键?这个公式的各个组成部分似乎都正常工作,但当它们组合在一起时,就无法正常运行。

这是字符串:

.cict oem liab on file exp 11/10/19

这个公式的这部分是分开的:

VSTACK(TRIM(SEQUENCE(10,,0)),{" ";"/";"-"})

完整的公式:

=COUNTIF(VSTACK(TRIM(SEQUENCE(10,,0)),{" ";"/";"-"}), TRIM(MID(A2,SEQUENCE(LEN(A2)),1)))=1

错误:

Excel公式不让我按Enter并显示错误?

我的表格

英文:

Why does this formula cause an error and prevent me from pressing enter? The individual components of the formula seem to work fine, but when combined, they do not function properly.

Here is the string:

.cict oem liab on file exp 11/10/19

This part of the formula is separate:

VSTACK(TRIM(SEQUENCE(10,,0)),{" ";"/";"-"})

Complete formula:

=COUNTIF(VSTACK(TRIM(SEQUENCE(10,,0)),{" ";"/";"-"}), TRIM(MID(A2,SEQUENCE(LEN(A2)),1)))=1

Error:

Excel公式不让我按Enter并显示错误?

My Sheet

答案1

得分: 2

COUNTIF不允许将动态数组公式用作范围输入。它需要一个范围。

要获取所需的TRUE/FALSE列表,我们使用MATCH():

=ISNUMBER(MATCH(TRIM(MID(A2,SEQUENCE(LEN(A2)),1)),VSTACK(SEQUENCE(10,,0),{" ";"\/";"-"}),0))

如果你只想要日期,那么使用FILTER:

=FILTER(TEXTSPLIT(A2," "),ISNUMBER(--(TEXTSPLIT(A2," "))))
英文:

COUNTIF will not allow the use of Dynamic Array formulas as range inputs. It expects a range.

To get the desired TRUE/FALSE list we use MATCH():

=ISNUMBER(MATCH(TRIM(MID(A2,SEQUENCE(LEN(A2)),1)),VSTACK(SEQUENCE(10,,0),{" ";"/";"-"}),0))

Excel公式不让我按Enter并显示错误?

If all you want is the date then use FILTER:

=FILTER(TEXTSPLIT(A2," "),ISNUMBER(--(TEXTSPLIT(A2," "))))

Excel公式不让我按Enter并显示错误?

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

发表评论

匿名网友

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

确定