A Microsoft Excel forum. ExcelBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » ExcelBanter forum » Excel Newsgroups » Excel Discussion (Misc queries)
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

why does atan2 not work??



 
 
Thread Tools Display Modes
  #1  
Old January 24th 06, 02:33 AM posted to microsoft.public.excel.misc
external usenet poster
 
Posts: n/a
Default why does atan2 not work??

i would like to use atan2(x,y) in my program but i get an error: "Sub or
function not defined". i try to use atn but it yeild the wrong result.
Ads
  #2  
Old January 24th 06, 02:36 AM posted to microsoft.public.excel.misc
external usenet poster
 
Posts: n/a
Default why does atan2 not work??

ATAN2 is not a VBA function -- it is an Excel function.
Therefore, you have to call it via Application.WorksheetFunction.
E.g.,

res = Application.WorksheetFunction.Atan2(x, y)


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"jaison" > wrote in message
...
>i would like to use atan2(x,y) in my program but i get an error:
>"Sub or
> function not defined". i try to use atn but it yeild the wrong
> result.



  #3  
Old January 24th 06, 02:46 AM posted to microsoft.public.excel.misc
external usenet poster
 
Posts: n/a
Default why does atan2 not work??

Also, do remember computer work with angles in radians not degrees
See Help for functions RADIANS and DEGREES
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"jaison" > wrote in message
...
>i would like to use atan2(x,y) in my program but i get an error: "Sub or
> function not defined". i try to use atn but it yeild the wrong result.



 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dates and Recomended Graphing Programs to work with excel? John Charts and Charting in Excel 2 December 8th 05 07:58 PM
A search for $ in a formula use to work now it does not work JuneJuly Excel Discussion (Misc queries) 2 November 30th 05 10:13 PM
Moving a sheet from one work book to another? WTG Excel Worksheet Functions 1 November 3rd 05 07:12 PM
My links no longer work . . . mike Excel Discussion (Misc queries) 8 October 27th 05 11:59 PM
How to get saved old saved work that was saved over? Maral Excel Discussion (Misc queries) 1 February 20th 05 08:59 PM


All times are GMT +1. The time now is 04:00 PM.


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