# Re: indetify 5 digit numbers

#### Jimbo Razza

##### Board Regular
Re: indetify 5 digit numbers

Hey There

I have a cell that could have text, numbers or a combintation of the two in it.

I need to check the cell and create a condition if it has a 5 digit number in it.

How would I do this?

### Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
do an if statement, len=5

Try ........
=IF(AND(ISNUMBER(A1),A1>9999)=TRUE,"Yes","No")

This will be true for all numbers of 5 or more digits ........
If u want the number to be ONLY 5 digits then

=IF(AND(ISNUMBER(A1),Len(A1)=5)=TRUE,"Yes","No")

By 5 digit number, I'm assuming 900.5 would not qualify.

Perhaps:
=IF(AND(TRUNC(N(A1))=A1,LEN(A1)=5),"Yes","No")

Replies
2
Views
291
Replies
3
Views
148
Replies
1
Views
89
Replies
12
Views
403
Replies
12
Views
452

1,219,696
Messages
6,149,778
Members
450,913
Latest member
mdsuther

### 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