Ensure telephone number is entered properly

drdre77

New Member
Joined
Dec 27, 2017
Messages
13
Hi Everyone,

O.k. I haven't played with excel in a while, trying to remember some things here... basically I want to create a customer file. What I want is my admin to click on a button, which I created already.. and of course have the information needed in order pop up so that she can type it in. But, I want to fool proof it.. so when that button gets clicked, First thing comes up is Customer phone number, I want it so that if the telephone number is entered correctly... either xxx-xxx-xxxx or simply 10 digits xxxxxxxxxx that the next question pops up... Name, then Address, Then Email, and so on and so on.... If she made a mistake entering a phone number such as there's a charater in there, or 1 more or less number, I would like it to loop back and say basically... NOPE, please enter the Telephone number... until it's entered right.
Can that be done? lol
I hope so! I tried and can't do it...
Thanks
DrDre77
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Try with this:
Code:
[/COLOR][COLOR=#333333]TextBox1.Value = Format(TextBox1.Value, "#,###")[/COLOR][COLOR=#333333]
 
Upvote 0
Enter this as a validation formula then check with several strings if it is bullproof:

=OR((AND(LEN(A2)=12,SUMPRODUCT(MID("999099909999",ROW($1:$12),1)*ISNUMBER(0+MID(A2,ROW($1:$12),1)))+SUMPRODUCT(MID("000100010000",ROW($1:$12),1)*(MID(A2,ROW($1:$12),1)="-"))=92)),AND(LEN(A2)=10,SUMPRODUCT(0+ISNUMBER(0+MID(A2,ROW($1:$10),1)))=10))
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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