Others

How to Remove Apostrophes from Numbers in OpenOffice Calc

Chanuka GeekiyanageChanuka Geekiyanage Oct 22, 2026 869 views

Question details

The user needs to remove leading apostrophes from numbers in OpenOffice Calc to convert them from text back to proper numeric values.

How to Remove Apostrophes from Numbers in OpenOffice Calc
Product
OpenOffice Calc
Device & OS
not provided
Scenario
Reformatting spreadsheet data where numbers have been imported or entered as text.
Observed behavior
Numbers are preceded by a hidden apostrophe, forcing the spreadsheet to treat them as text. Simply changing the cell format to 'Number' does not convert the existing entries.
Before you start

Highlight or select only the specific cells containing the text-formatted numbers before starting, to ensure you do not inadvertently alter other genuine text data in your spreadsheet.

Solution 1Recommended

Use Find and Replace with Regular Expressions

This method forces OpenOffice Calc to refresh the cell contents and apply the newly selected number format, effectively stripping the hidden text marker.

The apostrophe acts as a hidden formatting tag rather than a physical character. Therefore, you cannot simply delete it. By replacing the cell content with itself while applying regular expressions, Calc re-evaluates the data as a number.

1
Change the cell format

Select the affected cells, navigate to Format > Cells in the top menu, and apply an appropriate Number format.

2
Open Find and Replace

Go to Edit > Find & Replace in the top menu bar to open the search dialog box.

3
Enter the search and replace values

In the 'Search for' field, type .* (a period followed by an asterisk, meaning zero or more of any character). In the 'Replace with' field, type & (an ampersand, meaning whatever was found).

4
Enable advanced options

Click on 'More Options' in the dialog box. Check the boxes for both 'Current selection only' and 'Regular expressions'.

5
Execute the replacement

Click the 'Replace All' button. The text markers will be removed, and your values will successfully convert to numbers.

Use Find and Replace with Regular Expressions
Calculation Ready: Once the replacement is complete, the numbers will shift to right-alignment by default, indicating they can now be used in formulas and calculations.
Simplify Spreadsheet Data Processing

Convert Text to Numbers Easily in WPS Spreadsheet

WPS Office provides intuitive, one-click solutions for converting text-formatted numbers into actual values, eliminating the need for complex regular expressions.

  1. 1. Open your file in WPS Spreadsheet: Launch WPS Office and open your spreadsheet containing the text-formatted numbers.
  2. 2. Select the text-formatted numbers: Highlight all the cells that display a small green triangle in the top-left corner, which indicates a number stored as text.
  3. 3. Use the quick conversion tool: Click the yellow warning icon that appears next to your selection and choose 'Convert to Number' from the drop-down menu.
One-click 'Convert to Number' error checking toolFully compatible with Microsoft Excel (.xlsx) and CSV formatsAdvanced yet simple Find and Replace functionalityFree, lightweight, and user-friendly spreadsheet interface
QA img-9

Frequently Asked Questions

Why is there an apostrophe before my numbers?

In most spreadsheet programs, an apostrophe at the beginning of an entry acts as a marker to force the software to treat the following characters as text, even if they are numerical. This is often used to preserve leading zeros or prevent automatic date formatting.

Can I remove the apostrophes using a formula?

Yes, you can use the VALUE function. Create a new column and enter the formula =VALUE(A1) (assuming A1 contains the text-formatted number). This converts the text into a numeric value. You can then copy the results and paste them as values over the original data.

Will the Text to Columns feature fix text-formatted numbers?

Yes. Selecting the affected column and using the 'Text to Columns' feature under the Data tab is another highly effective method. By proceeding through the wizard without setting any delimiters and clicking Finish, the spreadsheet refreshes the data and removes the hidden apostrophe.