Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 110
Default Acos trig function

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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default Acos trig function

On Fri, 19 Mar 2010 15:37:01 -0700, Philosophaie
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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 140
Default Acos trig function

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" wrote in message
...
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?


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 99
Default Acos trig function

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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Acos function Philosophaie Excel Programming 3 August 22nd 09 08:40 PM
Modified ACOS function danpt Excel Discussion (Misc queries) 4 November 3rd 08 08:17 AM
Trig Function seems odd. Ken McLennan Excel Worksheet Functions 9 May 8th 08 01:26 PM
Function ACOS in Excel VBA mario Excel Programming 3 October 11th 07 05:49 PM
Acos Function No Name Excel Programming 1 June 22nd 04 10:16 PM


All times are GMT +1. The time now is 11:44 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"