PROBLEM:
hey y'all, i have a large dataset of both domestic and international phone numbers formatted in various ways that i need to convert to a particular format based on specific criteria.
example of current phone number formats in the dataset:
###-##-##-####-####
+##-##-####-####
(###) ###-####
+## (#) ## ### ## ##
##-##-######-#
as you can see, the phone number formats vary greatly and there are many more examples that i did not list. i work with datasets averaging 1000+ rows.
what i try varies depending on how much data cleanup i need to perform, but below are some of my current methods.
Approach 1: Manually editing
i have attempted manually updating the phone numbers to my desired formatting. however this is time consuming and leads to user error.
Approach 2: CTRL+1 "Format Cells"
i start by sorting my list of numbers. then follow ctrl+1 > Number > Custom to format the following:
domestic as 000-000-0000, UK as +##-##-####-####, etc.
the issue with this method is that the numbers are stored as formatted "Custom" values. so any special spaces or characters (i.e. "-", "+") do not exist within the string. meaning that i cannot import into my crm.
i have attempted to manually add "'" at the beginning of each formatted phone number, but it removes the special formatting. e.g. ###-###-#### just becomes '##########.
Approach 3: Functions
i have tried using the following functions on domestic phone numbers, but they only work if formatting follows ###-###-####. which is not always the case for the data i work with.
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1,"(",""),")","")," ",""),"-","")
or
=MID(A1,2,3)&MID(A1,7,3)&RIGHT(A1,4)
Approach 4: Macro
i've attempted recording macros, but this does not work properly since the length/formatting of a cell value and size of a sheet always varies.
Approach 5: VBA script
i am currently exploring various scripts. there are a ton of examples on stackoverflow, but most presume clean data formatted as (###) ###-####. so the scripts do not work for me.
this post was helpful as a first step to removing all special characters from cells: Phone number format
but again, only applies to certain types of formatting.
DESIRED OUTCOME
i undergo this process various times a month and am hoping somebody can help me optimize my approach.
i need domestic numbers to become ###-###-#### and international phone numbers vary, but the UK would look like +##-##-####-####. i need these characters to exist within the actual string of each cell, otherwise my crm will not accept the phone numbers.
I'm not entirely sure, but maybe this gets you going:
Formula in B1:
=MAP(A1:A5,LAMBDA(x,LET(y,CONCAT(TEXTSPLIT(x,TEXTSPLIT(x,ROW(1:10)-1,,1),,1)),TEXT(--y,SWITCH(LEN(y),10,"###-###-####",12,"+##-##-####-####","0")))))
MAP(A1:A5,LAMBDA(x - Loop over a given dataset;
LET(y,CONCAT(TEXTSPLIT(x,TEXTSPLIT(x,ROW(1:10)-1,,1),,1)) - Part where each input gets cleared into just pure numeric characters;
TEXT(--y,SWITCH(LEN(y),10,"###-###-####",12,"+##-##-####-####","0"))))) - Now use SWITCH() to test against the length of the numeric input. If 10 or 12 we kind of know what format we like, the last parameter is the 'standard' format. But obviously you could start adding checks. In the samples given, you'd want to include options for length 11 and 15.
In one of my DocuSign templates, I have a fixed table and a summary row at the bottom. In the summary row, all above cells in the column are summaries with a formula field. The calculated amount, however, returns the result using a UK/US decimal format:
link to a picture of the problem
Is it possible to change the result from "1,235,678.00" to "1.235.678,00"?
It is not possible to change the decimal formal of a calculated field through settings as of the time of this writing. I contacted DocuSign support and I was referred to my account manager to have this fixed. I recommend to anyone walking in these shoes to either contact DocuSign support or contacting their account manager directly!
I am working on one requirement where I have to show / hide Sign tag as per
the number of days calculation.
I tried to use two datafield for "Date" date type:
DateSigned = "11/05/2015"
DateReceived= "11/01/2015"
Added one more Datafield NumberofDays "number" type and added initial
value 14 days.
So , I want to calculate difference b/w to dates and if this difference is
greater than 14 days, I need to show Sign tag on documents else I need to
hide it.
I tried to use formula on template but it seems, not working
Formula is used = DateDiff([DateSigned], [DateReceived]) >
([NumberofDays])
I can always see Signature tag visible whether I update any value in
NumberofDays.
Is there any otherway like if we can open Recipiententer image description here/Signer view using Iframe and Iframe can be made read only.
your help is really appreciable.Attached image for reference.
Unfortunately the DocuSign conditional tab logic does not support greater than or less than operators. It only supports "equals specific value" or "not blank".
A crude workaround using the conditional logic tabs support: lets say i want a signature tab to appear if a delta is 1,2, or 3. I would create THREE unique signature tabs, each with specific conditional logic to appear if the delta/calculated value is 1, 2, or 3. If i needed to support 5 unique values, then that would result in 5 unique signature tabs. Granted, only ONE would actually be visible/appear based on the end calculation.
Can I set the default format for phone number?
I know the Format Cells feature of MS Excel will format the number, but I have extensive custom requirements.
If the user enters the phone number +1 923-456-7890 then it should automatically format the number by removing extra spaces, special characters and the country code.
The new format should be (923) 456-7890.
If any help is there, it is highly appreciated.
A single example is not a good general guide but please try:
="("&SUBSTITUTE(CLEAN(TRIM(MID(A1,FIND(" ",A1),LEN(A1)))),"-",")",1)
I have a situation where user enters a number of length 9 digits. But some people will only enter three digits like 901. So when they enter three digits in the text box, i have to auto generate the rest of the 6 digits and insert it into the database. I should check this against data base table that what was the last auto generated number with 901 and insert next value to it.
I just need a suggestion not the complete solution, that i should do this c# or SQL. Which is the best way to do it.
Thanks
A few things. As Tim mentioned, seems the system should provide the user with the number, not the user providing the system with the number. At any rate you'll want to use a database which would at the least contain a series of primary keys [http://en.wikipedia.org/wiki/Unique_key] (numbers not to be duplicated). Se the key to auto increment. This will ensure no other user has the same number/id.