检查单元格内每一行非空白文本是否以日期字符串 “(Completed mm/dd/yy)” 结尾。

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

Check if each non-blank line of text inside a cell ends with a date string. "(Completed mm/dd/yy)"

问题

这涉及到一些正则表达式工作。单元格中的每一行文本都由一个空行分隔。

这是我的表格副本

检查单元格内每一行非空白文本是否以日期字符串 “(Completed mm/dd/yy)” 结尾。

英文:

I assume this involves some REGEX work. Each separate line of text in a cell is separated by a blank line.

Here is a copy of my sheet

检查单元格内每一行非空白文本是否以日期字符串 “(Completed mm/dd/yy)” 结尾。

答案1

得分: 2

你可以尝试:

=BYROW(C4:C, LAMBDA(in, IF(in="", , LET(_in, SPLIT(in, CHAR(10)), COUNTA(IFNA(FILTER(_in, REGEXMATCH(_in, "Completed \d{1,2}/\d{1,2}/\d{2}"))))=COUNTA(_in))))))

这实质上是通过换行符CHAR(10)进行拆分,筛选包含Completed mm/d/yy的值,并检查筛选后的值的数量是否与未筛选的值的数量相同。

英文:

You could try:


=BYROW(C4:C,LAMBDA(in,IF(in="",,LET(_in,SPLIT(in,CHAR(10)),COUNTA(IFNA(FILTER(_in,REGEXMATCH(_in,"Completed \d{1,2}/\d{1,2}/\d{2}"))))=COUNTA(_in)))))

This is essentially splitting by the newline CHAR(10), filtering the values that contain Completed mm/d/yy and checking if the count of the filtered values is the same as the count of the unfiltered values.

huangapple
  • 本文由 发表于 2023年3月7日 12:55:44
  • 转载请务必保留本文链接:https://go.coder-hub.com/75658171.html
匿名

发表评论

匿名网友

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

确定