MrExcel Publishing
Your One Stop for Excel Tips & Solutions

If statements.


Posted by Ricardo Munoz on September 20, 2001 8:22 AM

I have one column that may contain no values or one of 3 values (O, B or T). I would like to be able to sum the total number of O values, B values or T values while ignoring the cells in the column that have no values. The results will appear in three separate cells, one for the O, one for the B and one for the T. How can I do this?


Posted by Dwight on September 20, 2001 8:54 AM

Use COUNTIF

In the cell you want to return the number of O's, select "Insert, Function" and choose "COUNTIF". Then specify the range (example, A:A if it's the entire A column), and enter O as the criteria. Repeat for the other two values.