1. ## 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.

2. ## 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
•