简体   繁体   English

如何在excel中合并多个单元格的结果,以便在任何一个输入单元格中的“是”将在单个输出单元格中评估为“是”?

[英]How to merge the results of a number of cells in excel, so that a yes in any one of the input cells will evaluate to yes in a single output cell?

I have a spreadsheet that looks something like this: 我有一个电子表格,看起来像这样:

Col1    Col2    Col3    Col4
yes     no      no      no
no      yes     no      no
no      no      no      no
no      no      no      no

How can I combine these results so that Col5 will equal "yes" if there is a "yes" in any of the cells in Col1-4 and only equal "no" if every cell in a row from col1-4 equals "no"? 如何合并这些结果,以便在Col1-4的任何单元格中有“是”的情况下,Col5都等于“是”,而从col1-4的行中的每个单元格都等于“否”时,则等于5 ?

So in this example the output should look like this: 因此,在此示例中,输出应如下所示:

Col1    Col2    Col3    Col4    Col5
yes     no      no      no      yes
no      yes     no      no      yes
no      no      no      no      no
no      no      no      no      no

(I am using a mac with Excel version 15.29) (我使用的Excel版本为15.29的Mac)

我会去:

=IF(COUNTIF(A2:D2,"yes")=0,"no","yes")

Pretty straight forward IF with OR : OR很简单的IF

=IF(OR(A1="yes";B1="yes";C1="yes";D1="yes");"yes";"no")

or 要么

=IF(OR(A1="yes",B1="yes",C1="yes",D1="yes"),"yes","no")

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如果2个单元格为空白,则第三个单元格为空白,如果2个单元格为是,则“是”,否则为“否” - If 2 cells blank then third cell blank, if 2 cells yes then “yes” otherwise “no” 如果cell.Value =“ Yes”,则MS-Excel复制特定的单元格 - MS-Excel copy specific cells if cell.Value= “Yes” Excel - 将多列单元格合并为一个单元格 - Excel - Merge Multiple Columns Cells into a single Cell Excel 需要专家 - 如何让 Excel 根据多个不同单元的输入动态更新一个单元 - Excel Expert Needed - How can I get Excel to dynamically update one cell based on the input of a number of different cells 如何在 excel 中将单元格按类别合并为一个 - How to merge cells into one by category in excel VBA-更改合并单元格的“是” /“否”时单击的单元格值 - VBA - Change cell value when clicked from/to yes/no for merged cells Excel中如何合并单元格? - How to merge cells in Excel? Excel 自定义 Function 跨一系列单元格 - 结果为单个单元格 - Excel Custom Function across a range of cells - Results in a single cell 一旦另一个单元格说是,我如何复制相邻单元格中的数据? - how do I copy data that is in adjacent cells once another cell says yes? Excel错误1004,如果是,则突出显示相邻的单元格为灰色 - Excel error 1004, Highlight adjecent cells gray when yes
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM