Note that there are some explanatory texts on larger screens.

plurals
  1. POIn excel how can a calculate distances between 2 large sets of points with lat/longs?
    primarykey
    data
    text
    <p>Greetings everyone, I have 2 sets of points in excel (group A and B), each set has around 1000 entries that contain lat/long. What I want to do is compare Group A against Group B and figure out for every point in Group A what point in Group B is the closest. What would be the easiest way to do this in excel?</p> <p>One solution I started working on is a macro that will compare the 2 points against each other.</p> <pre><code> Sub distance() ' ' distance Macro ' ' Keyboard Shortcut: Ctrl+d ' Range("D4:E4").Select Selection.Copy Sheets("Analog Data").Select Range("F3:G3").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Range("D3:E3").Select Application.CutCopyMode = False Selection.Copy Sheets("Cluster 58").Select Range("FT4").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Range("D5:E5").Select Application.CutCopyMode = False Selection.Copy Sheets("Analog Data").Select Range("F3:G3").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Range("D3:E3").Select Application.CutCopyMode = False Selection.Copy Sheets("Cluster 58").Select Range("FT5").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False </code></pre> <p>Now how can I tell visual basic to set the ranges to go to the next one down so I do not have to type each individual one all the way down to Range("D1237:E1237")?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload