Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Adding a negative number instead of substracting it

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?
--
Cotton Girl
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Adding a negative number instead of substracting it

=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.



Cotton Girl wrote:

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?
--
Cotton Girl


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Adding a negative number instead of substracting it

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?
--
Cotton Girl


"Dave Peterson" wrote:

=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.



Cotton Girl wrote:

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?
--
Cotton Girl


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Adding a negative number instead of substracting it

Yes.
--
David Biddulph

Cotton Girl wrote:
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?

=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.



Cotton Girl wrote:

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? --
Cotton Girl


--

Dave Peterson



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Adding a negative number instead of substracting it

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

Cotton Girl wrote:

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?
--
Cotton Girl

"Dave Peterson" wrote:

=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.



Cotton Girl wrote:

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?
--
Cotton Girl


--

Dave Peterson


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Substracting from oldest date Janelle S[_2_] Excel Discussion (Misc queries) 1 May 18th 08 11:39 AM
Substracting Dates. exsam21 Excel Discussion (Misc queries) 3 January 20th 06 07:15 PM
Substracting from a column venus21pam New Users to Excel 5 January 11th 06 07:18 PM
substracting numbers in non contigous cells Guillermo Padrón Excel Discussion (Misc queries) 5 April 10th 05 01:29 PM
2003= negative number&2004= negative number How Do I Calculate gro Jason Excel Worksheet Functions 1 January 14th 05 05:24 PM


All times are GMT +1. The time now is 09:26 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"