is there anything to solve this?

E

Emty

Hi!
maybe it is very simple... i don't know...
so

there are known the distances between two cities, which i write in table
example:
A B C
1 City1 City2 Distance
2 A B 1
3 A C 2
4 B C 3
5 C A 2
6 D A 4
etc.
This can be the source.

And table with city names only.
A B C
1 City1 City2 Distance
2 A B ?formula? (the source is above)
3 C A
4 C A
5 D A
6 D A
7 A B
8 A B
9 B C
10 B C
.... sooo long.
Is there any formula to write in the column Distance to fill in with
correspending distance from A to B and D to A etc.?
I use filters, but this takes very very long.
I will appreciate any advise!
 
R

Rob van Gelder

Assuming the first list has unique entries.

=SUMPRODUCT((Sheet1!$A$2:$A$100=A2) * (Sheet1!$B$2:$B$100=B2),
Sheet1!$C$2:$C$100)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top