determine wheter string has a number in it?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there an easy formula that will look at a cell and determine whether a
number 0-9 is in that cell?
 
Let me clarify -- formula looks in A1 to determine whether or not a number is
in the string that is in A1.

For example

A1 = asfkajsf4asdf ---> TRUE
A1 = asdlfksdfa ----> FALSE
 
With
A1 containing a value that may contain a number or be blank

This formula returns TRUE if A1 contains a number:
=MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A1&"0123456789"))<=LEN(A1)

Is that something you can work with?
***********
Regards,
Ron

XL2002, WinXP
 
Try this:

=ISNUMBER(--MID(A1,MIN(FIND({0,1,2,3,4,5,6,7,8,9},A1&"0123456789")),1))

Biff
 
Very much so Mr. C.

Thank you much!

Ron Coderre said:
With
A1 containing a value that may contain a number or be blank

This formula returns TRUE if A1 contains a number:
=MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A1&"0123456789"))<=LEN(A1)

Is that something you can work with?
***********
Regards,
Ron

XL2002, WinXP
 
I'm glad that worked for you.....and thanks for the feedback (much appreciated)


***********
Regards,
Ron

XL2002, WinXP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top