Adding a negative number instead of substracting it

C

Cotton Girl

On my budget page, there are negative numbers when an expenditure is more
than the budgeted amount. I need these negative numbers to be added to the
total sum instead of substracting it from the total sum. How do I do this?
 
D

Dave Peterson

=sumif(a1:a10,">"&0) - sumif(a1:a10,"<"&0)

You could also this:
=sum(abs(a1:a10))

This is an array formula. Hit ctrl-shift-enter instead of enter. If you do it
correctly, excel will wrap curly brackets {} around your formula. (don't type
them yourself.)

Adjust the range to match--but you can only use the whole column in xl2007.
 
C

Cotton Girl

This creates a circular reference. I have three columns and several rows.
For example row 28, column B is my budgeted amount, column C is the actual,
and column D is the sum, which is a negative number. This negative number
needs to add to my grand total on column D row 1. I created your formula in
row 28 column D and it created a circular reference. Do I need to create the
formula in a different cell?
 
D

Dave Peterson

And to add to David's response--don't put the formula in any cell that is used
in the formula.

Cotton said:
This creates a circular reference. I have three columns and several rows.
For example row 28, column B is my budgeted amount, column C is the actual,
and column D is the sum, which is a negative number. This negative number
needs to add to my grand total on column D row 1. I created your formula in
row 28 column D and it created a circular reference. Do I need to create the
formula in a different cell?
 

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