Phone Format - Australian Landlines

Hi

I have used the following to format australian formats

Landlines can be in this format:

399998888

0399998888

(03)99998888

99998888

all above will convert to 03 9999 8888 except 99998888 (it remains the same)

I need this format to be either 9999 8888 or 03 9999 8888 - just need a gap between the 8 digits

I am still struggling to do this for each phone (i have four columns of numbers)

please advise

thanks

Answers

  • Clinton JonesClinton Jones Experian Elite
    edited July 27

    @Carolyn the issue appears to be the fact that you are missing the branch exchange

    so you could use a regular expression but in the absence of that, if you still wanted to use the phone library you could try a compound function that is comprised of three pieces and uses a couple of variables


    note that this only works if the number without branch code is 8 in length


    The end result is a large function thus


    but results in


  • Sueann SeeSueann See Administrator

    @Carolyn

    I noticed that you mentioned you have multiple columns. So a reusable function would be useful in this context.

    I would create a reusable function where we can format the number into a national format and then handle the remaining formatting with the substring and concatenate function. You could add a length check if required here.

    You can then apply the reusable function across all the different columns as required with the Transform step "quick function" capability.


  • Clinton JonesClinton Jones Experian Elite

    you might also want to use a combination that combines length and valid national number check using an AND condition and of course still make it reusable!

  • CarolynCarolyn Contributor

    Hi

    Thanks for quick response. Based on above information l was able to work out a way to solve it. It was the above that got me there. Its not the same but it worked.

    Would send steps but unable to add to comment, states lm over the limit

    thanks

  • Clinton JonesClinton Jones Experian Elite

    @Carolyn you might want to do your own post describing how you solved the problem ;-)

  • CarolynCarolyn Contributor

    Hi Everyone

    Thank you for your quick replies. I looked at all your answers and it helped me come up with the fix. I did it differently but the above helped me

  • CarolynCarolyn Contributor

    How do l do that? I can only leave a comment and post

  • Clinton JonesClinton Jones Experian Elite

    you could post a new discussion


  • Tanj JagpalTanj Jagpal Administrator
    edited July 28

    Re-posted on behalf of @Carolyn


    Hi Everyone

    Thank you for your quick replies. I looked at all your answers and it helped me come up with the fix. I did it differently but the above helped me resolve it. I did the following:


  • Clinton JonesClinton Jones Experian Elite

    @Carolyn cleverly done. Just out of interest. What application did you use to copy /cut the screenshot ?

  • CarolynCarolyn Contributor

    HI

    I just used the snipping tool and cut and paste

    Is there a better way?

    thanks

    Carolyn

Sign In or Register to comment.