I have a list of phone numbers with various layouts (Australia) and I need to create consistency for them. I need the layouts to look like the examples below. The data is then being imported back into a database but they are not split into different cells for each number formula.
For example i have - 5382 1111, 03 5382 1111, 0417 111 111, 1300 123 123, 13 13 13,
I have tried a few different formulas through the custom format cells but they are not working correctly and numbers are being deleted from their cells.
You can use custom number formats to achieve this.
For numbers beginning with 0, also watch for preceding the data with an apostrophe (
'
) or making the whole column text format.If you show what you tried, we can help troubleshoot.
An approach
Hint: to incorporate landline and mobile in the same rule, try conditional custom number formats. For more details see Custom number formats and how to use them.
An example
You could try using this custom number format string:
Notes on this example:
Assumptions about your data
The above example assumes:
Limitations
The above solution example does not deal with 1300 or 13 numbers properly:
If you have numbers stored as text, or numbers beginning with a + and an IDD (international country) code, you will need a different approach.
If you have numbers stored in the old format from back when they were 6 digits starting with 8 (e.g. 821 111) with area code 053 (before it inherited the 03 code and moved the 53 into the start of the number), then: