Telephone numbers
I have a long column of telephone numbers in the form 1-123-555-1234, and I would like to remove the leading number 1, all in one operation. Is there a way to do this? Thanks.
First time here? Check out the FAQ!
I have a long column of telephone numbers in the form 1-123-555-1234, and I would like to remove the leading number 1, all in one operation. Is there a way to do this? Thanks.
I hope your telephone numbers are considered as text bt Calc (text is left justified while numbers are right justified by default). If they are numbers on their own (i.e. the dashes have been added by cell formatting), there's little you can do, apart subtract 10,000,000 from the numbers.
With text:
Edit
>Find & Replace
, check Regular expressions^1-(.*)
$1
Press some Find Next
and Replace
to see if it works right, then Replace All
.
The regular expression tries to find a cell containing text starting (^
) with 1-
and captures the rest (.*)
. Since there are parentheses around the "rest", this is known as the first capture group. The capture group $1
is the replacement string.
To show the community your question has been answered, click the ✓ next to the correct answer, and "upvote" by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!
Asked: 2019-10-06 15:16:57 +0100
Seen: 42 times
Last updated: Oct 06
How do I export a chart in an image format from LibreOffice Calc? [closed]
Are there plans for a "papercut" project for libreoffice [closed]
Is it normal for Calc goal seek to take very long? [closed]
Please refine "Search" in Calc - implement functions in Gnumeric [closed]
LibreOffice Calc will not link to external data via internet [closed]
Is there a LibreOffice .odt, .ods viewer for Android? [closed]
Why is Calc so much slower at opening/saving files than MS-Office? (win7 x64) [closed]