# Lookup distances in table and display them

#### hansa

##### New Member
This should be a straight-forward question, but I haven't done Excel in a while, so maybe there is a kind soul here that can point me in the right direction I have a table that displays distances between Points T, A, B, C, D, E, which looks like this:

 T A B C D E T 0 22 20 51 59 63 A 22 0 10 30 36 50 B 20 10 0 32 40 45 C 51 30 32 0 11 32 D 59 36 40 11 0 40 E 63 50 45 32 40 0

<tbody>
</tbody>

I would now like to use a formula to display all these distances like this:

 from to distance t a FORMULA WHICH LOOKS UP THE DISTANCE BETWEEN T AND A AND DISPLAYS IT HERE t b FORMULA WHICH LOOKS UP THE DISTANCE BETWEEN T AND B AND DISPLAYS IT HERE t c etc t d etc t e etc a t etc a b etc a c etc a d etc a e etc b t etc b a etc b c etc b d etc b e etc c t etc c a etc c b etc c d etc c e etc d t etc d a etc d b etc d c etc d e etc e t etc e a etc e b etc e c etc e d etc

<tbody>
</tbody>

Thanks for all input and help!

### Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a \$25,000 loan, 5% annual interest, 60 month loan.

#### AhoyNC

##### Well-known Member
You could use INDEX / MATCH.

Copy formula down as needed.
Excel Workbook
ABCDEFG
1TABCDE
2T02220515963
3A22010303650
4B20100324045
5C51303201132
6D59364011040
7E63504532400
8
9
10ta
22
11tb20
12tc51
13td59
14te63
15at22
16ab10
17ac30
19ce32
Sheet