Converting Text to Numbers

Defaults settings in Calc converts text inside cells to the respective numeric values if an unambiguous conversion is possible. If no conversion is possible, Calc returns a #VALUE! error.

Only integer numbers including exponent are converted, and ISO 8601 dates and times in their extended formats with separators. Anything else, like fractional numbers with decimal separators or dates other than ISO 8601, is not converted, as the text string would be locale dependent. Leading and trailing blanks are ignored.

The following ISO 8601 formats are converted:

The century code CC may not be omitted. Instead of the T date and time separator, exactly one space character may be used.

If a date is given, it must be a valid Gregorian calendar date. In this case the optional time must be in the range 00:00 to 23:59:59.99999...

If only a time string is given, it may have an hours value of more than 24, while minutes and seconds can have a maximum value of 59.


The conversion is done for single scalar values only, not within ranges.

The conversion is done for single scalar values, as in =A1+A2, or ="1E2"+1. Cell range arguments are not affected, so SUM(A1:A2) differs from A1+A2 if at least one of the two cells contain a convertible string.

Strings inside formulas are also converted, such as in ="1999-11-22"+42, which returns the date 42 days after November 22nd, 1999. Calculations involving localized dates as strings inside the formula return an error. For example, the localized date string "11/22/1999" or "22.11.1999" cannot be used for the automatic conversion.


Ao empregar funcións nas que un ou máis argumentos sexan criterios de busca que representen unha expresión regular, téntase primeiro converter os criterios da cadea en números. Por exemplo, «.0» convértese en 0.0, etc. Se resulta ben, a busca non será unha coincidencia de expresión regular senón unha coincidencia numérica. Porén, ao traballar cunha configuración rexional na que o separador decimal non sexa o punto, como en galego, o punto fai que funcione a conversión a expresión regular. Para obrigar a que a avaliación sexa dunha expresión regular no canto dunha expresión numérica hai que empregar algunha expresión que non se poda confundir cunha numérica, como «.[0]», «.\0» ou «(?i).0».


In A1 enter the text '1e2 (which is converted to the number 100 internally).

In A2 enter =A1+1 (which correctly results in 101).

The formula =SUM(A1:A2), returns 101 instead of 201 because the conversion does not occur in a range, only for single scalar values. Here, '1e2 is treated as string which is ignored for the SUM function.

=SUM("1E2";1) returns #VALUE! because SUM() and some others that iterate over number sequences explicitly check the argument type.

Changing the default text to number conversion settings

The text to number conversion can be customized in the Detailed Calculation Settings option.

Precisamos da súa axuda!