1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Excel Help (CountIF)

Discussion in 'HTML, Graphics & Programming' started by triggerthat, 26 Apr 2010.

  1. triggerthat

    Soldato

    Joined: 26 Aug 2005

    Posts: 6,870

    Location: London

    Hi guys,

    I need a condition that counts all figures that is in the range of 1-10. I've got the following but it doesn't work:

    =COUNT(D7: D9,">0",",=10")

    Any ideas?
     
  2. wozencl

    Hitman

    Joined: 27 Jul 2009

    Posts: 590

    Location: UK

    =COUNT(D7:D9,">0",",=10")
     
  3. triggerthat

    Soldato

    Joined: 26 Aug 2005

    Posts: 6,870

    Location: London

    Using a range of 1,0,2 it returns 3. Why does it count 0?
     
  4. wozencl

    Hitman

    Joined: 27 Jul 2009

    Posts: 590

    Location: UK

    COUNT counts all numeric values.

    You need to use a combination of it and COUNTIF, something like the below should do it.

    Count all numeric values - those greater than 10 - those less than or equal to 1.

    Code:
    =SUM(COUNT(A1:A7) -COUNTIF(A1:A7,">10") -COUNTIF(A1:A7, "<=0"))
    
     
  5. fretted

    Hitman

    Joined: 4 Jan 2010

    Posts: 600

    or this?

    =countif(a1:a7,">0")-countif(a1:a7,">10")