Home Privacy Policy Feedback Link to us Site Map Forums

Excel: Abs Function


In Excel, the Abs function returns the absolute value of a number.

The syntax for the Abs function is:

Abs( number )

number is a numeric value.


Applies To:

  • Excel 2007, Excel 2003, Excel XP, Excel 2000

For example:

Let's take a look at an example:

Based on the Excel spreadsheet above:

=Abs(A1) would return 210.67.
=Abs(A2) would return 2.9
=Abs(A3) would return 3.
=Abs(-4.5) would return 4.5

VBA Code

The Abs function can also be used in VBA code. For example:

Dim LNumber As Double

LNumber = Abs (-210.6)

In this example, the variable called LNumber would now contain the value of 210.6.