Changing form of phone number I get from one app when i put it in google sheets

:bullseye: What is your goal?

I want to change the form of a phone number I get from one app when i put it in google sheets.

:thinking: What is the problem?

The form of the number i get is for example +12123123123 and i want it to show as 123-123-123 without the country code β€œ12” in the beginning.

:test_tube: What have you tried so far?

I’ve figured it out how to seperate the numbers with β€œ-” but I want to get rid of the country code in the beginning. How do i do it?

1 Like

It depends on whether the country code is always the same or not.

Use the substring function.

1 Like

There is a module called parse a phone number. You can use it to convert the number in several standardized formats. Even if it doesn’t give you the one you need directly, it can help standardize the numbers first so then you can use a replace or a switch function to reformat it easily.

2 Likes

Hi @Skeynor ,

For this requirement, using the Parse a Phone Number module is the recommended approach. By selecting or mapping the appropriate country from the list, you can ensure accurate formatting and parsing.

To demonstrate the example use case you mentioned, the same result can also be achieved by using regex patterns with the Text Parser module, as shown in the screenshots below.

This is only an example to illustrate one possible way to handle the use case and should not be considered the exact or final solution.

Best regards,
Msquare Automation
Platinum Partner of Make
@Msquare_Automation

3 Likes

Hi @Skeynor ,

Thank you for taking the time to mark the answer as a solution - it truly helps keep the community organized and makes it easier for others facing similar issues to find the right guidance quickly.

Really appreciate your support!

Best regards,
Msquare Automation
Platinum Partner of Make
@Msquare_Automation