All this is off the top of my head with no help from Excel VBA, so there will be errors.
Next time, Copy a block of cells from the Sheet and paste them into your post, so we can just C&P them into a worksheet. I certainly won't look up a mess of location's Lats and Longs to make my own test data. They don't pay me.
This formula should be the same
Const R2D As Double = (Pi/190)
Constant MagicNumber as long = 637100 'Convert to... Feet? Miles? Centimeters? *Furlongs?
ACOS(SIN(lat1)*SIN(lat2)*PIRN^2) + COS(lat1)*COS(lat2)*COS(long2)*PIRN^3 _
-long1*PIRN)*MagicNumber
Const R2D As Double = (Pi/180) 'Declared here for speed
Const MagicNumber as long = 637100 'Don't want to declare them 2500 times
Sub MakeMatrix()
Dim Originals As Variant
Dim Distances As Variant
Dim Results As Double
Dim i as long, j as Long, k As long, l As long
Dim Rws As Long
Const Lat as Long = 1
Const Lon As Long = 2
Const MinDistance = 0.01 '*Furlongs ' Adjust as desired
'How many Rows
Rws = Cells(Rows,Count, "A").End(xlUp)).Row - 1 '-1 for header Row
'Set up the arrays
Originals = Application.Transpose(Range(Cells(2, "B"), Cells(Rws, "C"))).Value
Redim Distances(1 to Rws1, 1 to Rws)
'Step thru Originals one Row at a time.Twice
For i = LBound(Originals) to Ubound(Originals)
For j = LBound(Originals) to Ubound(Originals)
Results = GetDistance(Lat1:=Originals(i, Lat), _
Lat2 =Originals(j, Lat), _
Long1:=Originals(i, Lon), _
Long1:=Originals(j, Lon))
'Step thru Distances by columns then by rows
If Results > MinDistance Then Distances(i, j) = Results 'No zeros, so you can find the min()
'YOu might have to add 1 to i & j for the Distances array indices
Next j: Next i
'TBD: add Headers and Row Lables to Matrix
'You need to Assign Top left cell of Range for Matrix
Range("??").Resize(Rws, Rws) = Distances
End Sub
Private Function GetDistances(Lat1 As Double, Lat2 As Double, Long1 As Double, Long2 As Double) As Double
GetDistances = ACOS(SIN(lat1)*SIN(lat2)*R2D^2) + COS(lat1)*COS(lat2)*COS(long2)*R2D^3 _
-long1*R2D)*MagicNumber
End Function