Which formula to use

AndrePrevin

New Member
Joined
Jan 13, 2019
Messages
8
Hi all

I have 3 columns of data. In the first and second columns I have a series of values and in the third column I need to use a formula which looks at the second column to see if there's any non-zero positive number there.
If there is then it must use that number and it must thereafter look at the first row and add that value to the number it took from the second row.
it must keep adding the value from the first row to the first non-zero positive number from the second row and incrementing upwards by the value in the first row.
Where it gets tricky, if it encounters a second non-zero positive number in the second row, it must then discard whatever value it has accumulated in the cell above it, and then reset the output value in column 3 to the new non-zero positive number it has encountered in the second row.
And thereafter use this new number and add it to the in-line value from the first column and keep incrementing upwards until it encounters another non-zero positive number in column 2

Sorry for the overly elaborate description
I have attached a sample below which actually explains/illustrates my problem a lot more simply

Metal producedSounding barCorrected values
022
002
103
104
206
244
307
3010
466
5011
1012

<colgroup><col><col><col></colgroup><tbody>
</tbody>


Please kindly assist me

Thank you gratefully
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Replace corrected values "C2" with this =IF(B2>0,B2,A2+C1) and fill down.

This checks column 2 for values > 0, if found only returns the value of column 2, otherwise adds column 1 to the previous column 3 value row above. Provides the same column 3 results as your example when filled down in column 3.
 
Upvote 0

Forum statistics

Threads
1,215,742
Messages
6,126,602
Members
449,321
Latest member
syzer

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top