COUNTIF when < value in reference cell

daknight

New Member
Joined
Jan 5, 2005
Messages
34
I have a formula that works great for counting values that equal my reference cells (D9 or D11)
=COUNTIF(D13:D112,D9)+COUNTIF(D13:D112,D11)

What I need is to COUNTIF a value in my range (D13:D112) are less than the value in D9 or greater than the value in D11.

Can anyone help me please? I have tried modifying the formula like this but it does not work:
=COUNTIF(D13:D112,"<D9")+COUNTIF(D13:D112,">D11")
I am an Excel 101 - thanks for any help!

Darla
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Which version of Excel? If 2007+, use the COUNTIFS function, it takes multiple criteria
 
Upvote 0
Do you really mean OR ?

That would be

=COUNTIF(D13:D112,"<" & D9)+COUNTIF(D13:D112,">" & D11)


Or do you mean AND, as in BETWEEN D9 and D11?

If that's the case, use sumproduct

=SUMPRODUCT(--(D13:D112 < <?XML:NAMESPACE PREFIX = D9),--(D13 /><D9),--(D13:D112>D9),--(D13:D112 > D11))
</D9),--(D13:D112>
 
Last edited:
Upvote 0
THANK YOU!!!

This works perfectly!!
=COUNTIF(D13:D112,"<"&D9)+COUNTIF(D13:D112,">"&D11)

(I did want OR - either below the minimum or over the maximum allowable)
Thank you very much!!
Darla
 
Upvote 0

Forum statistics

Threads
1,224,548
Messages
6,179,448
Members
452,915
Latest member
hannnahheileen

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top