Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
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  
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  
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 08: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 11:13 PM
Moving a sheet from one work book to another? WTG Excel Worksheet Functions 1 November 3rd 05 08: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 09:59 PM


All times are GMT +1. The time now is 08:39 PM.

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

About Us

"It's about Microsoft Excel"