SanFelippo
Board Regular
- Joined
- Apr 4, 2017
- Messages
- 124
I originally thought this was going to be a simple formula, but I realized that the usual SUMIF and/or SUMIFs formulas doesn't work for this situation. And no, I unfortunately can't moved columns around to make this easier.
So here is an example
So in this example, I need a formula that will sum together the Row values that are in Columns C,F,and I only if they are positive values
So the output in some other cells for Row 1 and 2 would be as follows:
Row 1 Output (put it in Cell J1): 8
Row 2 Output (put in Cell J2): 15
Does that make sense? I do have a formula that does work, but it involved coding every single situation and the corresponding sum (Combination and Permutations stuff). In my actual workbook, it looks like this:
This works but it is ugly. I figure there has got to be an easier way to do this. Any thoughts?
So here is an example
A | B | C | D | E | F | G | H | I |
1 | 4 | -5 | 6 | 7 | 8 | 3 | 4 | -4 |
-2 | 3 | 6 | 4 | 3 | 2 | 4 | 6 | 7 |
So in this example, I need a formula that will sum together the Row values that are in Columns C,F,and I only if they are positive values
So the output in some other cells for Row 1 and 2 would be as follows:
Row 1 Output (put it in Cell J1): 8
Row 2 Output (put in Cell J2): 15
Does that make sense? I do have a formula that does work, but it involved coding every single situation and the corresponding sum (Combination and Permutations stuff). In my actual workbook, it looks like this:
Rich (BB code):
=IF(AND(P4>=0,X4>=0,AB4>=0),SUM(P4,X4,AB4),IF(AND(P4>=0,X4>=0,AB4<0),SUM(P4,X4),IF(AND(P4>=0,AB4>=0,X4<0),SUM(P4,AB4),IF(AND(X4>=0,AB4>=0,P4<0),SUM(X4,AB4),IF(AND(P4<0,X4<0,AB4>=0),AB4,IF(AND(P4<0,X4>=0,AB4<0),X4,IF(AND(P4>=0,X4<0,AB4<0),P4,IF(AND(P4<0,X4<0,AB4<0), 0,""))))))))
This works but it is ugly. I figure there has got to be an easier way to do this. Any thoughts?