Show Buttons
Share On Facebook
Share On Twitter
Share On Google Plus
Share On Linkdin
Share On Reddit
Contact us
Hide Buttons

Excel– VBA/Formula: Math Functions – Abs()

Description: 

The Abs func­tion in MS excel returns the absolute value of a number.

Format:

Abs(num­ber)

Arguments:
  • Num­ber
    • Manda­tory
    • Type: Num­ber
    • Num­ber 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

Out­put :

Abs()

Abs()

Using ABS() as Excel Formula

Abs Formula

 

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: