countif?

  • Thread starter Thread starter Pete JM
  • Start date Start date
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
 
try this. You cannot use A:A here.
=SUMPRODUCT((A2:A10={6,7,8})*1)
 
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
 
Hi
try
=SUMPRODUCT(--(K1:K1000={6,7,8}))

or use 3 COUNTIFS and add them
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top