Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

General discussion

COUNTIF and needing major help!

Apr 27, 2007 4:23AM PDT

I have a Range of employees that fall into 4 tenure groups

<30 Days
31-90 Days
91-180 Days
>180 Days

I need to break down how many employees fall into each group. I have a column that has the number of days employed... I simply need a formula that will count each group amount.

Help please?

Jason Portell

Discussion is locked

- Collapse -
You're almost there
Apr 27, 2007 5:51AM PDT

Countif seems to be the function you need.

For example, if cell H16 held the forumula;

=COUNTIF(D$11:D$34,"<30")

Where D11 to D34 held how many days each employee has been employed, the "$" sign before the numbers keeps D11 and D34 fixed so the referenced cells do not change if you copy the formula elsewhere. The result is a number which is how many cells have a number less than 30.

If cell H17 held;

=COUNTIF(D$11:D$34,"<90")-H16

Then the result is how many cells hold less than 90, less how many cells hold less than 30.

And so on.

Mark

- Collapse -
I laugh at the geekdom of it ...
Apr 27, 2007 5:57AM PDT

What a cool way to dance around this. I certainly would not have ever thought to do it this way. Awesome! <Caveman voice>- "Worked like bear bone charm! </voice>

- Collapse -
I'm glad you liked it
Apr 27, 2007 7:33PM PDT
Happy

There are more elegant ways to do it, but if that works for you then that's great.

Mark