将四个连续的单元格匹配到另外四个连续的单元格

Match four consecutive cells to another four consecutive cells

我在 Google 工作表中有两个 sheet:工作表 1 和工作表 2。每个 sheet:

中并排有四列 (A:D)
Column A: File Number,
Column B: Land,
Column C: Ocean,
Column D: Air,

如果 Sheet1 中的四列与 Sheet2 中的四列匹配 (A:D='Sheet2!A:D) 那么我希望值 "CANCELLED" 出现在 Sheet1 的 E 列中。

例如,如果工作表 1 中的 A1:D1 匹配工作表 2 中的 A1:D1,那么我希望文本 "CANCELLED" 出现在工作表 1 中的 E1 中。

不清楚您是在寻找逐行匹配,还是 A1:D1 中的值可以匹配第二个 sheet 的任意行中的 A:D。

'scenario 1 - row-to-row
'if(a1&b1&c1&d1=sheet2!a1&sheet2!b1&sheet2!c1&sheet2!d1, "CANCELLED", text(,))

'scenario 2 - a1:d1 match anywhere in sheet2!a:d
=if(countifs(sheet2!a:a, a1, sheet2!b:b, b1, sheet2!c:c, c1, sheet2!d:d, d1), "CANCELLED", text(,))

'scenario 3 - a1:d1 match anywhere in sheet2!a:d including blanks-to-blanks
=if(countifs(sheet2!a:a, if(len(a1), a1, "<>"), sheet2!b:b, if(len(b1), b1, "<>"), sheet2!c:c, if(len(c1), c1, "<>"), sheet2!d:d, if(len(d1), d1, "<>")), "CANCELLED", text(,))