You are on page 1of 5

ECH 20: CountIFs

Book: Microsoft Excel 2016 Data Analysis and Business Modeling


Count Functions

 Count(): counts the number of cells in a range containing


numbers.
 Counta(): counts number of nonblank cells
 Countblank(): counts the number of blank cells

Dr. K. Chen, 2015 2


CountIF()

 Syntax: CountIF(range, criteria)

 Examples:
 CountIF(A10:A40, “John”)
 CountIF(A10:A40, “<>John”)
 CountIF(A10:A40, “John*”)
 CountIF(A10:A40, “~*”)  Find an asterisk in A10:A40 – A tilde before asterisk
 CountIF(B1:B10, “>20”)
 CountIF(B1:B10, “>” & C10)  Concatenation to create criteria
Dr. K. Chen, 2015 3
CountIFS()

 Syntax: CountIFS(Criteria_Range1, Criteria1,


Criteria_Range2, Criteria2, …, Criteria_Rangen, Criterian)
 Examples
 CountIFs(a2:a30, “Wilson”, b2:b30, “> 20000”)
 CountIFs(b2:b30, “> 30000”, c2:c30, “< 3/1/2015”)

Dr. K. Chen, 2015 4


Exercise

 File: Fastest growing occupations.xlsx


 Task: Answer the 10 questions listed.

Dr. K. Chen, 2015 5

You might also like