Pages

Search This Blog

Saturday, February 13, 2016

COUNTIF Function

Instead of manually counting how often a certain value or number appears, let Excel do the work for you. With the COUNTIF function, Excel can count the number of times a word or number appears in any range of cells.
For example, let's say I want to count the number of times the word "Gryffindor" appears in my data set.
The formula: =COUNTIF(range, criteria)
The formula with variables from our example below: =COUNTIF(D:D,"Gryffindor")
In this formula, there are several variables:
  • Range: The range that we want the formula to cover. In this case, since we're only focusing on one column, we use "D:D" to indicate that the first and last column are both D. If I were looking at columns C and D, I would use "C:D."
  • Criteria: Whatever number or piece of text you want Excel to count. Only use quotation marks if you want the result to be text instead of a number. In our example, the criteria is "Gryffindor."
Simply typing in the COUNTIF formula in any cell and pressing "Enter" will show me how many times the word "Gryffindor" appears in the dataset.


















Ref: http://blog.hubspot.com/marketing/how-to-use-excel-tips
Mirror: http://wikiexcel.weebly.com/blog/countif-function

No comments:

Post a Comment