Ask Your Question

How do I remove dashes from phone numbers with Calc? [closed]

asked 2014-09-30 19:16:26 +0200

marymc gravatar image

updated 2014-09-30 19:20:40 +0200

I have a long list of phone numbers and they currently have dashes and parentheses. I need for them to have no dashes, no spaces, and no parentheses!. Help!

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2016-03-04 16:12:12.246854

1 Answer

Sort by » oldest newest most voted

answered 2014-09-30 23:51:40 +0200

Lupp gravatar image

updated 2014-10-01 10:38:54 +0200


Sorry for unnecessary complications: 'Search for' [(/\-\.)\\ ]* allone and 'Replace with' the empty string will also do.

(I thought I had tried that without success. trying again showed, there must have occurred a mistake.)

Obsolete: Other contributors of this forum may know better. (Tell me please!) I do not really understand - but experimenting a bit I found ...

Still valid: 'Find & Replace', 'Regular expressions' switched on,

Obsolete: ([^(/\-\.)\\ ]*)[(/\-\.)\\ ]* filled into 'Search for' and $1 into 'replace with'

Still valid: ... and then 'Replace all' will do it. The needed iteration is performed automatically (and can be made undone in a single step). (I assumed you also want to abolish the slash, the backslash and the full stop.)

Please note: In Germany national phone numbers for international use are denoted as follows (by example): 0049(0)8911111111 (often ornamented using some dashs and spaces) where 0049 is the international prefix for Germany, 089 the national prefix for Munich, and 11111111 a phantasy number. If you simply abolish the parenthesis you will get 004908911111111 and this may not work. At least calling from a German net the 0 behind 49 will not be acceppted in this case. 00498911111111 would be correct!

Searching for \(0\)|[(/\-\.)\\ ]*, replacing with nothing and 'Replace all' will do as needed in this case.

In January 2013 I also designed formulae based on the standard functions of Calc for this (or similar) purpose by means of non-numeric iterations. I can provide an example document if you are interested.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2014-09-30 19:16:26 +0200

Seen: 1,601 times

Last updated: Oct 01 '14