lucky13pierre
New Member
- Joined
- Feb 9, 2023
- Messages
- 1
- Office Version
- 365
- 2016
- Platform
- Windows
In sheet 1 I've got a list of the locations I need to allocate people to. I've got a latitude and longitude location for each one. On sheet 2 I've got a list of the people with their locations in latitude and longitude. Example below
SHEET 1
Post Code Lat Lon Allocated to
SW1X 51.498 -0.153
SHEET 2
Name Post Code Lat Lon
Pierre RM20 51.478 0.289
There are about a couple of hundred locations and around a dozen people. I need to put a formula in the 'Allocated to' column to find out which of my colleagues are closest to each location easily. I've got a formula [=3960*ACOS(COS(RADIANS(90-C3))*COS(RADIANS(90-C4))+SIN(RADIANS(90-C3))*SIN(RADIANS(90-C4))*COS(RADIANS(D3-D4)))] to find out distance, and can use the =min() function if I was putting each post code in one at a time but that would be very time consumung.
SHEET 1
Post Code Lat Lon Allocated to
SW1X 51.498 -0.153
SHEET 2
Name Post Code Lat Lon
Pierre RM20 51.478 0.289
There are about a couple of hundred locations and around a dozen people. I need to put a formula in the 'Allocated to' column to find out which of my colleagues are closest to each location easily. I've got a formula [=3960*ACOS(COS(RADIANS(90-C3))*COS(RADIANS(90-C4))+SIN(RADIANS(90-C3))*SIN(RADIANS(90-C4))*COS(RADIANS(D3-D4)))] to find out distance, and can use the =min() function if I was putting each post code in one at a time but that would be very time consumung.