PC Review


Reply
Thread Tools Rate Thread

Acos trig function

 
 
Philosophaie
Guest
Posts: n/a
 
      19th Mar 2010
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?
 
Reply With Quote
 
 
 
 
Ron Rosenfeld
Guest
Posts: n/a
 
      19th Mar 2010
On Fri, 19 Mar 2010 15:37:01 -0700, Philosophaie
<(E-Mail Removed)> wrote:

>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
 
Reply With Quote
 
Dennis Tucker
Guest
Posts: n/a
 
      20th Mar 2010
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()




"Philosophaie" <(E-Mail Removed)> wrote in message
news:AF900930-7D24-4648-BCAC-(E-Mail Removed)...
> 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?


 
Reply With Quote
 
Wouter HM
Guest
Posts: n/a
 
      20th Mar 2010
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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Acos function Philosophaie Microsoft Excel Programming 3 22nd Aug 2009 08:40 PM
Modified ACOS function danpt Microsoft Excel Misc 2 3rd Nov 2008 12:21 AM
Function ACOS in Excel VBA =?Utf-8?B?bWFyaW8=?= Microsoft Excel Programming 3 11th Oct 2007 05:49 PM
The ACOS function =?Utf-8?B?Q2hhcmxlcyBUYW0=?= Microsoft Access Form Coding 1 15th Feb 2005 07:25 PM
Acos Function Microsoft Excel Programming 1 22nd Jun 2004 10:16 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:31 PM.