Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old January 24th 06, 02:33 AM posted to microsoft.public.excel.misc
jaison
 
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.

  #2   Report Post  
Old January 24th 06, 02:36 AM posted to microsoft.public.excel.misc
Chip Pearson
 
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   Report Post  
Old January 24th 06, 02:46 AM posted to microsoft.public.excel.misc
Bernard Liengme
 
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.





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
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 05:38 AM.

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

About Us

"It's about Microsoft Excel"

 

Copyright © 2017