How to Remove Apostrophes from Numbers in OpenOffice Calc
Question details
The user needs to remove leading apostrophes from numbers in OpenOffice Calc to convert them from text back to proper numeric values.

- 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.
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.
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.
Select the affected cells, navigate to Format > Cells in the top menu, and apply an appropriate Number format.
Go to Edit > Find & Replace in the top menu bar to open the search dialog box.
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).
Click on 'More Options' in the dialog box. Check the boxes for both 'Current selection only' and 'Regular expressions'.
Click the 'Replace All' button. The text markers will be removed, and your values will successfully convert to numbers.

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. Open your file in WPS Spreadsheet: Launch WPS Office and open your spreadsheet containing the text-formatted numbers.
- 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. 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.

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.




