# Check if cell contains a numeric character

#### nicolewh

##### Well-known Member
I want to check if a range("a1") contains a numeric character. Example:

Thanks!

Last edited:

### Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

#### VoG

##### Legend
Is this in VBA or a formula?

#### mikerickson

##### MrExcel MVP
=IF(SUMPRODUCT(COUNTIF(A1,"*"&{1,2,3,4,5,6,7,8,9,0}))>0, "Contains at least one numeric character, "not")

In VBA?

#### PA HS Teacher

##### Well-known Member

=SUMPRODUCT(--ISNUMBER(--MID(\$A\$1,ROW(\$A:\$A:INDEX(\$A:\$A,LEN(A1))),1)))>0

#### Weaver

##### Well-known Member
one solution

=MIN(LEN(SUBSTITUTE(A1,MID("0123456789",ROW(\$A\$1:\$A\$10),1),"")))<LEN(A1)

confirmed using ctrl+shift+enter (curly brackets appear {})

#### VoG

##### Legend

Try this function

Code:
``````Function IsNum(r As Range) As Boolean
Dim i As Long
For i = 1 To Len(r.Value)
If IsNumeric(Mid(r.Value, i, 1)) Then
IsNum = True
Exit For
End If
Next i
End Function``````

then use e.g.

Code:
``X=IsNum(Range("E5"))``

Thank you!

#### Weaver

##### Well-known Member
4 different solutions - you gotta love this site!

#### Fowmy

##### Well-known Member
Yep, Let me add the 5th Solution for you

=COUNT(SEARCH({1,2,3,4,5,6,7,8,9,0},A1))>0

Replies
8
Views
775
Replies
3
Views
188
Replies
6
Views
183
Replies
3
Views
461
Replies
3
Views
413

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

1,163,837
Messages
5,833,918
Members
430,244
Latest member
Ireland1

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back