Vertical and Horizontal Lookup

JohnGuts

New Member
Joined
Mar 14, 2006
Messages
43
All,

I have a stadard mileage chart that has city names in the left most column, Column A (A2:A113) and the same city names along the top row, Row 1 (B1:DH1).

This is used to find the distances between two city's by finding the point where the rows and columns intersect.

What I am trying to do is have the user input a city name and find the 10 closest city's to the input city.

The query would be on a seperate sheet than the mileage data so the user input would be in cell A3 and then I would put the 10 closest cites in A5:A14. I would also need to put the mileage value in the cell next to the city name.

Not sure how to make this happen. Thanks for any help you can provide.
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
This is done with INDEX MATCH MATCH:

Excel Workbook
ABCDEFGHI
1PortlandSalemAshlandStart CityEnd CityDistance
2Portland030150PortlandAshland150
3Salem300120
4Ashland1501200
Sheet1
 
Upvote 0
Thanks for the reply. This worked great for finding the distance between two specific cities. Any idea how I can find the 10 closest cities to a user inputted city?

Thanks again for any help you can provide.

John
 
Upvote 0

Forum statistics

Threads
1,214,585
Messages
6,120,394
Members
448,957
Latest member
Hat4Life

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