当两个语句的条件为真时,如何返回数据?

时间:2021-11-25 20:22:43

I'm trying to get a data point to return but only if two statements are true.

我想要返回一个数据点,但前提是两个命题都为真。

Statement one: If Date of cell B32 (Sheet 2) = The Date of B2 (Sheet 1) Statement two: If Cell Name C30 (Sheet 2) = Cell Name C2 (Sheet 1) Then C32 (Sheet 2) would display the data point from D2 (Sheet 1)

表述一:如果B32单元格的日期(表2)= B2的日期(表1)表述二:如果单元格名称C30(表2)=单元格名称C2(表1)那么C32(表2)将显示D2单元格的数据点(表1)

So if these two conditions are met, then the cell would return the data point I wanted.

如果满足这两个条件,单元格将返回我想要的数据点。

Also I'm not sure if I should be using B2/C2 of the whole columns of B/C in my formula. I'd like some input on that as well.

我也不确定是否应该在公式中使用B/C的所有列的B2/C2。我也想了解一下。

Photo 1: https://drive.google.com/open?id=0BwIeyMliU7Z4TmZ4N29VbGRrMnc

图1:https://drive.google.com/open?id=0BwIeyMliU7Z4TmZ4N29VbGRrMnc

Photo 2: https://drive.google.com/open?id=0BwIeyMliU7Z4eS1iRHF4a1QxcTQ

图2:https://drive.google.com/open?id=0BwIeyMliU7Z4eS1iRHF4a1QxcTQ

1 个解决方案

#1


1  

Try something like this. Sample sheet is here. You should search and study sumif, sumifs, countif, countifs, etc. Formula which ends with s can handle multiple conditions.

这样的尝试。纸样在这里。你应该搜索和研究sumif, sumifs, countif, countifs等。以s结尾的公式可以处理多种情况。

=sumifs(report!D:D, report!B:B, "="&$B32, report!C:C, "="&C$30)

Though, the structure of your sheets is not scalable.

但是,您的表的结构是不可伸缩的。

#1


1  

Try something like this. Sample sheet is here. You should search and study sumif, sumifs, countif, countifs, etc. Formula which ends with s can handle multiple conditions.

这样的尝试。纸样在这里。你应该搜索和研究sumif, sumifs, countif, countifs等。以s结尾的公式可以处理多种情况。

=sumifs(report!D:D, report!B:B, "="&$B32, report!C:C, "="&C$30)

Though, the structure of your sheets is not scalable.

但是,您的表的结构是不可伸缩的。