Be the first user to complete this post
|
Add to List |
Excel- VBA/Formula: Math Functions – Abs()
Description:
The Abs function in MS excel returns the absolute value of a number.
Format:
Abs(number)
Arguments:
- Number
- Mandatory
- Type: Number
- Number for which absolute value needs to be calculated
Example:
Sub getAbs() Dim number1 Dim number2 number1 = -10 number2 = -10 MsgBox "The Absolute values are " & Abs(number1) & " and " & Abs(number2) End Sub
Output :

Using ABS() as Excel Formula
