ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   is there anything to solve this? (https://www.excelbanter.com/excel-worksheet-functions/10330-there-anything-solve.html)

Emty

is there anything to solve this?
 
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!

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)

--
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!





All times are GMT +1. The time now is 05:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com