Lookup value at intersection of two locations in mileage chart

KenGranger

New Member
Joined
Feb 23, 2018
Messages
2
I have an expense form that includes a mileage chart. I have "From Branch" and "To Branch" columns, each of which uses the same list of branches as data validation.

FromToMileage
MainDitch Road 12.51
The Other BranchMain16.86

<tbody>
</tbody><colgroup><col><col><col></colgroup>

I have a mileage chart matrix showing approved mileage between the bank branches. I want to use the values in the From and To columns to populate the approved mileage from the following matrix. Assume "Main" in the vertical list is cell A2, and "Main" in the horizontal list is cell B1. The mileage entered in the rows above should be the values shown in bold below.

I'm a relative novice with Excel, and this has be stymied. Any suggestions would be appreciated. I've looked around here a bit and haven't found exactly what I'm looking for. If this has already been answered, please accept my apologies and show me the path of enlightenment. Thanks.
MainDitch RoadThe Other BranchAnother BranceLast Branch
Main0.0012.5116.860.3312.01
Ditch Road12.510.009.1612.1533.96
The Other Branch16.869.160.0016.5527.59
Another Branch0.3312.1516.550.0012.33
Last Branch12.0133.9627.5912.330.00

<tbody>
</tbody><colgroup><col><col span="5"></colgroup>
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
KenGranger, Good afternoon.

This is a classical case of Cross Reference Search.

Solved by a combination of MATCH and INDEX functions.


A
B
C
1
FromToMileage
2
MainDitch Road 12.51
3
The Other BranchMain16.86

<tbody>
</tbody>


A
B
C
D
E
F
10
MainDitch RoadThe Other BranchAnother BranceLast Branch
11
Main0.0012.5116.860.3312.01
12
Ditch Road12.510.009.1612.1533.96
13
The Other Branch16.869.160.0016.5527.59
14
Another Branch0.3312.1516.550.0012.33
15
Last Branch12.0133.9627.5912.330.00

<tbody>
</tbody>

Try to use:

C2 --> =INDEX($B$11:$F$15,MATCH(A2,$A$11:$A$15,0),MATCH(B2,$B$10:$F$10;0))

Is that what you want?

I hope it helps.
 
Last edited:
Upvote 0
KenGranger, Good afternoon.

All of us are always learning new things in our day-by-day lives.

Glad to have helped you.

Thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,029
Messages
6,122,760
Members
449,095
Latest member
m_smith_solihull

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