published fare

hanasamo

Board Regular
Joined
May 31, 2005
Messages
83
I have a air passenger tickets price list in a xls file called "published fare", it's like:
pek-sha 1130
pek-can 1500
sha-can 900
.
.
.
.
.
.
And there is a column in another xls file contains city pair like that:
pek-sha
pek-sha-pek
sha-pek
can-sha
.
.
.
.
.
.
I want to use a macro or a function that can list the price for each route in the column next to the city pair column, as listed in the "published fare",pek-sha & sha-pek are both 1130, pek-sha-pek=1130+1130=2260,etc. how can I do this?

Thanks in advance
 
Thanks Fergus - Yes, you are correct:

sha-pek and pek-sha are two different things per the formula.

But hey, how long do we need thje formula to be? lol

So for:
"pek-sha-van"
you would need the legs:
pek-sha
and
sha-van

For pek-sha-van-sha-pek
you would need
pek-sha
sha-van
van-sha
sha-pek
 
Upvote 0

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

Forum statistics

Threads
1,224,802
Messages
6,181,054
Members
453,014
Latest member
Chris258

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