Introduction
Over the last few months I have been taking photographs of taxi fare tables to be found in many of Bangkok’s Taxi Meter taxis. Up until now I have done nothing with them. Yesterday and today, however, I made a decision to prepare the spreadsheet that would anyone to enter the distance travelled and calculate their fare.
I also wanted to be able to build in the 50 Baht surcharge for taking the taxi from one of the two major airports in Bangkok and for taking a taxi having ordered it over the phone from the central communications centre.
I also wanted to build in the possible fare addition if the car is stuck in traffic.
I did all of that and I have to say it took me a lot longer than I expected.
Original Schedule from the taxi:
I translated this into this input table:
Inputs  
Stages  Range 
Distances 
Baht 
first stage  kilometres 
1 
35 
stage two  from, km 
2 
5 
to, km 
12 

stage three  from, km 
12 
5.5 
to, km 
20 

stage three  from, km 
20 
6 
to, km 
40 

stage three  from, km 
40 
6.5 
to, km 
60 

stage three  from, km 
60 
7.5 
to, km 
80 

thereafter  beyond, km 
80 
8.5 
Supplements  From Airport 
50 

Booking via Call to Central Office 
20 

Standing in Traffic  Cost per minute 
1.5 
As part of the programming I did for this worksheet, this then turned into this graph:
Of course, this graph doesn’t cover anywhere beyond Bangkok but the schedules I have seen in the taxis will quote for taxis to Pattaya, Phuket, Surin and other long distance destinations.
Finally, the output table that allows us to enter any number of kilometres, being picked up at the airport and so on:
Most of the time I spent on this worksheet was spent on the cell above containing 111.5 Baht for 15 kilometres. The formula in this cell is:
=IF(G5=N30,P30,IF(AND(G5>=N31,G5<N32),(G51)*O31+P30,IF(AND(G5>=N32,G5<N33),(G5N31)*O32+SUM(P30:P31),IF(AND(G5>=N33,G5<N34),(G5N32)*O33+SUM(P30:P32),IF(AND(G5>=N34,G5<N35),(G5N33)*O34+SUM(P30:P33),IF(AND(G5>=N35,G5<N36),(G5N34)*O35+SUM(P30:P34),IF(G5>=N36,G5N35)*O36+SUM(P30:P35)))))))
I couldn’t believe it took so much effort to do this but take so long it did!
There is a table on which this formula is based that I have called the Calculation Engine but I am not showing that here!
That’s it: a simple but surprisingly difficult model to program.
Duncan Williamson