the formula
=COUNTIF(data!$Y:$Y,"<b2")
returns the wrong answer, 1, if the value in cell B2 is 18
the formula =COUNTIF(data!$Y:$Y,"<18")
returns the correct answer, 52 in my case.
What am I doing wrong, please?
the formula
=COUNTIF(data!$Y:$Y,"<b2")
returns the wrong answer, 1, if the value in cell B2 is 18
the formula =COUNTIF(data!$Y:$Y,"<18")
returns the correct answer, 52 in my case.
What am I doing wrong, please?

This month, every Windows Secrets subscriber can download a one-chapter excerpt of Windows 7: The Missing Manual.Windows 7: The Missing Manual provides valuable information to help you overcome these difficulties in learning a new operating system. Subscribe today to download your free excerpt.
You're counting cells whose value is less than the text string "b2", not cells whose value is less than that of cell B2.
=COUNTIF(data!$Y:$Y,"<"&B2)
Once again, magic, Hans!
I'd figured that there was someting iffy about my attempt at the formula, but Excel is often forgiving about cell references or static values.
Please, how did you know the correct syntax for the formula which works? Once again, Help doesn't.
Thanks again.
I've been using Excel for so long now (I started with Excel 1.0 for the Macintosh in 1985!) that I can't remember when I first learned about this... <img src=/S/sorry.gif border=0 alt=sorry width=15 height=15>
And you're only 27 years old! <img src=/S/laugh.gif border=0 alt=laugh width=15 height=15>
-John ... I float in liquid gardens
[acronym title="Gday mate!"][/acronym] [acronym title="What up Dude?"]
[/acronym] UTC -7ąDS