Neophyte question about using Subtotal and CountIf in Excel
- by Andrew
Hi, I'm using Excel and having some problems with Countif and I don't understand how it works differently from SubTotal. I used the GUI to subtotal stuff and all the subtotals are right. Then I attempted to use the Countif to see how many requirements passed. That worked for the first subtotal only. It's easy to see why. When I look at the box for the subtotal, it says:
=SUBTOTAL(3,C286:C292)
When I look at my formula for passed requirements, I have:
=IF(ISTEXT(A285),COUNTIF(C286:C338,"=Passed"),"")
Notice that the last column is wrong. How did the Subtotal manage to keep this correct? I typed in the formula for passed requirements and dragged it down the page. Everything behaved as expected (even the bit about ISTEXT dutifully figured out which row was which), but it got the last row wrong.
Any ideas?
SRS Maintenance Count 7 44
SRS Maintenance Passed
SRS Maintenance Passed
SRS Maintenance Passed
SRS Maintenance Passed
SRS Maintenance Passed
SRS Maintenance Passed
SRS Maintenance Passed
SRS Reports Count 12 43
SRS Reports Passed
SRS Reports Passed
SRS Reports Passed
SRS Reports Passed
SRS Reports Failed
SRS Reports Passed
SRS Reports Passed
SRS Reports Failed
SRS Reports Passed
SRS Reports Passed
SRS Reports Failed