TOINT32

[Version: 2024 - September]
[Build: 24.09.03003] 

Converts an integer string to a 32 bit integer.

(string integerString)
Returns integer value based on passed value.
Example: ToInt32("100") returns integer value (100).
integerString: Required. The value of the integer.

 

(string integerStringbool isSafeCast)
Returns integer value based on passed value.
Example: ToInt32("INVALID", true) fails with conversion error and returns a default value (0).
integerString: Required. The value of the integer.

 

(string integerStringbool isSafeCastint defaultValue)
Returns integer value based on passed value.
Example: ToInt32("INVALID", true, -1) fails with conversion error and returns a passed default value (-1).
integerString: Required. The value of the integer.

 

Examples

The two IntString values are formatted as strings in Excel ('12345678 and '87654321):

When one of the strings cannot be converted to an integer:

Using the 'isSafeCast = true' option to convert data despite incorrect format:

 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.