Well the number 6 occurs 400 times inbetween 1 and 1500. Here's a formula to prove that.
Function COUNTINT(startVal As Long, endVal As Long, chk As Integer) As Variant
If chk > 9 Then COUNTINT = "1-9 only"
For x = startVal To endVal
For y = 1 To Len(x)
If Mid(x, y, 1) = chk Then
COUNTINT = COUNTINT + 1
This would count 600 as 1, 660 as 2, and 666 as 3 occurrences.
Describe "isn't working"... does it produce an error (if so, what is the error) or does it produce the wrong answer (if so, what do you think the answer is)?
------------------------- I just noticed I forgot to post what "array-entered" meant in my original message. You need to confirm the formula by pressing CTRL+SHIFT+ENTER and not just Enter by itself. Select the cell with the formula, click in the Formula Bar and then press CTRL+SHIFT+ENTER and I am guessing the formula will work for you then.