+ Reply to Thread
Results 1 to 2 of 2

X and Y coordinates, locating closest Point to point distance.

  1. #1
    Registered User
    Join Date
    01-13-2020
    Location
    Tampa,Florida
    MS-Off Ver
    10
    Posts
    1

    X and Y coordinates, locating closest Point to point distance.

    Hello, very new to excel and VBA.

    I have a list of about 15000 coordinates in x,y form.

    My objective is to find a way to determine from the list which of the points is the closest to each point.

    I tried writing a function in VBA using point distance formula sqrt((xa-xb)^2 + (ya-yb)^2) I think my script has a flaw in it because it is only returning what appears to be the last value of data set.

    I have also seen an example using the index function to return this value. I have attempted this as well to no success.

    Help!

    I have attached a basic example of what I am trying to do.
    Attached Files Attached Files
    Last edited by Erav; 01-13-2020 at 03:25 PM.

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: X and Y coordinates, locating closest Point to point distance.

    Please try this - you just need the first two columns on Sheet1

    Please Login or Register  to view this content.
    Martin

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Finding Closest Point and Distance
    By batman07 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-25-2017, 08:06 AM
  2. Problem to find the coordinates of a point on a graph
    By rapha9 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-03-2013, 12:50 PM
  3. Replies: 5
    Last Post: 10-23-2011, 03:44 PM
  4. Distance from a point to a curve
    By bjack205 in forum Excel General
    Replies: 14
    Last Post: 02-04-2011, 02:10 PM
  5. Convert point coordinates -> pixel coordinates
    By Zorro in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-31-2006, 10:30 PM
  6. [SOLVED] How to get x,y coordinates of point from scatter chart in VBA
    By Milo in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-28-2005, 08:25 PM
  7. finding the coordinates of the maximum point on a graph
    By eastham85 in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 01-16-2005, 10:06 AM

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