简体   繁体   English

如果两个条件匹配,Excel 公式返回值

[英]Excel formula to return value if two conditions are matched

I need a formula that can be pasted into cells B2:D5 in the sheet displayed in the image below.我需要一个可以粘贴到下图中显示的工作表中的单元格B2:D5的公式。 The formula should see if the value for the row in column A matches a color in row G and if the value for the column in row 1 matches a animal in row H .该公式应查看A列中的行的值是否与G行中的颜色匹配,以及第1行中的列的值是否与H行中的动物匹配。 For all cells without a two part match it should return a blank "" .对于没有两部分匹配的所有单元格,它应该返回一个空白"" If there is a two way match then it returns the numerical value in column I如果有两种方式匹配,则返回I列中的数值

在此处输入图像描述

Put this formula in B2, then copy across and down:将此公式放入 B2 中,然后上下复制:

=IF(SUMIFS($I$2:$I$7,$G$2:$G$7,$A2,$H$2:$H$7,B$1)=0,"",SUMIFS($I$2:$I$7,$G$2:$G$7,$A2,$H$2:$H$7,B$1))

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM