+ Reply to Thread
Results 1 to 2 of 2

10 X 10 grid and finding distances from multiple points...

  1. #1
    Registered User
    Join Date
    02-16-2005
    Posts
    12

    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

  2. #2
    John Keith
    Guest

    RE: 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1