The Abs function in MS excel returns the absolute value of a number.
- Type: Number
- Number for which absolute value needs to be calculated
Sub getAbs() Dim number1 Dim number2 number1 = -10 number2 = -10 MsgBox "The Absolute values are " & Abs(number1) & " and " & Abs(number2) End Sub
Using ABS() as Excel Formula