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