What formula would I use?

R

Redland

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.
 
R

Ron Rosenfeld

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
 
R

Redland

That worked great! Thanks for the help All!

Ron Rosenfeld said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top