Referencing a cell with Countif

R

rhhince

Hi. I am trying to reference cell O7 in this countif function.

=COUNTIF(O8:O50000,-"<&O&7")

Can anyone help me with this one? Thanks.
 
T

T. Valko

I guess your criteria is supposed to mean less than O7?

Try it like this:

=COUNTIF(O8:O50000,"<"&O7)
 
M

Mike H

Hi,

I'm not sure what the minus sign was for, try this

=COUNTIF(O8:O50000,"<"&O7)

Mike
 
R

Rick Rothstein

And if the minus sign was a typo, then perhaps this is what you want...

=COUNTIF(O8:O50000,O7)

Note: It is always useful to include descriptive text as to what you are
trying to do rather than let a non-working formula try to convey it.
 
R

rhhince

What worked was this:
=COUNTIF(O8:O50000,">"&O7) and for counting negative numbers
=COUNTIF(O8:O50000,"<"&-O7)

Thanx for the help.
 
T

T. Valko

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


What worked was this:
=COUNTIF(O8:O50000,">"&O7) and for counting negative numbers
=COUNTIF(O8:O50000,"<"&-O7)

Thanx for the help.
 

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