If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Sum of positive values only using 'IF'

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-13-04, 20:00
yippdr yippdr is offline
Registered User
 
Join Date: Jan 2004
Posts: 2
Sum of positive values only using 'IF'

I have a column of numbers that can have negative and positive values but I need a formula that adds only the positive values from the column. Right now I have tried =SUM(IF('range'>0,'range' but the numbers are not adding up properly.
ANy thoughts out there?

Thanks,
Dave
Reply With Quote
  #2 (permalink)  
Old 01-13-04, 20:36
Bustamante Bustamante is offline
Registered User
 
Join Date: Jan 2004
Location: Mexico
Posts: 3
Re: Sum of positive values only using 'IF'

I wouldn't use 'IF', I would use 'SUMIF()' instead, this way you can set any criteria you want.

Eg:

=SUMIF(A1:A10,">0",A1:A10) don't forget quoting your criteria.

This simple formula will add only the positive values from your range.

I hope this can help.

Bustamante

Quote:
Originally posted by yippdr
I have a column of numbers that can have negative and positive values but I need a formula that adds only the positive values from the column. Right now I have tried =SUM(IF('range'>0,'range' but the numbers are not adding up properly.
ANy thoughts out there?

Thanks,
Dave
Reply With Quote
  #3 (permalink)  
Old 01-14-04, 13:03
yippdr yippdr is offline
Registered User
 
Join Date: Jan 2004
Posts: 2
Re: Sum of positive values only using 'IF'

You rule! Thanks so much!
Dave
Quote:
Originally posted by Bustamante
I wouldn't use 'IF', I would use 'SUMIF()' instead, this way you can set any criteria you want.

Eg:

=SUMIF(A1:A10,">0",A1:A10) don't forget quoting your criteria.

This simple formula will add only the positive values from your range.

I hope this can help.

Bustamante
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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