Results 1 to 2 of 2

Thread: COUNTIF? (2003)

  1. #1
    3 Star Lounger
    Join Date
    Aug 2001
    Location
    Seattle, Washington
    Posts
    251
    Thanks
    29
    Thanked 2 Times in 2 Posts

    COUNTIF? (2003)

    <img src=/S/boxedin.gif border=0 alt=boxedin width=25 height=20>
    I have a worksheet with a column, H, that contains values from two to nine. Those values represent the number of hours of usage. I want to write a formula that will let me use the COUNTIF function to count the number of instances for several ranges of hours. For instance, I want to know how many values I have greater than or equal to three and less than four. I have a cumbersome solution that works.
    Bob Wall

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: COUNTIF? (2003)

    You can use

    =COUNTIF(H1:H100,">=3")-COUNTIF(H1:H100,">=4")

    If you put >=3 in cell J1 and >=4 in cell J2, you can also use

    =COUNTIF(H1:H100,J1)-COUNTIF(H1:H100,J2)

    Alternatively, you can use

    =SUMPRODUCT((H1:H100>=3)*(H1:H100<4))

    Note: in this post, the symbols for "greater than or equal", a > followed by = are used several times. Some browsers mangle them.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •