Q: 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
iMac, OS X Mountain Lion
Posted on Aug 19, 2016 3:35 AM



