Abs

Function that returns the absolute value of a number (ignoring positive/negative sign)

Syntax
      Abs (number)


The Abs function may also be used in an SQL query.

Examples

Dim dblDemo As Double

dblDemo = Abs (-123.4)
123.4

dblDemo = Abs (45.1)
45.1

“I've nothing much to offer, There's nothing much to take, I'm an absolute beginner” ~ David Bowie

Related:

Int - Return the integer portion of a number
Sgn - Return the sign of a number, positive or negative.
Excel has an identical function abs()


© Copyright SS64.com 1999-2014
Some rights reserved