How to Use the SIGN function to check for the sign of a number
Excel provides the SIGN function to check the sign of a number. This function returns 1 if the number is positive, 0 if the number is 0, and -1 if the number is negative. If the user enters text instead of a number, the SIGN function returns the error code #VALUE!.
SIGN(number)
number: Any real number.
To check for the sign of a number:
- In cells A2:A10 list numbers or text.
- Select cells B2:B10 and type the following formula: =IF(ISERROR(SIGN(A2)),”",SIGN(A2)).
- Press Ctrl+Enter.
The same result for numeric values can also be generated by combining IF functions. Use this formula:
=IF(A1>0;1;IF(A2<0;-1;0)).
This tip is compatible with Excel 97, 2000, 2003 and 2007.
- How to check for invalid values using the TYPE function in Excel
- How to Check for Valid Numbers Using the T Function in Excel
- Using the OR function to check cells for text or numbers in Excel
- Use the ISEVEN and ISODD functions to check if a number is even or odd
- How to check for future dates using TODAY Function in Excel
