Samuel Rossille
Samuel Rossille

Reputation: 19858

Is there a function to count occurences of a value in a range with Excel 2007?

I have a column in a sheet of my workbook which contains "OK" or "NOK".

Which formula can I use to compute the number of cells which contains "OK" in the range ?

Thanks in advance

Upvotes: 2

Views: 503

Answers (2)

markblandford
markblandford

Reputation: 3193

Take a look at the CountIf() Worksheet Function. It sounds as if this will do exactly what you need.

Upvotes: 1

assylias
assylias

Reputation: 328608

Assuming your range is A1:A5:

=COUNTIF(A1:A5,"OK")

Or for the whole column:

=COUNTIF(A:A,"OK")

Upvotes: 4

Related Questions