LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
alex.k
 
Posts: n/a
Default Custom function returning VALUE error


Hi,

I am trying to construct a simple function to calculate distance
between 2 points on Carthesian plane. The function I wrote:

Function FieldsXY(startx, starty, endx, endy)
FieldsXY = Application.SQRT((endx - startx) ^ 2 + (endy - starty)
^ 2)
End Function

The only result I'm getting is #VALUE! error. I tried to declare all
arguments as integer, didn't help. Help would be greatly appreciated,
as I'm no expert in this :).

regards,
Alex


--
alex.k
------------------------------------------------------------------------
alex.k's Profile: http://www.excelforum.com/member.php...o&userid=24637
View this thread: http://www.excelforum.com/showthread...hreadid=470598

 
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
Custom Function Call Bill Martin -- (Remove NOSPAM from address) Excel Discussion (Misc queries) 5 September 6th 05 06:14 PM
Error Handling #N/A with AVERAGE Function - Average of values in Row Sam via OfficeKB.com Excel Worksheet Functions 13 July 31st 05 03:59 PM
Why do I get a #Name error when I use the DateDif function? PhilS Excel Worksheet Functions 9 April 5th 05 04:51 PM
Why do I get a #Name error when I use the DateDif function? PhilS Excel Worksheet Functions 6 April 2nd 05 02:07 PM
Problem with VBA returning the contents of a long formula. [email protected] Excel Discussion (Misc queries) 2 February 23rd 05 12:14 AM


All times are GMT +1. The time now is 07:20 AM.

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"