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

http://msdn2.microsoft.com/en-us/library/csfk8t62(VS.85).aspx

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: http://www.interactiveds.com.au/software/TrigFuncsVBA.zip 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.

### Like this:

Like Loading...

*Related*

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.

LikeLike

xMRG – Thanks.

See this post:

https://newtonexcelbach.wordpress.com/2008/02/23/worksheetfunction-vs-udf/

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

LikeLike

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

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

Hello webmaster

I would like to share with you a link to your site

write me here preonrelt@mail.ru

LikeLike

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

LikeLike

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