Excel: COUNTIF

Marc

TPer Emeritus
Suspended / Banned
Messages
34,670
Edit My Images
Yes
This is driving me round the bend!

I'm trying to use a COUNTIF formula and I just can't get it to work. The formula is:

=COUNTIF(M:M,"<C6")

Where M:M is a list of values and I want to count all in that list which are less than the value in cell C6. If I remove the <, i works fine for the number of value that = C6 but I can't get it to do the < part. :help:
 
Might sound silly... but have you tried removing the speech marks?

The speech marks were inserted by the wizard, it brings up an error if I remove them.

I think this is where the problem lies, it doesn't seem to like it where there is a calculation involving another cell.
 
Assume c6 has a value you want to test against?

Try

Countif(m:m, "<" & c6)

Sorry brief but on phone
 
"<" & C6

oops already been said...

incidentally more recent versions of excel also have =countifs whereby more than one if statement is required. Much better than faffing around with sum products!
 
Last edited:
"<" & C6

oops already been said...

incidentally more recent versions of excel also have =countifs whereby more than one if statement is required. Much better than faffing around with sum products!

Yes, I was using countifs in another cell. The solution worked for that as well. :thumbs:
 
Back
Top