Translations:Faq/Calc/How to convert number text to numeric data/2/en

From The Document Foundation Wiki
Jump to: navigation, search

It can happen that data pasted from the clipboard or imported from CSV or entered into a cell that was already formatted as Text is of type Text although it visually looks like a number or date, and text can't be used in calculations. The cell content in this case in the Input Line is preceded with a leading ' apostrophe which is not part of the cell content, to indicate that the content could be interpreted as number if it wasn't text. As a consequence, arithmetic calculations involving such cells may yield a #VALUE! error, or the cell is ignored in functions that take a number sequence of a range, for example SUM(). To convert such number text to numeric data do the following, which assumes that the text actually can be converted, i.e. uses the separators (decimal, date, ...) of your locale.