countif?

P

Pete JM

hi, i'm stuck with a formula.

I need to count the number of cells in the whole of column K tha
contain the numbers 6,7 and 8.

I can't seem to find a way to do this,

Any help would be greatfully recieved

Regards

Pet
 
S

Stefan Hägglund [MSFT]

Hi Pete!

You can use this formula to count all cells with the value 6:
=COUNTIF(K:K;6)

If you need to count all the cells with the value 6, 7 and 8, then you can
use this array formula:
=SUM(COUNTIF(K:K;6)+COUNTIF(K:K;7)+COUNTIF(K:K;8))
When writing array formulas, you have to hold down Ctrl+Shift when pressing
enter.
Then when you look at the formula bar, it looks like:
{=SUM(COUNTIF(K:K;6)+COUNTIF(K:K;7)+COUNTIF(K:K;8))}

Best regards

Stefan Hägglund
Microsoft
 
Top