Trigonometric Functions in VBA

Deep within the bowels of the Microsoft on-line help can be found:

which lists  the derivation of trigonometric functions not provided by VBA.  Not included in this list is ATan2(), which is strange because this is the one trigonometric function that is really essential for anyone doing trigonometric or vector based calculations.

The file: provides UDF versions of all the functions listed on the Microsoft site, plus 2 versions of ATan2().

See the next post for an illustration of the advantage of using a UDF for Excel functions that are not included in VBA, rather than using the WorksheetFunction object.

This entry was posted in Excel, Maths, UDFs and tagged . Bookmark the permalink.

7 Responses to Trigonometric Functions in VBA

  1. xMRG says:

    Nice site.

    The Atan2 function is available to VBA through a WorkSheetFunction call

    application.WorksheetFunction.Atan2(dx, dy)

    I just found this the otherday myself.


  2. dougaj4 says:

    xMRG – Thanks.

    See this post:
    for reasons why it’s worth rolling your own, rather than using worksheetfunction.


  3. Pingback: Trigonometric Functions in VBA - Update « Newton Excel Bach, not (just) an Excel Blog

  4. Pingback: Trigonometric Functions - dll « Newton Excel Bach, not (just) an Excel Blog

  5. Alexwebmaster says:

    Hello webmaster
    I would like to share with you a link to your site
    write me here


  6. sandrar says:

    Hi! I was surfing and found your blog post… nice! I love your blog. 🙂 Cheers! Sandra. R.


  7. Pingback: Daily Download 23: Trigonometric Functions in VBA and Fortran | Newton Excel Bach, not (just) an Excel Blog

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.