Hi guys,

new member, i have a problem that builds on an existing thread on this forum "Finding the nearest location from list of latitude Longitude"

i'm trying to split 372 location coordinates into 31 groups based on nearest locations.

my file currently uses the below 2 formulas to get the 30 nearest locations for each location.

=SMALL(ACOS(SIN(RADIANS(B2))*SIN(RADIANS($B$2:$B$27))+COS(RADIANS(B2))*COS(RADIANS($B$2:$B$27))*COS(RADIANS($C$2:$C$27-C2))-1*10^-14)*6371,2)However, How do i ensure each group has a unique set of nearest locations only and locations do no repeat in different groups ?=INDEX($A$2:$A$27,MATCH(E2,ACOS(SIN(RADIANS(B2))*SIN(RADIANS($B$2:$B$27))+COS(RADIANS(B2))*COS(RADIANS($B$2:$B$27))*COS(RADIANS($C$2:$C$27-C2))-1*10^-14)*6371,0))

If anyone can help me adjust the formula to avoid repetition amongst groups ? I can provide the sample data if needed.

Thanks

## Bookmarks