Atn VBA function – How to calculate the arcustangent

Last Updated on January 11, 2023 by token

1. Atn VBA function – Description

The Atn VBA function   returns the arcustangent value. In order to calculate the arcustangent value, we should use this function. For example, arctan with 1 is Pi / 4.

2. VBA Atn function – Syntax

'officeinside.org 
Atn (Number As Double) As Double

Number : The number for which we want to calculate the arc tangent value.

Function return : Double / numeric value.

3. VBA Atn function Example

How to use Atn  function  in VBA Excel? Below are examples of using the Atn function in the VisualBasic Editor.

Example 1 : An example of using the Atn VBA function – result in the MsgBox window.

'officeinside.org
Dim dblNumber As Double
dblNumber = 1
MsgBox Atn (dblNumber) * 4

Example 2 : VBA Atn – function example – result in an Excel sheet.

'officeinside.org
Dim dblNumber2 As Double
dblNumber2 = 1
Range ("A1") = Atn (dblNumber2) * 4
Excel VBA functions - Atn VBA function
Excel VBA functions – Atn VBA function

4. VB Atn function – Additional information

  • none

5. Atn 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 VBA Excel function list. You can find a list of all VBA functions at this address:  VBA functions.

Leave a comment

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

%d bloggers like this: