Ask Your Question
0

remove parentheses from numbers in calc

asked 2019-10-04 05:55:39 +0100

clos911 gravatar image

I have a column of numbers in my calc file. they are all in parentheses, is there a way to remove the parentheses and only leave the number. example of numbers I have:

(251)

(252)

(253)

I would like them to simply be

251

252

253

also some number are also have a hyphen along with the parentheses.. here is an example

(-253)

(-254)

(-255)

I would like them to be:

253

254

255

thank you

edit retag flag offensive close merge delete

Comments

Please explain if it is by a cell format,, or they are numbers as text.

m.a.riosv gravatar imagem.a.riosv ( 2019-10-04 13:44:57 +0100 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2020-08-20 16:03:27 +0100

LeroyG gravatar image

If you select the cell with the first example number, the Imput line (aka Formula bar) might show…

  1. (251)
  2. '(251)
  3. -251

In the cases 1 and 2, you could use a formula in a column next to the numbers: =NUMBERVALUE(REGEX(A1,"[()'-]","","g")), being A1 the cell with the value.

Also can select the cells, copy, paste in a text editor (Notepad, Gedit, TextEdit or the like); select all in the text editor, copy, and paste in the spreadsheet, wich will show a dialog box named Text Import: hitting OK should work.

More LibreOffice Help on NUMBERVALUE, REGEX.

In the case 3, you could:

  • select the cells;
  • choose menu Format - Cell… (the same that Ctrl+1) - Numbers tab, and select Category Numbers and Format Standard - OK;
  • choose menu Edit - Find & Replace…, with - in Find:, leave Replace: empty, then press Replace All.

Press edit below your question if you want to add more information; also can comment an answer.

Check the mark (Correct answer mark) to the left of the answer that solves your question.

Tested with LibreOffice 6.3.6.2 (x86); OS: Windows 6.1.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-10-04 05:55:39 +0100

Seen: 139 times

Last updated: Aug 20