Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 10 X 10 grid and finding distances from multiple points...


here is what i need help with...

this is a small example of what i need to do...

10 X 10 grid (x-y axis 0-10)

on the grid are 4 points (for example (2,3)(3,4)(5,5)(7,5))

i need to determine the distance of each point to each grid mark..for
example each point on the grid (0,0)(0,1)....(10,10) i need to find the
distance that point is to the all 4 points that are user defined.

i am trying to write a routine in VBA that will do this

it has been awhile since i tinkered with VBA so any help would be
greatly appreciated


--
brya6347
------------------------------------------------------------------------
brya6347's Profile: http://www.excelforum.com/member.php...o&userid=20024
View this thread: http://www.excelforum.com/showthread...hreadid=346089

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default 10 X 10 grid and finding distances from multiple points...

This isnt a VBA solution, but maybe this will work for you...

Sounds like you need to apply the old pythagorean formula (a²+b²=c²)
make a table of every grid point (0,0)-(10,10)
0 0
0 1
0 2
.....
10 9
10 10 (121 rows of data)

then for each of your user defined points... caluculate the x-diff and the
y-diff, then plug them into the formula and solve for c.
=SQRT(x-diff²+y-diff²)

Hope that helps.

"brya6347" wrote:


here is what i need help with...

this is a small example of what i need to do...

10 X 10 grid (x-y axis 0-10)

on the grid are 4 points (for example (2,3)(3,4)(5,5)(7,5))

i need to determine the distance of each point to each grid mark..for
example each point on the grid (0,0)(0,1)....(10,10) i need to find the
distance that point is to the all 4 points that are user defined.

i am trying to write a routine in VBA that will do this

it has been awhile since i tinkered with VBA so any help would be
greatly appreciated


--
brya6347
------------------------------------------------------------------------
brya6347's Profile: http://www.excelforum.com/member.php...o&userid=20024
View this thread: http://www.excelforum.com/showthread...hreadid=346089


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
"multiple distances versus lowest time for a specific distance" shell aw[_2_] New Users to Excel 1 October 4th 09 06:12 AM
multiple distances versus lowest time for a specific distance shell aw New Users to Excel 1 October 4th 09 03:41 AM
finding 1st populated cell on a vector with varying starting points nickname Excel Discussion (Misc queries) 0 July 18th 06 02:15 AM
Zip codes and Distances brutonparish Excel Discussion (Misc queries) 0 July 3rd 06 05:42 AM
Finding height between high points Sean Excel Worksheet Functions 0 March 22nd 06 08:37 PM


All times are GMT +1. The time now is 02:20 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"