M
Marcel
Dear all,
I have three columns with data:
Col A Col B Col C
1 17 0
1 17 0
2 0 17
1 16 0
1 16 0
2 0 16
2 0 50
2 0 65
2 0 77
2 0 62
Col A always contains either 1 or 2. The amount of one's and two's in
Col A can vary, as well as their order. In case of 1 in Col A the
corresponding cell in Col B is nonzero and that in Col C is zero. In
case of 2 in Col A, it is the other way around.
Col D (results) should look as follows:
Col D
0
0
51
0
0
48
50
65
77
62
Cell D3 is obtained by summing C3+B2+B1 and D6 by summing C6+B5+B4.
Apart from cells D3 and D6, all other D-cells are equal to their
corresponding C-cell.
Can this be realized with formulas ? (A VBA user function is ok too,
as long as no user intervention such as running a macro is required).
Any help is appreciated !
Thanks and greetz,
Marcel
I have three columns with data:
Col A Col B Col C
1 17 0
1 17 0
2 0 17
1 16 0
1 16 0
2 0 16
2 0 50
2 0 65
2 0 77
2 0 62
Col A always contains either 1 or 2. The amount of one's and two's in
Col A can vary, as well as their order. In case of 1 in Col A the
corresponding cell in Col B is nonzero and that in Col C is zero. In
case of 2 in Col A, it is the other way around.
Col D (results) should look as follows:
Col D
0
0
51
0
0
48
50
65
77
62
Cell D3 is obtained by summing C3+B2+B1 and D6 by summing C6+B5+B4.
Apart from cells D3 and D6, all other D-cells are equal to their
corresponding C-cell.
Can this be realized with formulas ? (A VBA user function is ok too,
as long as no user intervention such as running a macro is required).
Any help is appreciated !
Thanks and greetz,
Marcel