如何比较重复的列,每个列都有一个数字范围,如果它们的数字范围相互重叠,会出现 return 错误?

How can I compare duplicate columns, each with a range of numbers, and return error if their ranges of numbers overlap to each other?

我对 googlesheets 还很陌生,对于之前的解释不当,我深表歉意。 正如标题所暗示的,我想用 googlesheet 公式弄清楚的是:

  1. 遍历整个列以查找重复项
  2. 在这些重复项中,比较它们的数字范围并检查是否有任何重叠的数字
  3. 如果任何数字重叠,return错误

Google Sheet Link : Click Here

在上面的 googlesheet 中,第 13 行会有问题,因为第 13 行的数学第 8 页与第 8 行的第 8 页重叠。

到目前为止,我的想法和尝试是将数字范围拆分为多列,以便我可以将这些列中的每一列与重复的数字范围进行比较,但我不确定之后该怎么做从这里。另一个假设是我只需要比较最新的列来检查重复的课程和重叠范围,但我也不确定在这里使用什么。

感谢任何提示 and/or 公式尝试。

尝试:

={"Warning"; INDEX(SUBSTITUTE(REGEXREPLACE(IFNA(VLOOKUP(B3:B&"", TRIM(SPLIT(FLATTEN(
 QUERY(QUERY({SEQUENCE(COLUMNS(SPLIT(TEXTJOIN(",", 1, D3:D), ","))),
 QUERY(FLATTEN(IF(IFERROR(SPLIT(D3:D, ","))="",,B3:B)), 
 "where Col1 is not null")&"×", 
 IF(COUNTIFS(QUERY(FLATTEN(IF(IFERROR(SPLIT(D3:D, ","))="",,C3:C&SPLIT(D3:D, ","))),
 "where Col1 is not null"), 
 QUERY(FLATTEN(IF(IFERROR(SPLIT(D3:D, ","))="",,C3:C&SPLIT(D3:D, ","))),
 "where Col1 is not null"), SEQUENCE(COLUMNS(SPLIT(TEXTJOIN(",", 1, D3:D), ","))), 
 "<="&SEQUENCE(COLUMNS(SPLIT(TEXTJOIN(",", 1, D3:D), ","))))>1, "Error,", 
 QUERY(FLATTEN(IF(IFERROR(SPLIT(D3:D, ","))="",,SPLIT(D3:D, ","))), 
 "where Col1 is not null")&",")}, 
 "select max(Col3) group by Col1 pivot Col2"),,9^9)), "×")), 2, 0)), ",$", ), ", ", ","))}