Hi everyone! I'm currently creating a VBA that formats phone number. All numbers must follow a standard format.
The scenario goes like this:
In the user's selection, or highlighted part/selected part, all phone number formats will be "three numbers" "-" "three numbers" "-" "four numbers".
*However this 'format' should only apply to US phone numbers, or telephone numbers that starts with +1
The VBA code should also be able to translate letters into numbers(phone letters) such as:
ABC = 2, DEF = 3, GHI = 4, JKL = 5, MNO = 6, PQRS = 7, TUV = 8, WXYZ = 9
For example, in a selection,
+1 (900) 800 8792
9118992343
281.928.9032
800 500 100
(+1) (839) 737 7289
ABC-DEF-ABC
900-900-9000
900-AAA-8ABE
Must be translated into the same location,
900-800-8792
911-899-2343
281-928-9032
800-500-100
839-737-7289
222-333-222
900-900-9000
900-222-8223
The code should be dynamic though. As you can see in the examples, letters are translated into numbers. All special characters are omitted, and the area code is removed. I'm still learning so I hope anyone would like to help me with this one. Thanks in advance!
The scenario goes like this:
In the user's selection, or highlighted part/selected part, all phone number formats will be "three numbers" "-" "three numbers" "-" "four numbers".
*However this 'format' should only apply to US phone numbers, or telephone numbers that starts with +1
The VBA code should also be able to translate letters into numbers(phone letters) such as:
ABC = 2, DEF = 3, GHI = 4, JKL = 5, MNO = 6, PQRS = 7, TUV = 8, WXYZ = 9
For example, in a selection,
+1 (900) 800 8792
9118992343
281.928.9032
800 500 100
(+1) (839) 737 7289
ABC-DEF-ABC
900-900-9000
900-AAA-8ABE
Must be translated into the same location,
900-800-8792
911-899-2343
281-928-9032
800-500-100
839-737-7289
222-333-222
900-900-9000
900-222-8223
The code should be dynamic though. As you can see in the examples, letters are translated into numbers. All special characters are omitted, and the area code is removed. I'm still learning so I hope anyone would like to help me with this one. Thanks in advance!