View Single Post
  #2   Report Post  
Rob van Gelder
 
Posts: n/a
Default

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)

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Emty" wrote in message
...
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!