Home Privacy Policy Feedback Link to us Site Map Forums

Excel: Atn Function (VBA only)


In Excel, the Atn function returns the arctangent of a number.

The syntax for the Atn function is:

Atn( number )

number is a numeric expression.


Applies To:

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

For example:

Atn(2) would return 1.10714871779409
Atn(2.51) would return 1.19166451926354
Atn(-3.25) would return -1.27229739520872

VBA Code

The Atn function can only be used in VBA code. For example:

Dim LNumber As Double

LNumber = Atn(210)

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