At 11:41 30/05/2020 -0400, Vince Bonly wrote:
I have a Calc file that presently has telephone numbers existing within a column. They were previously imported from a source that used the following format: 800 555 1234, and some cells are blank. How can I reformat the column and all existing numbers within the column to be in the form: (800) 555-1234?

Let's say your values are in column A, starting in row 1.
o In row 1 of a spare column, enter:
=IF(A1="";"";"("&LEFT(A1;3)&")"&MID(A1;4;4)&"-"&RIGHT(A1;4))
o Fill that formula down the new column.
o If desired, select the new column, copy (or cut) it, and paste it back over the original data - but using Paste Special... (or Ctrl+Shift+V) instead of normal Paste and ensuring that Formulae is not ticked in the Paste Special dialogue.

I trust this helps.

Brian Barker


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@openoffice.apache.org
For additional commands, e-mail: users-h...@openoffice.apache.org

Reply via email to