Office tutorials

Abs VBA function – How to calculate absolute value

1. Abs VBA function – Description

The Abs VBA function returns the absolute value of a number. If you use this function for positive numbers it will return unchanged argument. The function used for negative numbers will return a positive value. If you want to calculate the absolute value in VBA, use this function.

2. VBA Abs function – Syntax

Number  – A numeric value used to calculate the absolute value.

Function returns : Numeric value

3. VBA Abs function – Example

How to use the Abs  function in VBA Excel? The following is an example of using the Abs function in the VisualBasic Editor.

Example 1: Example of using the Abs VBA function – result in the MsgBox window and the cell of the worksheet.

Excel VBA functions - Abs VBA function

Excel VBA functions – Abs VBA function

4. VB Abs function – Additional information

  • none

5. Abs VisualBasic function – Where to use?

The function can be used in: Excel 2003, Excel 2007, Excel 2010, Excel 2013, Excel 2016.

The article is part of the list of VBA Excel functions. A list of all VBA functions can be found at this address: Excel VBA functions.

Leave a Reply

Your email address will not be published.