Re: indetify 5 digit numbers

Jimbo Razza

Board Regular
Joined
May 21, 2005
Messages
114
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

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
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")
 
Upvote 0
By 5 digit number, I'm assuming 900.5 would not qualify.

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

Forum statistics

Threads
1,215,446
Messages
6,124,904
Members
449,194
Latest member
JayEggleton

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top