Http://community.csdn.net/Expert/topic/4487/4487709.xml? Temp =. 1996118.
There are two scopes in execl: fmw1, fmw2,
For example:
Fmw1 fmw2
| A B C
_____________________________________
1 | A1 10 A1
2 | B2 10 C3
3 | C3 10
4 | A1 10
5 | A1 10
6 | B2 10
7 | A1 10
Q: If the value in fmw1 exists in fmw2, the B column of the corresponding row will be summed up (the most moderate result should be 60)
What method is used ??
Do not use the following method:
If the value in fmw2 is not a range but a definite value (A1), it is very simple. For example, the following function can solve this problem.
Sumif (fmw1 = "A1", B1: B7)
Therefore, the method sumif (fmw1 = "A1", B1: B7) + sumif (fmw1 = "C3", B1: B7) can be used)
This method can solve the problem, but the condition range is very large. For example, if the condition range fmw2 contains 100 values, it must
Adding 100 formulas is unrealistic. Therefore, you cannot use this method!
answer:
{= sum (sumif (A1: A7, C1: C2, B1: B7)}
that is, sum (sumif (A1: a7, C1: C2, B1: B7) and press CTRL + ALT + enter