Allow Numbers Only and Set Text Length

Dillonm92

New Member
Joined
Feb 24, 2022
Messages
18
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
  2. MacOS
  3. Mobile
Hey everybody. Me again! Okay so now what I am trying to do, is use data validation to only allow any range of numbers, while at the same time forcing the user to enter 11 characters only. No more, no less. The reason for this is (due to TSA regulations concerning my job I can't say much) that some of the numbers we work with are always going to be 11 digits no matter what, and I am working to reduce any error on these forms we are using. I can set either whole numbers or text characters only one or the other. Can't get both combined. Can someone give me a hand please?
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
For cell A1 validation:
Code:
=AND(ISNUMBER(A1),LEN(A1)=11)
Capture.JPG
 
Upvote 0
Solution
Hi,

Can your 11 numeric digits start with a 0 (zero) or multiple 0s ?
 
Upvote 0
Hi,

Can your 11 numeric digits start with a 0 (zero) or multiple 0s ?
No they cannot. The task these numbers deal with is security sensitive so they cannot begin with 0 in any fashion, but the sequence will always remain 11 digits starting with anything other than 0.
 
Upvote 0
This would be an option in Data Validation

1646902263352.png
 
Upvote 0
Note that the DV in post #2 would allow an entry of, for example
123456.7891
 
Upvote 0

Forum statistics

Threads
1,214,943
Messages
6,122,380
Members
449,080
Latest member
Armadillos

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