+ Reply to Thread
Results 1 to 3 of 3

How do I use the excel function ATAN in a module used in excel

  1. #1
    subash
    Guest

    How do I use the excel function ATAN in a module used in excel

    I have written a module(function) to use it as a user defined function by
    creating a macro
    When I use excel trignometric functions like SIN,COS and TAN the function is
    getting executed whreas when functions like ASIN,ACOS and ATAN are used in
    the module, I get compilation error
    I am struggling to get a link
    can any one help please?

  2. #2
    Bernie Deitrick
    Guest

    Re: How do I use the excel function ATAN in a module used in excel

    Use

    VBA includes its own SIN,COS and TAN , but doesn't include ASIN,ACOS and ATAN , so you need to use"

    Application.Asin( )

    or

    Application.WorksheetFunction.Asin( )

    HTH,
    Bernie
    MS Excel MVP


    "subash" <[email protected]> wrote in message
    news:[email protected]...
    >I have written a module(function) to use it as a user defined function by
    > creating a macro
    > When I use excel trignometric functions like SIN,COS and TAN the function is
    > getting executed whreas when functions like ASIN,ACOS and ATAN are used in
    > the module, I get compilation error
    > I am struggling to get a link
    > can any one help please?




  3. #3
    Dana DeLouis
    Guest

    Re: How do I use the excel function ATAN in a module used in excel

    As a side note, vba uses Atn( ) for ATAN.
    For the op, if you click on vba help for Atn, you can also select "See
    Also", and then select "Derived Math Functions." This will list some vba
    solutions to Trig functions that are not included in vba.

    - -
    HTH. :>)
    Dana DeLouis
    Windows XP, Office 2003


    "Bernie Deitrick" <deitbe @ consumer dot org> wrote in message
    news:[email protected]...
    > Use
    >
    > VBA includes its own SIN,COS and TAN , but doesn't include ASIN,ACOS and
    > ATAN , so you need to use"
    >
    > Application.Asin( )
    >
    > or
    >
    > Application.WorksheetFunction.Asin( )
    >
    > HTH,
    > Bernie
    > MS Excel MVP
    >
    >
    > "subash" <[email protected]> wrote in message
    > news:[email protected]...
    >>I have written a module(function) to use it as a user defined function by
    >> creating a macro
    >> When I use excel trignometric functions like SIN,COS and TAN the function
    >> is
    >> getting executed whreas when functions like ASIN,ACOS and ATAN are used
    >> in
    >> the module, I get compilation error
    >> I am struggling to get a link
    >> can any one help please?

    >
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1