Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Sumif

Posted on 2014-03-15
4
Medium Priority
?
286 Views
Last Modified: 2014-03-16
Got this from Ken on EE to sum all numbers less than a value specified in a cell (P1118)

=SUMIF(P5:P1115,"<"&$P$1118)

but now need to modify to only sum positive numbers (greater than zero).

Thanks in advance,

swjtx99
0
Comment
Question by:swjtx99
  • 2
  • 2
4 Comments
 
LVL 19

Expert Comment

by:Ken Butters
ID: 39932054
Is this what you are looking for?

=SUMIF(P5:P1115,">0")
0
 

Author Comment

by:swjtx99
ID: 39932128
Sorry, I wasn't specific enough. I need to sum numbers in P5:P1115 greater than zero (no negative numbers) but less than the value in Cell P1118.
0
 
LVL 19

Accepted Solution

by:
Ken Butters earned 2000 total points
ID: 39932147
=SUMIFS(P5:P1115, P5:P1115, "<"&$P$1118, P5:P1115,">0")

Open in new window

Note the extra "S"... =SUMIFS rather than =SUMIF

you have range to sum....  P5:P1115

Followed by pairs of parameters range / criteria :

<criteria range> <criteria>    P5:P1115, "<"&$P$1118
<criteria range> <criteria>    P5:P1115,">0"

The first set says where the value in P5:P1115 is less than the value in P1118
The second says where the value in P5:P1115 is greater than zero.
0
 

Author Closing Comment

by:swjtx99
ID: 39932572
Thanks again Ken,

Seeing it written out, it looks simple but I'd never heard of SUMIFS. Well you learn something new every day!

swjtx99
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
Viewers will learn a basic data manipulation technique of unpivoting data in Power Query for Excel 2013 and the importance of using good data. Start with data in a poor structure: Create a table on your data: Unpivot columns: Rename columns: …
Viewers will learn how to share Excel data with others from desktop Excel, as well as Excel Online via OneDrive, and embed an Excel file on a website.

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question