Showing posts with label COUNTIF. Show all posts
Showing posts with label COUNTIF. Show all posts

Saturday, August 18, 2012

How to count how many times a name appears on one sheet

If you are wondering how to count a specific value (may be a number or a name or a date or any content of a cell) from a specific range of one sheet to another sheet of a spreadsheet then here is the formula.

Suppose you have a Sheet named "Summary" and you want to count how many times "John" appears in a range A4:S34 in the Sheet named "SignIn" (which is in the same spreasheet), then you can count it with the help of function "COUNTIF". Here is the formula:


=COUNTIF(SignIn!A4:S34,"John")

Here, the above formula will return the number of times "John" appearing in Sheet named "SignIn".


Friday, August 17, 2012

Formula to check a criteria in a specific range.

Suppose you want to get "FAIL" in a cell if a certain criteria is met in another range of cells. So in the table below, J4 would return the text FAIL, and J5 would return the text PASS.



Now, paste this formula in cell J4
=if(COUNTIF(C4:I4,"X")=0,"PASS","FAIL") 

And this formula in cell J5
=if(COUNTIF(C5:I5,"X")=0,"PASS","FAIL") 

Here function "COUNTIF" will search for the criteria "X" and if this criteria returns 0, it means student has passed all areas and J5 will displays "PASS".

I hope the above example will make you understand how to use the formula "CountIf" in Google Spreadsheets.