Solved/Closed
Baswick
Posts
6
Registration date
Saturday May 1, 2010
Status
Member
Last seen
June 15, 2010
- Jun 12, 2010 at 09:55 PM
rizvisa1
Posts
4479
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
- Jun 16, 2010 at 04:14 AM
Hello,
Thanks for giving your time to this.
I want to get a help for the following thing. I am trying to calculate ticket fares between places. I want a formula to get me the ticket fre when i select starting location and ending location.
A1= India
B1=Maldives
So C1 should be 200 (the cost of ticket)
&
A2=India
B2=India
So C2 should be 50.

Can i have a solution to this?

## 3 replies

rizvisa1
Posts
4479
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
770
Jun 12, 2010 at 10:35 PM
you need to explain more.

Could you please upload a sample file with sample data etc on some shared site like https://authentification.site , http://docs.google.com, http://wikisend.com/ , http://www.editgrid.com etc and post back here the link to allow better understanding of how it is now and how you foresee. Based on the sample book, could you re-explain your problem too
Baswick
Posts
6
Registration date
Saturday May 1, 2010
Status
Member
Last seen
June 15, 2010

Jun 13, 2010 at 01:03 PM
https://authentification.site/files/22940829/Question.xlsx

pls check the file. Red text column should be automated with a formula.
rizvisa1
Posts
4479
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
770
Jun 13, 2010 at 02:11 PM
How can one say what is the ticket price ??

Either question is incomplete, or is wrong or simply impossible. If you think about it, you would see that some one has to set the ticket price, Ticket prices are not set at random, there is logic etc behind it.
Baswick
Posts
6
Registration date
Saturday May 1, 2010
Status
Member
Last seen
June 15, 2010

Jun 14, 2010 at 09:08 AM
Actually There are two ticket prices. One is 20, which applies to the passengers within Atoll. Another is 50. This 50/- tickets applies to passengers traveling from one atoll to another. So to mention Locations given there doesnt show any atoll Codes. But if we put atoll codes before every island name can we make a possible thing for that. Our Atoll names are GA. atoll and G.Dh. Atoll. So if we travel from Ga. Dhevvadhoo to G.Dh. Kaadedhoo ticket fares hould be 50/-. But if you travel from G.a. Dhevvadhoo to G.A. Kolamaafushi, then ticket fares hould be 20/-. How can we set that pattern in a formula?? Pls be kind enough to respond.
rizvisa1
Posts
4479
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
770
Jun 14, 2010 at 10:58 AM
Again how can one say if given destination is within same atoll or other ?
Baswick
Posts
6
Registration date
Saturday May 1, 2010
Status
Member
Last seen
June 15, 2010

Jun 14, 2010 at 09:59 PM
Ok. Just get the idea. Forget about real names. If there are two cities, City A, and CIty B in a country. Taxi fare for within City A =5\$, from City A to City B is =9\$, Within CIty B = 5\$, from City B to A = 9\$. How can i formulate it in a spreadsheet in a way that when i write City A in A1 (starting point) and City B in B1(ending point), then C1 must automatically detect ticket fare allocated for one city to another is 9\$.and same way when i write City A in A2 (starting point) and City A in B2(ending point), then C2 must automatically detect ticket fare allocated for one city to another is 5\$. Can we work that out?
rizvisa1
Posts
4479
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
770
Jun 15, 2010 at 06:03 AM
And I am trying to get idea. Let me give you idea and you tell me price of ticket
Here is quiz
There are two cities. City A and City B. Now tell me if city A and B are in same country or not. Can you ? Of course not. Some one has to tell where city A and b are located. One cannot make blind guess if they are in same country or not. For that matter. Take London. Are we talking about city of london in UK or city of London in canada. Again some one has to tell.
rizvisa1
Posts
4479
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
770
Jun 15, 2010 at 07:56 AM
Well here is my suggestion. You Prefix the names with the location code

like
GA-Faresmaathoda
GA-Rathafandhoo
GD-Kolamaafushi

Where GA and GD are island/atoll locations

Then for rate you can use

=IF(LEFT(B4,3)=LEFT(C4,3), 20, 50)

The catch is that you need to use same legth string for all locations.

here is the file
https://authentification.site/files/22969115/Question.xls
Baswick
Posts
6
Registration date
Saturday May 1, 2010
Status
Member
Last seen
June 15, 2010

Jun 15, 2010 at 09:54 PM
Thanks a lot for the help.
rizvisa1
Posts
4479
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
770
Jun 16, 2010 at 04:14 AM
You are very welcome