cell contents - 10 digits or greater

ajm

Well-known Member
Joined
Feb 5, 2003
Messages
2,056
Office Version
  1. 365
Platform
  1. Windows
I am trying to force my users into giving me data in a certain format. this particular cell needs to be atleast 10 numbers long, or if its greater than 10, the eleventh must be "/" followed by a last single numeric. for example: 1234567891 or 1234567899/1
 
Are the "rules" I summarized in that other post correct?

yes. thats why i can't figure out the problem. i got sidetracked last night (sick wife and kids) and didn't get any further than i had yesterday. i had pulled apart the formula and was focussing on the mid statement within. it seemed to be where the problem arose.
 
Upvote 0

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
yes. thats why i can't figure out the problem. i got sidetracked last night (sick wife and kids) and didn't get any further than i had yesterday. i had pulled apart the formula and was focussing on the mid statement within. it seemed to be where the problem arose.
All that MID is doing is testing to see if the 11th character is the slash / character (if there is an 11th character).
 
Upvote 0
Isn't "Length must be 10 characters" redundant if "The number must be >=4000000000 and <=9999999999"

Yeah, I guess it is.

No, it isn't !

I just remembered why I set a length condition.

I think the OP only wants integers so:

4000000000.1

Would meet the condition of being >=4000000000 and <=9999999999 but would not be a valid integer entry so I included the length test. Could've also used INT but I chose the length test.
 
Upvote 0
sorry, i was laboring under the misapprehension that the mid statement, instead of checking to make sure the "/" was the 11th character, actually changed the 11th character to the "/". so, if a user types in 4123456789/4, it works just fine. thanks you for your help on this one. ajm
 
Upvote 0
sorry, i was laboring under the misapprehension that the mid statement, instead of checking to make sure the "/" was the 11th character, actually changed the 11th character to the "/". so, if a user types in 4123456789/4, it works just fine. thanks you for your help on this one. ajm
You're welcome. Thanks for the feedback! :cool:
 
Upvote 0

Forum statistics

Threads
1,224,606
Messages
6,179,865
Members
452,948
Latest member
UsmanAli786

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