Hey guys,
I am working on a spreadsheet where I have multiple classes in b5:b22. I want to build a formula that will look at this range and based on a certain criteria (such as choosing Class A) it will look over at the next column (c5:c22) and sum up the number of students that fall under "Class A." I am not sure if this will make things more clear, but the classes repeat several times in b5:b22 (Class A is most prominent). I should mention that there are a certain amount of students in each class (so in each cell from c5:c22). For example, Class A has 24, 32, 12, 42. Class B has 4, 12, 9, etc. I am trying to get the sum of all of the Class A's.
So far, I have tried to use =IF(COUNTIF(B5:B22,"Class A"),C5:C22,0) but I am aware that this will not work since it does not make sense, specifically with the value if true statement.
Thank you for your help!
Bookmarks