Presence of number in a string using Excel Formulas

Presence of number in a string using Excel Formulas

Use Find to check each occurrence of number in the array and count at the end. If the value is greater than 0, then it can be concluded that, cell B1 has number in it. The result is TRUE or FALSE.

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

Few examples are listed below:

B1:Test 2 things. It contains 2 (number). So, the result is TRUE.

B1:Test two things. It does not contain any number. The text “two” is not recognized as number. So, the result is FALSE.

 

In order to check that cell contains pure number or not, Isnumber(B1) is great function to use. It will result in TRUE or FALSE.

Ex: B1=”Two”, ISNUMBER(B1)=FALSE

Ex: B1=2, ISNUMBER(B1)=TRUE

 

About the author: admin

You must be logged in to post a comment.