sumif function

T

triniqueen

Is there a way I could sum a cell, make it a positive number and add 50, only
if the cell has a negative number in it?
 
J

JE McGimpsey

For one cell:

=IF(A1<0,ABS(A1)+50,A1)

for a column, one way:

=SUMIF(A1:A100,">0")-SUMPRODUCT(--(A1:A100<0),A1:A100-50)

another alternative:

=SUMPRODUCT(ABS(A1:A100))+COUNTIF(A1:A100,"<0")*50
 
T

triniqueen

Thanks for your help. I'm trying to calculate amount of loan I need to take.
I would only need to take out the loan if the number is less than 0 but I
must also take out enough to where there is always a positive balance of $50.
I don't know if I explained that clearly enough.
 
T

triniqueen

Thanks alot, I went in an modified it a little and it worked great!!!!!! I
put =SUM(IF(A1<0,-1*(A1)+50,0)) . I got exactly what I was after!!!!!!
 
T

triniqueen

Thanks JE, I did try using ABS before but I didn't quite use it like you
showed. You guys have been great!!!
 

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