使用openoffice Calc或Excel查找出现在多个列中的变量?

时间:2022-06-26 19:27:15

I need a way to check if a variable occurs in all of my columns at least once.

我需要一种方法来检查在我的所有列中是否至少出现一次变量。

Example with 3 columns, while Occu in Col1-3 checks if the variable which is listed in Col3 exists in every other column. Only for a the formula should return "true". How can I achieve this? I tried using "countif" but unfortunately this only works for a maximum of 2 columns.

例如,有3列,Col1-3中的联合查询检查Col3中列出的变量是否在其他列中存在。只有a的公式应该返回“true”。我如何做到这一点?我尝试使用“countif”,但不幸的是,这只适用于最多2列的情况。

+------+------+------+----------------+
| Col1 | Col2 | Col3 | Occu in Col1-3 |
+------+------+------+----------------+
| a    | a    | f    |          false |
| b    | c    | a    |           true |
| c    | d    | e    |          false |
+------+------+------+----------------+

Any help is upvoted, thanks

任何帮助都是向上投票的,谢谢

1 个解决方案

#1


1  

Multiply another COUNTIF statement for each column:

对每一列乘另一个可数名词:

=COUNTIF(A$1:A$3,"=" & C1) * COUNTIF(B$1:B$3,"=" & C1)

#1


1  

Multiply another COUNTIF statement for each column:

对每一列乘另一个可数名词:

=COUNTIF(A$1:A$3,"=" & C1) * COUNTIF(B$1:B$3,"=" & C1)