Thread: Tricky Formula
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Fingerjob Fingerjob is offline
external usenet poster
 
Posts: 26
Default Tricky Formula

Hi,

This is maybe not a good formula but it works.
Write it in b4, and drag it down.

=IF(A4<0;0;A4+IF(A3<0;IF(A2<0;A3+A2;A3)))

This will only cover 2 "bad" days in row.
You can make it cover more negative days if you want.

Best regards
Petter Bøhler

andrewc skrev:


Thanks Bob!

I can't adapt your formula for my purpose so I'm either being thick or
didn't explain myself properly:

Column A
-0.22%
-0.80%
2.00%
3.63%
-1.00%
3.00%
5.00%

In cells b2 and b3 I would want a formula to return 0 (I want all
negative numbers in column a to be regarded as 0) while cell b4 would
contain the value 0.98% (ie the sum of a4 and any preceding negative
numbers since the last positive number). And so the series in column b
would continue.

Again, any help would be much appreciated!


--
andrewc
------------------------------------------------------------------------
andrewc's Profile: http://www.excelforum.com/member.php...o&userid=19613
View this thread: http://www.excelforum.com/showthread...hreadid=561034