Acos trig function

P

Philosophaie

There are two ways to use the Acos trig function:

Application.WorksheetFunction.Acos(argument)
and
Application.Acos(argument)

I can not get the first on to work at all. The second only intermittenly.

RA(k) = Application.Acos(u(k))works only partially even though it is between
the range -1<=u(k))<=1.

When I add "180/pi*" in front of it gives me a type mismatch error?
 
R

Ron Rosenfeld

There are two ways to use the Acos trig function:

Application.WorksheetFunction.Acos(argument)
and
Application.Acos(argument)

I can not get the first on to work at all. The second only intermittenly.

RA(k) = Application.Acos(u(k))works only partially even though it is between
the range -1<=u(k))<=1.

When I add "180/pi*" in front of it gives me a type mismatch error?

It works OK here.

What happens to you? Program crash? Unexpected result? Error message? OS
crash?

Perhaps if you share the code, as well as the actual inputs and expected and
actual results you might get some useful information.

Best guess with the limited information you provide is that your expectations
are not in accord with how the function works.
--ron
 
D

Dennis Tucker

ACOS

Returns the arccosine of a number. The arccosine is the angle whose cosine
is number. The returned angle is given in radians in the range 0 (zero) to
pi.

Syntax

=ACOS(number)

Number is the cosine of the angle you want and must be from -1 to 1.

If you want to convert the result from radians to degrees, multiply it by
180/PI().

=ACOS(number)*180/PI()
 
W

Wouter HM

Hi Philosophaie,

If you are creating an User Defined Function where ACOS is part of the
VBA code try


Public Function MyFunc(aValue As Double)
Application.Volatile

MyFunc = Application.WorksheetFunction.Acos(aValue)
End Function

HTH,

Wouter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top