View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
tom tom is offline
external usenet poster
 
Posts: 570
Default Interval accumulation and resets

WinXP Pro SP2
Excel 2003 SP3

I am trying to create an Excel formula that totals the interval values as
they decrease or as they increase. Upon a change of direction (SIGN(),
probably) I want to reset/restart the accumulation.
Here's my current attempt but it's probably not too close.
=IF(SIGN($D33)=SIGN($D32),$D33-$D32,0)
Column D is the change of the value of an average (mean) measurement for
column C.
Here's a sample
Row Col C Col D
1 361193
2 360566 -627
3 350680 -9886
4 327803 -22877
5 317173 -10630
As Col D continues to decrease then I need to accumulate the 'negative'
values. Once Col D gets a positive value, which indicates a change of
direction, then I need to start accumulating the values so that I start with
the first value. I don't want to have a SUM() of the accumulation for all
the Col D values. I just want the sum of the values as long as the sign of
Col D is the same.
So, as long as Col C decreases, I need to accumulate during the entire
'series'. Once Col D changes to increasing, I need to accumulate during the
entire 'series' and then reset/restart when Col D changes to
negative/decreases.
TIA!
Tom