Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Try this formula:
=VALUE(TRIM(CLEAN(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE (SUBSTITUTE(A1,"(",""),")",""),"-","")," ","")))) or... Save this function to your PERSONAL.xls file in a module: Function KeepNumeric(Text As String) As String Dim sTemp As String, i As Integer sTemp = Text For i = 1 To 255 If i < 48 Or i 57 Then sTemp = Application.Substitute(sTemp, Chr(i), "") End If Next i KeepNumeric = sTemp End Function Then enter the formula: =Value(KeepNumeric(A1)) That should do it! Thanks, Mike "Bayou Johnny" wrote: I have a data export that lists telephone number in a (xxx) xxx-xxxx format that I need to change to a number format without spaces or commas. Anyone know of a formula to apply to a column of text numbers to make such a conversion within a spreadsheet? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Format a number (i.e. 1111111111111111) to show XXXX-XXXX-1111-11 | Excel Discussion (Misc queries) | |||
How do I delete dashes from a phone number xxx-xxx-xxxx in Excel? | Excel Worksheet Functions | |||
change dots to dashes in an account format (xx.xxxx.xxxx) to xx-xx | Excel Discussion (Misc queries) | |||
Custom Format text XX:XXXX:XX | Excel Discussion (Misc queries) | |||
Wrapped text appears as xxxxxx | Excel Discussion (Misc queries) |