The “ISNUMBER” function relates to a group of functions called the “IS” functions. These validate if the contents are of a specific type or returned something, like the “ISERROR” or “ISBLANK” functions.
Usage
It follows a simple pattern.
- Value to check
Example:
=ISNUMBER(3)
will return
"TRUE"
Let’s see what happens when we try a string that is a number:
=ISNUMBER("3")
will return
"FALSE"
The validation is done by type, not the content of that type. In the example above, although the string’s content is a number, the value provided is a string, so it doesn’t even check the parameter’s value.
If we validate a “number” column.
=ISNUMBER([numberColumn])
will return
"TRUE"
Same rationale as before. Since it’s a number column, the type is a number, so it’s fine. The same happens if the value is a floating-point number like ”3.14”.
Limitations
You cannot use this function to check if a column’s contents or specific string values are numbers. You need to convert the string to a number and then compare it since SharePoint won’t covert the types for you.
On a personal note, I wish that it would convert the type automatically. It would make the function a lot more useful. Now, if we’re converting to a number and it doesn’t return an error, then we are sure it’s a number, so we don’t need to check it.
Recommendations:
- Don’t use the “ISNUMBER” function to test anything other than numbers. It will return false even if the value is a number.
- Don’t nest it. There’s no real reason to do it, but if you find yourself in a situation where you have nested “IS” functions in a formula, you should review it and make everything more straightforward.
- Please note that formulas may have localization-based differences. For example, you should write “aaa” with “separating each of the arguments, but if your regional settings are set to Portugal, you should use “;” instead.
Sources:
Microsoft’s IS Function Reference
Introduction to SharePoint formulas and functions
Back to the SharePoint’s list formula reference.
Photo by James Homans on Unsplash