Countif Question

F

Firecraker

Is there an easy way to combine two countif statements? I need to find
the amount of values in a certain rage. I currently am using two
countif statements

In A1
=COUNTIF(AE11:AE21,"<=10")
In A2
=COUNTIF(AE11:AE21,">=15")

I then have a formula in A3 that adds the values together and then
subtracts the values from the total number of cells to get the amount
of cells between 10 and 15.

This is working so far, but I'm wondering if there is an actual formula
for this. I know this isn't the correct syntax but I need the formula
to go something like Countif AE11:AE21 is between or equal to 10 and
15.

Any suggetions would be greatly appreciated!! Thanks in advance!!

Roy
 
R

RagDyer

One way is:

=COUNTIF(AE11:AE21,"<=15")-COUNTIF(AE11:AE21,"<10")
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


Is there an easy way to combine two countif statements? I need to find
the amount of values in a certain rage. I currently am using two
countif statements

In A1
=COUNTIF(AE11:AE21,"<=10")
In A2
=COUNTIF(AE11:AE21,">=15")

I then have a formula in A3 that adds the values together and then
subtracts the values from the total number of cells to get the amount
of cells between 10 and 15.

This is working so far, but I'm wondering if there is an actual formula
for this. I know this isn't the correct syntax but I need the formula
to go something like Countif AE11:AE21 is between or equal to 10 and
15.

Any suggetions would be greatly appreciated!! Thanks in advance!!

Roy
 
P

Peo Sjoblom

=COUNTIF(AE11:AE21,">=10")-COUNTIF(AE11:AE21,">15")

or

=COUNTIF(AE11:AE21,">10")-COUNTIF(AE11:AE21,">=15")

depending on if you want to included 10 and 15

another way

=SUMPRODUCT(--(AE11:AE21>=10),--(AE11:AE21<=15))

or

=SUMPRODUCT(--(AE11:AE21>10),--(AE11:AE21<15))
 
R

RagDyer

Laura,

Maybe you really meant:

=SUMPRODUCT((AE11:AE21<=15)-(AE11:AE21<10))
--


Regards,

RD
 
P

Peo Sjoblom

Hi RD,

I believe the OP wanted to count the values between 10 and 15 and all
suggestions will do that
one way or another (depending if 10 and 15 should be included they differ a
bit)

--

Regards,

Peo Sjoblom

RagDyer said:
Laura,

Maybe you really meant:

=SUMPRODUCT((AE11:AE21<=15)-(AE11:AE21<10))
--


Regards,

RD
 
R

RagDyer

You're right Peo.
Yesterday was a long, hard day for me.<g>

Sorry Laura !
--

Regards,

RD
--------------------------------------------------------------------
Please keep all correspondence within the Group, so all may benefit !
--------------------------------------------------------------------

Hi RD,

I believe the OP wanted to count the values between 10 and 15 and all
suggestions will do that
one way or another (depending if 10 and 15 should be included they differ a
bit)

--

Regards,

Peo Sjoblom

RagDyer said:
Laura,

Maybe you really meant:

=SUMPRODUCT((AE11:AE21<=15)-(AE11:AE21<10))
--


Regards,

RD
 
L

Laura Cook

No problem!

--
Laura Cook
Appleton, WI


RagDyer said:
You're right Peo.
Yesterday was a long, hard day for me.<g>

Sorry Laura !
--

Regards,

RD
--------------------------------------------------------------------
Please keep all correspondence within the Group, so all may benefit !
--------------------------------------------------------------------

Hi RD,

I believe the OP wanted to count the values between 10 and 15 and all
suggestions will do that
one way or another (depending if 10 and 15 should be included they differ a
bit)
 

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

Top