What could be happening?
Hard to say.
COUNTIF will evaluate *text numbers* and numeric numbers as being equal. So,
if the range is text numbers but K25 is a numeric number (or vice versa)
then COUNTIF should work. However, if both the range and K25 are text
numbers then COUNTIF will return 0. The confusing thing is that you say
SUMPRODUCT works.
Here's what I would do.
Make sure K25 is formatted as General (or Number) and then re-enter the
value in K25.
Make sure "X" is also formatted as General (or Number). You can do this all
at one time instead of cell by cell.
Select an empty somewhere that has never been used or formatted.
Copy that empty cell: Edit>Copy
Now, select the range "X".
Then: Edit>Paste Special>Add>OK
This will usually reset the format of the cells and convert *text numbrs* to
numeric numbers.
--
Biff
Microsoft Excel MVP
There's nothing wrong with your formula.
Try this one and see what you get:
=SUMPRODUCT(--(X<=K25))
--
Biff
Microsoft Excel MVP
- Show quoted text -
That returns the correct value of 2.
What could be happening?