& with COUNTIF

B

Bernie Deitrick

When you use a string like

"<D10"

Excel does not evaluate the value of D10 and incorporate it into the count criteria.

"<" & D10

will be evaluated to incorporate the value of D10...

HTH,
Bernie
MS Excel MVP
 
T

Toppers

=COUNTIF(B2:B6,"<D2")

will test for a text value which is less than the value of the text "D2" in
B2:B6

=COUNTIF(B2:B6,"<" & D2)

will test for value which is less than in that in cell D2.

D2 can contain data of various formats not just text.

So if D2=10 (numeric) , it will test for numbers < 10: the equivalent
formula is:

=COUNTIF(B2:B6,"<10")

HTH
 

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