I tried this function
=SUMPRODUCT(SUMIFS(E20:E24;E20:E24;"<"&F20:F24;C20:C24;"X";G20:G24;"OVER"))
It does not solve the problem because I need to check only the same level cell. For example, if conditions are true for E22 cell, function should sum E22 cell number only if E22 is less than F22 (I mean it shouldn't check all of F20:F24 range cells).
Now if E22 is TRUE for other conditions function check in this way:
E22<F20 -> TRUE, SUM = E22;
E22<F21 -> TRUE, SUM = E22 + E22;
E22<F22 -> TRUE, SUM = E22 + E22 + E22;
E22<F23 -> TRUE, SUM = E22 + E22 + E22 + E22;
E22<F24 -> TRUE, SUM = E22 + E22 + E22 + E22 + E22;
Instead of:
E22<F22 -> TRUE, SUM = E22;
ADDED:
Maybe I asked misleading, but I want to find out a way to check two ranges, but only the same level cell.
One more example: We have two ranges A1:A4, B1:B2. It should work like this:
1. if A1 < B1 -> TRUE, THAN SUM = A1;
2. if A2 < B2 -> FALSE, THAN SUM = A1 (THE SAME);
3. if A3 < B3 -> TRUE, THAN SUM = A1 + A3;
4. if A4 < B4 -> TRUE, THAN SUM = A1 + A3 + A4;
Finally it should return sum of values which supply condition. Is it possible to get it from one cell action?
Aucun commentaire:
Enregistrer un commentaire