AndrePrevin
New Member
- Joined
- Jan 13, 2019
- Messages
- 8
Hi all
I have 4 columns of data
in column A I have some random values and mostly blanks. in column B I have a calculation which looks at column A and if a value appears there it discards the values above it and takes the new value from column A.
In column C I have a formula = =IF(D2>0,B2-D2,B2)
The problem is, when column D is blank, column C just pulls the values from column b, obviously, but what I want it to do is, when it encounters a value in column D, it must calculate B2 - D2 and output the value but then on the next cell down it must increment by the same increment value which it sees in column B
Pardon my poor explanation but I hope this illustrates what I want to do a bit better:
[TABLE="width: 662"]
<colgroup><col><col><col><col></colgroup><tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]10[/TD]
[TD]10[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]11[/TD]
[TD]11[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]5[/TD]
[TD]5[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]6[/TD]
[TD]6[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]7[/TD]
[TD]7[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]8[/TD]
[TD]3[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]10[/TD]
[TD]5[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]10[/TD]
[TD]5[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]11[/TD]
[TD]6[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]8[/TD]
[TD]8[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]9[/TD]
[TD]9[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]13[/TD]
[TD]8[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]15[/TD]
[TD]10[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Don't know if this helps to understand my problem but essentially I want to create a formula in column C that can work with multiple conditions, like whether or not a value appears in column D and what sort of increment occurs in column B
Kind regards
I have 4 columns of data
in column A I have some random values and mostly blanks. in column B I have a calculation which looks at column A and if a value appears there it discards the values above it and takes the new value from column A.
In column C I have a formula = =IF(D2>0,B2-D2,B2)
The problem is, when column D is blank, column C just pulls the values from column b, obviously, but what I want it to do is, when it encounters a value in column D, it must calculate B2 - D2 and output the value but then on the next cell down it must increment by the same increment value which it sees in column B
Pardon my poor explanation but I hope this illustrates what I want to do a bit better:
[TABLE="width: 662"]
<colgroup><col><col><col><col></colgroup><tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]10[/TD]
[TD]10[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]11[/TD]
[TD]11[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]5[/TD]
[TD]5[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]6[/TD]
[TD]6[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]7[/TD]
[TD]7[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]8[/TD]
[TD]3[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]10[/TD]
[TD]5[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]10[/TD]
[TD]5[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]11[/TD]
[TD]6[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]8[/TD]
[TD]8[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]9[/TD]
[TD]9[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]13[/TD]
[TD]8[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]15[/TD]
[TD]10[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Don't know if this helps to understand my problem but essentially I want to create a formula in column C that can work with multiple conditions, like whether or not a value appears in column D and what sort of increment occurs in column B
Kind regards