![]() |
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. |
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 |
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 |
All times are GMT +1. The time now is 05:51 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com