November 24th, 2003, 11:15 AM

Atan function
I'm making a small macro function in Excel and need to calculate an angle. For this I'm gonna use the Atan function, but I can't find it. Wery weird, cos all the oter functions are there on either the Math libary or the WorksheetFunction libary. The Atan2 function will not do in my case.
Anyone who knows where the function is hidden?
Have tried searching the forum, but found no answers on my problem.
Last edited by cirus; November 24th, 2003 at 11:21 AM.
November 24th, 2003, 12:10 PM

Worked around the problem by calculating the hypotenuse and then used the ACos function. If anyone finds the Atan function, I will appreciate if you post it here
November 25th, 2003, 12:38 AM

I have Excel 97 and there is an Atan function in the usual place.
November 25th, 2003, 02:09 AM

Thank you for your reply. I'm using office xp, and Atan is alvailable in the normal excel functions. It is just in the VBA editor that I can't find it.
December 5th, 2003, 11:11 PM

Atn(number)
The required number argument is a Double or any valid numeric expression.
Remarks
The Atn function takes the ratio of two sides of a right triangle (number) and returns the corresponding angle in radians. The ratio is the length of the side opposite the angle divided by the length of the side adjacent to the angle.
The range of the result is pi/2 to pi/2 radians.
To convert degrees to radians, multiply degrees by pi/180. To convert radians to degrees, multiply radians by 180/pi.
It is called Atn and not Atan. That was the reason. I have pasted from bol.