Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default What formula would I use?

What formula would I use to find the total distance between two points on an
x,y scatter chart containing both positive and negative numbers? For example
if one point is (-100,0) and another point is (100, 0) then the distance
would be 200 or 201 if you count zero. My data would be as follows:

Column B Column C
-9 -78
-326 -110
-130 50
-52 -318
146 91
160 150
-22 -90
348 222
-30 170
342 342
-394 -396
114 -37

I am not a proficient programmer for VB, but am always willing to try if
that is what it takes. Thanks for the help.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default What formula would I use?

On Sun, 27 Sep 2009 18:22:01 -0700, Redland
wrote:

What formula would I use to find the total distance between two points on an
x,y scatter chart containing both positive and negative numbers? For example
if one point is (-100,0) and another point is (100, 0) then the distance
would be 200 or 201 if you count zero. My data would be as follows:

Column B Column C
-9 -78
-326 -110
-130 50
-52 -318
146 91
160 150
-22 -90
348 222
-30 170
342 342
-394 -396
114 -37

I am not a proficient programmer for VB, but am always willing to try if
that is what it takes. Thanks for the help.



I think it is just the equation for the hypotenuse of a right-angled triangle.

=sqrt((x1-x2)^2+(y1-y2)^2)

Your example is a special case where one dimension is zero, and in that case
you can just subtract one from the other. But your points may have different
x's and y's.
--ron
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default What formula would I use?

That worked great! Thanks for the help All!

"Ron Rosenfeld" wrote:

On Sun, 27 Sep 2009 18:22:01 -0700, Redland
wrote:

What formula would I use to find the total distance between two points on an
x,y scatter chart containing both positive and negative numbers? For example
if one point is (-100,0) and another point is (100, 0) then the distance
would be 200 or 201 if you count zero. My data would be as follows:

Column B Column C
-9 -78
-326 -110
-130 50
-52 -318
146 91
160 150
-22 -90
348 222
-30 170
342 342
-394 -396
114 -37

I am not a proficient programmer for VB, but am always willing to try if
that is what it takes. Thanks for the help.



I think it is just the equation for the hypotenuse of a right-angled triangle.

=sqrt((x1-x2)^2+(y1-y2)^2)

Your example is a special case where one dimension is zero, and in that case
you can just subtract one from the other. But your points may have different
x's and y's.
--ron

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



All times are GMT +1. The time now is 11:27 AM.

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"