Convert text to number in Libre Calc

56 views Asked by At

I have a spread sheet containing percentages which have a "'" prefix, e.g. "'18.93%". I can't therefore treat them as numbers.

Find and replace cannot find a single instance of "'", so I cannot convert them en masse. How can I automate this conversion?

Older answers to this topic no longer seem to work.


Implementing suggestion:

Am I doing something wrong? enter image description here

1

There are 1 answers

5
Julio Di Egidio -- inactive On BEST ANSWER

LibreOffice ignores the initial single quote for all purposes other than forcing the cell value to be treated as text. That said, in LibreOffice 7.5.9 I was able to do a Find and Replace with:

  • Regular expressions: on
  • Find: (\d+[.]\d+[%]) (in parentheses to create a capturing group)
  • Replace: $1 (also =$1 works)