Find the closest zip code from a list of office zip codes, to employee's home zip code

mhabert53

New Member
Joined
Jun 12, 2017
Messages
1
I have a list of employees, and a list of offices. I want to find which office location an employee is closest to, based on the employee's home zip code - so, find the closest zip code in the office list, to each employee's home zip code:

[TABLE="width: 507"]
<colgroup><col><col><col span="3"><col></colgroup><tbody>[TR]
[TD]Employee Name[/TD]
[TD]Home Zip Code[/TD]
[TD][/TD]
[TD][/TD]
[TD]Office[/TD]
[TD]Office Zip Code[/TD]
[/TR]
[TR]
[TD]Employee1[/TD]
[TD]70713[/TD]
[TD][/TD]
[TD][/TD]
[TD]Office1[/TD]
[TD="align: right"]60616[/TD]
[/TR]
[TR]
[TD]Employee2[/TD]
[TD]70714[/TD]
[TD][/TD]
[TD][/TD]
[TD]Office2[/TD]
[TD="align: right"]60618[/TD]
[/TR]
[TR]
[TD]Employee3[/TD]
[TD]70715[/TD]
[TD][/TD]
[TD][/TD]
[TD]Office3[/TD]
[TD="align: right"]60619[/TD]
[/TR]
[TR]
[TD]Employee4[/TD]
[TD]70716[/TD]
[TD][/TD]
[TD][/TD]
[TD]Office4[/TD]
[TD="align: right"]60620[/TD]
[/TR]
[TR]
[TD]Employee5[/TD]
[TD]70717[/TD]
[TD][/TD]
[TD][/TD]
[TD]Office5[/TD]
[TD="align: right"]60621[/TD]
[/TR]
[TR]
[TD]Employee6[/TD]
[TD]70718[/TD]
[TD][/TD]
[TD][/TD]
[TD]Office6[/TD]
[TD="align: right"]60622[/TD]
[/TR]
[TR]
[TD]Employee7[/TD]
[TD]70719[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Employee8[/TD]
[TD]70720[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Employee9[/TD]
[TD]70721[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Employee10[/TD]
[TD]70722[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

Obviously all data is above is fake, just wanted to visually represent what I'm getting at. Is there an Excel formula or function that can help me do that, so that in the end I have a list of employees in one column, their home zips in another, and the closest office zip (and rest of office address I have), etc.?

Thanks in advance.
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

Forum statistics

Threads
1,223,902
Messages
6,175,278
Members
452,629
Latest member
SahilPolekar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top