Conditional running total

dmc6262

New Member
Joined
Mar 2, 2018
Messages
1
Hi,

Appreciate any help here. I'm looking for a formula that searches a column and runs a count of positive numbers after the appearance of the last zero or negative number in that specific column. Essentially it's looking for a positive trend. If for example the current trend is 2 (2 positive numbers since the last 0 or negative number) it will reset to zero when a zero or negative number is next input as the data expands. I've manually completed an example below to illustrate:

ABC
302
233
0314
109
34-1
Trend at this point210
New data input:-653
Trend at this point021

<tbody>
</tbody>
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Put your trend results in columns D E and F (relating to columns A B and C respectively).

in D1 E1 F1 put 1

in D2
=IF(B2<=0,0,I1+1)
copy across and down the columns for however many rows there are in column A B and C
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,379
Messages
6,124,608
Members
449,174
Latest member
ExcelfromGermany

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