Closed Thread
Results 1 to 7 of 7

Using excel to calculate taxi fares

  1. #1
    Registered User
    Join Date
    09-04-2017
    Location
    London
    MS-Off Ver
    2016
    Posts
    2

    Question Using excel to calculate taxi fares

    Basic Fare ($) Normal Medium Large
    Flag Down Fee (Inclusive of the first KM) $3.00 $3.90 $5.00
    Every 400m thereafter or less up to 10km $0.22 $0.25 $0.33
    Every 350 metres thereafter or less after 10 km $0.18 $0.20 $0.28
    Every 45 secs of waiting or less $0.20 $0.20 $0.20

    I am really new to excel and I really do not know which formula to even use to calculate the taxi fare according to this table where there are 3 types of taxis. I have seen examples of taxi fare questions in this thread, however, how do you solve the issue if it charges by 400m and 350m as seen in the table? I tried changing the price to /km for easier calculation, however one flaw is that if a vechicle travels 8.5 km for example, the result will no longer be accurate. Can any kind souls please enlighten me? I have attached the table into a excel file for easy referencing.
    Attached Files Attached Files

  2. #2
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: Using excel to calculate taxi fares

    =sum(hlookup(j2,$e$4:$g$8,2),hlookup(j2,$e$4:$g$8,3)*roundup((min($c$6,$k2)-1)/$d$6,),hlookup(j2,$e$4:$g$8,4)*roundup(max(,-$c$6+$k2)/$d$7,),roundup(l2/d8,)*hlookup(j2,$e$4:$g$8,5))
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    09-04-2017
    Location
    London
    MS-Off Ver
    2016
    Posts
    2

    Re: Using excel to calculate taxi fares

    Thanks for your help!!! However, the formula seems flawed as hiring a normal taxi is more expensive than medium and getting the value for a large taxi is unavailable with an error and I can't figure out what is wrong.

  4. #4
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: Using excel to calculate taxi fares

    =SUM(HLOOKUP(J2,$E$4:$G$8,2,),HLOOKUP(J2,$E$4:$G$8,3,)*ROUNDUP((MIN($C$6,$K2)-1)/$D$6,),HLOOKUP(J2,$E$4:$G$8,4,)*ROUNDUP(MAX(,-$C$6+$K2)/$D$7,),ROUNDUP(L2/D8,)*HLOOKUP(J2,$E$4:$G$8,5,))
    should be an exact match
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    11-27-2019
    Location
    vienna
    MS-Off Ver
    latest
    Posts
    1

    Re: Using excel to calculate taxi fares

    this is awesome thanks!!!

  6. #6
    Registered User
    Join Date
    08-21-2020
    Location
    Singapore
    MS-Off Ver
    2016
    Posts
    1

    Re: Using excel to calculate taxi fares

    Hi, I need to do the same question and i found the answer while searching but i do not quite understand the formula. Could someome explain to me

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Using excel to calculate taxi fares

    Administrative Note:

    Welcome to the forum.

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 13
    Last Post: 12-09-2016, 12:04 PM
  2. Formula needed for a Taxi booking log
    By RAJIV5B in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-13-2016, 06:38 AM
  3. Taxi fare calculator problem
    By TomThorn in forum Excel General
    Replies: 4
    Last Post: 10-23-2015, 02:03 PM
  4. Check if a taxi was used or not from the list of rides
    By chrisvercser in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-30-2015, 08:25 AM
  5. [SOLVED] Allocated Fares Based Upon Criteria
    By Jhon Mustofa in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-19-2014, 07:11 PM
  6. Mileage tariffs for a taxi
    By tomkilbourn in forum Excel General
    Replies: 21
    Last Post: 07-23-2009, 10:10 AM
  7. Taxi scheduling database using Excel?
    By WTAMadison in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-15-2005, 05:10 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1