The ABS function returns the number without its sign (absolute value).
This function is useful in various calculations where it is important to consider only the value of a number, not its sign.
Syntax
ABS(value)
Argument |
Description |
Permitted values |
|---|---|---|
value |
The number for which you need to return the absolute value |
Any numerical value or reference to a cell containing a number |
Examples of use
Simple usage with a constant
=ABS(-10)
This formula will return 10, as this is the absolute value of the number −10.
Combining with other functions
You can use the ABS function in combination with other functions, such as SUM:
=SUM(ABS(A1), ABS(B1))
This expression will add the absolute values from cells A1 and B1.
Notes
If the argument is not a number, the function returns the #VALUE! error.