Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 27
Default Running total within IF

Hi, I'm looking for a formula which will add together all of the values from
a range if they are negative... (only if they are negative)
So far, I've used the countif function to count how many positive and
negative results are recorded. - okay for the project at the moment, as
values 1 or -1 or 0 will be entered into system, so counting negative values
is the same thing, however if -3 points is entered into the range, this
obviously doesn't work...

I'm normally okay with excel formulas, just need a little push in the right
direction,

thank you for any help you can provide.


--
Dan Walters
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 171
Default Running total within IF

=SUMIF(range,"<0")

"DanielWalters6" wrote:

Hi, I'm looking for a formula which will add together all of the values from
a range if they are negative... (only if they are negative)
So far, I've used the countif function to count how many positive and
negative results are recorded. - okay for the project at the moment, as
values 1 or -1 or 0 will be entered into system, so counting negative values
is the same thing, however if -3 points is entered into the range, this
obviously doesn't work...

I'm normally okay with excel formulas, just need a little push in the right
direction,

thank you for any help you can provide.


--
Dan Walters

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Running total within IF

Use SUMIF instead of COUNTIF - it has 3 parameters, like this:

=SUMIF(condition_range,"<0",sum_range)

although in your case sum_range might be the same as condition_range, so it
could be omitted and would therefore look very similar to a COUNTIF formula.

Hope this helps.

Pete

"DanielWalters6" wrote in message
...
Hi, I'm looking for a formula which will add together all of the values
from
a range if they are negative... (only if they are negative)
So far, I've used the countif function to count how many positive and
negative results are recorded. - okay for the project at the moment, as
values 1 or -1 or 0 will be entered into system, so counting negative
values
is the same thing, however if -3 points is entered into the range, this
obviously doesn't work...

I'm normally okay with excel formulas, just need a little push in the
right
direction,

thank you for any help you can provide.


--
Dan Walters



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Running total within IF

=SUMIF(A1:A100,"<0") will return the sum of negatives as negative number

=ABS(SUMIF(A1:A100,"<0")) will return the sum of negatives as positive number


Gord Dibben MS Excel MVP

On Tue, 8 Jul 2008 16:17:01 -0700, DanielWalters6
wrote:

Hi, I'm looking for a formula which will add together all of the values from
a range if they are negative... (only if they are negative)
So far, I've used the countif function to count how many positive and
negative results are recorded. - okay for the project at the moment, as
values 1 or -1 or 0 will be entered into system, so counting negative values
is the same thing, however if -3 points is entered into the range, this
obviously doesn't work...

I'm normally okay with excel formulas, just need a little push in the right
direction,

thank you for any help you can provide.


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 27
Default Running total within IF

Thank you all for your help!
I wan'st aware of SUMIF - Was trying to build an IF statement, which if
conditions matched added it to a total variable.

Thank you again

Dan
--
Dan Walters


"DanielWalters6" wrote:

Hi, I'm looking for a formula which will add together all of the values from
a range if they are negative... (only if they are negative)
So far, I've used the countif function to count how many positive and
negative results are recorded. - okay for the project at the moment, as
values 1 or -1 or 0 will be entered into system, so counting negative values
is the same thing, however if -3 points is entered into the range, this
obviously doesn't work...

I'm normally okay with excel formulas, just need a little push in the right
direction,

thank you for any help you can provide.


--
Dan Walters

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
running total MattB Excel Discussion (Misc queries) 0 January 4th 08 08:32 PM
running total and average of that total after 3 events belvy123 Excel Discussion (Misc queries) 0 March 28th 07 02:57 AM
running total and average of that total after 3 events Toppers Excel Discussion (Misc queries) 1 March 28th 07 02:19 AM
Getting a running total? Tami Excel Worksheet Functions 0 October 10th 05 09:42 PM
Running Total doublej0 Excel Worksheet Functions 1 March 11th 05 05:28 PM


All times are GMT +1. The time now is 11:52 PM.

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

About Us

"It's about Microsoft Excel"