我有一个潜在的简单问题,我无法在 excel 中解决。如果满足两个条件,我想使用公式对单元格求和。如果单元格小于 100 并且 S1 为 100,那么我想将 300 添加到总和中。但是,如果单元格大于或等于 100,我只想对单元格求和,而不管单元格 S1 中有什么。
A1 A2 A3 X X S1 S2
1 1 1 100 100
If the sum of A2:C2 are less than 100 AND S2 equals 100 THEN add 300
If the sum of A2:C2 are greater than 100 AND S2 equals 100 THEN just show what the original sum
I have tried the following:
=IF(SUM(D2:H2)+SUM(P2:S2)=0,0,IF(SUM(D2:H2)+SUM(P2:S2)<100,IF(R2=100,SUM(D2:H2)+SUM(P2:S2)+SUM(300)),SUM(D2:H2)+SUM(P2:S2)))