# To return an absolute value of a number in Excel requires the use of the ABS Function. An absolute value of a number is a the number without its sign, for example a + or –.

The correct syntax for the ABS Function is simple and shown below:

`ABS(number)`

Where (number) represents the actual number you want an absolute value for. This could be the number itself or the reference of a cell containing your actual number. For example:

`=ABS(-1)`

`=ABS(A1)`

So let’s assume cell A1 has -2 written in it. You could get the absolute value of this in another cell with two different methods…

`=ABS(-2)`

or `=ABS(A1)`

Both the above formula would result in a 2 being returned.

The ABS function can also be used in VBA. So let’s assume you have declared (dimmed) a variable for your number and called it `lNumber`

.

Then to give the variable its value you would use ABS first. So `lNumber=ABS(-2)`

Nice short post. Hope you find it useful!