IF statement help

K

KevinM

I am trying to return the following with an IF statement but I can not
get it to work. I don't know if the IF statement is the correct
formual to use so any help would be appricated.

I am trying to say the statring month is the default value (ie $400).
If a month has a negative amout greater than the sum of the previous
months it only returns a value of the negative of the sum (ie $400+
$400= $800, -$2400 for Mar, so really it is -$800). If it is greater
than the first month it only counts the default value and not the
higher value (ie $600 is really $400). If it doesn't meet any of
those critera than it is just the value for that month.


Jan Feb Mar Jan Feb Mar Total
$400 $400 -$2400 $400 $400 -$800 $0
$400 $400 -$200 $400 $400 -$200 $600
$400 $400 $600 $400 $400 $400 $1200
 
L

Luke M

I believe the new January value will always equal the old January value, so
that should be a simple
=A2
For the other months starting in Feb:
=IF(AND(B2<0,ABS(B2)>SUM($A$2:A2)),-SUM($A$2:A2),IF(B2>$A$2,$A$2,B2))
And then copy across.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top