View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
David Biddulph[_2_] David Biddulph[_2_] is offline
external usenet poster
 
Posts: 8,651
Default Excel Running Total

=IF(SIGN(A2)=SIGN(B1),A2+B1,A2)
--
David Biddulph

"Scotty" wrote in message
...
I have a worksheet showing daily stock market advances and declines.

One column shows how much the market advanced/declined from the
day before. For example, if the market went up 5 points on Monday,
10 points on Tuesday and 20 points on Wednesday I would like my running
total column to show a running advance of 35 points. If the market goes
down 10 points on Thursday and 10 points on Friday I would like the
running
total column to show a consecutive decline of 20 points.

I want all advancing days to show the amount of the total advance until a
negative day appears and then keep a consecutive count of negative days
until
a new positive day appears. If would also be ok to keep running totals in
two
columns --- a positive total column and a negative total column. However,
once the direction changes I want a new running total to begin.

Your help is appreciated.