Abs VBA function – How to calculate absolute value

Last Updated on January 11, 2023 by token

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 Excel VBA, use this function.

2. VBA Abs function – Syntax

'officeinside.org
Abs (number)

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 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, Excel 2019, Excel 2021, Excel 365.

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

Leave a comment

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

%d bloggers like this: