convertToNumber

Use the convertToNumber function to change a Text number value to a Number value. If the Text value is an invalid number, the text value is changed to a specified Integer default value. The convertToNumber function returns an Integer value.

Function format

convertToNumber(Text number, Integer default)

  • number: the Text number value which is changed to an Integer value.
  • default (optional): the Integer value which is returned if the Text number is invalid. If you do not set an Integer default, then an invalid Text number is returned as the Integer value 0.

convertToNumber example

convertToNumber("100.5") + convertToNumber("Apples", 50)

The first function in this formula returns the Integer value 100.5. The second function in this formula returns the Integer value 50.

The formula returns the Integer value 150.5 (100.5 + 50 = 150.5).