=SUMIF(Sheet1!C:C,"YES",Sheet2!A:A,Sheet1!A:A,(Sheet1!B:B))
如果Sheet1 ColumnC包含单词“YES”,并且Sheet1 ColumnA与Sheet2 ColumnA匹配,我一直在尝试添加Sheet1 ColumnB
我们的想法是根据两个标准添加Sheet1 ColumnB。 Sheet1 ColumnA匹配Sheet2 ColumnA和Sheet1 ColumnC必须包含文本“YES”
**Sheet1**
ColumnA ColumnB ColumnC
Row1 A 4 YES
Row2 B 5
Row3 C 6 YES
Row4 A 6
Row5 D 6 YES
Row6 A 6 YES
**Sheet2**
ColumnA
Row1 A
Row2 B
Row3 C
Sheet2 ColumnB应如下所示(基于上面的示例)
**Sheet2**
ColumnA ColumnB
Row1 A 10
Row2 B 0
Row3 C 6