sum of only positive numbers

I'm the dean at a high school and I need to keep track of student demerits and detentions served. I've created a spreadsheet pictured below. As you can see every time a student receives a demerit, I put it all the info in one row (date, teacher giving the demerit, what the demerit was for, and how many demerits received for the infraction). So you can imagine at the end of the quarter, this spreadsheet is quite large (400-500 rows). I also put a negative number (-2) when the student serves the detention (a student needs to serve every 2 demerits received.


I wrote about this formula on this forum almost two years ago. I have another tab (sheet) that adds up all the demerits, so I can go to that tab (sheet) and see who needs to serve. The formula was =Sumif(Sheet1!A:A,A:A,Sheet1H:H) and it works wonderfully. This other sheet has our entire student body on it (each student only listed once...so if we have a student population of 300 students, there are only 300 rows). It adds up all the points (even the negatives), so I can see who has more than 2 demerits and who needs to serve. In the example below Steve Abrahim would have 0 demerits on the second sheet because he received 4, but also served 4.


But I now realize that I need a second tab (sheet) that has the total number of demerits a student receives in the quarter. So, I would need a formula that only adds up positive numbers. So, again, that sheet will have our entire student body listed in Column A (one student per row). So on this tab (sheet), Steve Abrahim would have 4 demerits (even though he served two detentions) and Adam Butler would also have four (even though he only served one detention). Can someone write this formula?


Please let me know if you need any clarification on my question.


Thank you,


Mark





User uploaded file

iMac, OS X Mountain Lion

Posted on Aug 19, 2016 3:35 AM

Reply
8 replies

Aug 22, 2016 11:02 AM in response to Wayne Contello

Thank you for this. But the formula needs something else. I guess I wasn't clear. It needs to reference the students' names, so that it only adds up positives for Steve Abrahim. So on the tab (sheet), each student is only listed once. So when I go to Steve Abrahim's row, I'll be able to see how many points he had for the quarter. When I look at Adam Butler's name, I'll be able to see how many points he had for the quarter. And it only adds up the positive numbers, so I'll see how many demerits/points each student had for the quarter.


Thanks,


Mark

Aug 24, 2016 6:56 AM in response to marknovom

marknovom wrote:


It's still not working. I have the Demerit Data on a different sheet...not a different table (meaning, you have to click on the tabs above to look at them).


To make it easier to set up the formulas, rather than worrying about typing a full reference, why not move the summary table to the same sheet as Demerit Data, set up the formula, and then move the summary table back to its separate sheet.


To move the table just click in it, then click the "bulls-eye" to its upper left so the entire table is selected, command-x to cut, go to the sheet with the Demerit Data table, command-v to paste, and the table will appear on that sheet. Then set up the formulas by selecting the ranges, rather than typing in formulas. Once the formulas are working you can move the table back to where you want it via the same cut-paste sequence.


SG

Aug 25, 2016 3:58 AM in response to Wayne Contello

It's still not working for some reason. Let me attach another screen shot. As you can see, the tab is called "Sheet 1". Then I have another tab called "Totals". The demerits are in column H (we call them DSH). Column I are classroom demerits (called ACT....for instance a student not doing homework).


The positive numbers are when they receive a demerit. The negative numbers are when they serve "detention" and bring their demerit number to zero.


User uploaded file


In the Totals tab (see below), I list our entire student body (so, there are actually a lot more columns than picture below)...with each student listed only once. I want the total number of positive numbers of Steve Abrahim's DSH demerits to go in Steve Abrahim's row (row 2) in the "Totals" tab in column E (TOTAL DSH). I also want the total number of positive numbers of Steve Abrahim 's ACT demerits to go in Steve Abrahim's row (row 2) in the "Totals" tabe in column F (TOTAL ACT).


User uploaded file

Thank you for your help!


Mark

Aug 25, 2016 4:53 AM in response to marknovom

Can you post a screenshot showing your actual formula? You can do that by selecting the cell with the formula and including the lower left corner when you take the screenshot.


Also, have you considered, as suggested above, setting up the formulas while both tables are on the same sheet (tab) and then moving (cutting-pasting) the summary table to another sheet after everything is working?


SG

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

sum of only positive numbers

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.