+ Reply to Thread
Results 1 to 4 of 4

Help with Fare Calculator!

  1. #1
    Registered User
    Join Date
    07-25-2018
    Location
    Philippines
    MS-Off Ver
    Excel
    Posts
    2

    Help with Fare Calculator!

    I'm a starting programmer (?) where we were assigned to do basics like real basics first, In which I'm glad they're doing that but the teacher is a bit of a nuthead LOL. She didn't explain how the codes work and stuff so I'm here probably for the whole school semester til' I can solve anything alone (?)

    So we were working with a different currency, PHP for this Fare Calculator and I have no idea how the codes work but the teacher gave me an idea but I don't understand how things work and stuff.

    The problem we were given with was this:
    Input KM: 4

    Hi Your Total Fare is 9.00php
    * 3KM below is 8.00php
    * Add 1.00php per additional KM

    But she said we could only use two operators which is: subtraction and multiplication, I think it's impossible but okay challenge accepted, I'm not great great at math or coding but if anyone of you could teach me on this that'll help a lot like how the codes work and what this and that mean I tried LOL and here's my code that doesn't work at ALL and I don't know why LOL

    =(A2<3=8.00)if(A2>3, A2+1)

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Help with Fare Calculator!

    I don't normally help with "homework" stuff, as most posters have made no effort of their own. You have. So

    =IF(condition, then do this, otherwise do that)

    =IF(A2<3,8,8+A2-3)
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    07-25-2018
    Location
    Philippines
    MS-Off Ver
    Excel
    Posts
    2

    Re: Help with Fare Calculator!

    OMG you're a lifesaver! I didn't know how these things literally worked, I'll put this down on my notes since you taught more things my teacher said about coding within' a few minutes like seriously with those few words! I've been like working my butt off for an hour just to get this code right! Thank you a lot! If it isn't too much to ask do you know any places with like good sources for studying coding? My teacher isn't the best

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,531

    Re: Help with Fare Calculator!

    The first post in this thread contains a .xls file that has a lot of information, so that might be a good place to start.
    I also liked the videos that Mike Girvin presents, you may want to start with this one.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Cross checking published fare with actual sales
    By Hiruy in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-10-2017, 10:30 AM
  2. Taxi fare calculator problem
    By TomThorn in forum Excel General
    Replies: 4
    Last Post: 10-23-2015, 02:03 PM
  3. [SOLVED] uk tax & N.I. Calculator
    By acornsnuts in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-27-2015, 03:10 AM
  4. [SOLVED] New fare
    By Anjukeerthi in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-05-2015, 08:02 AM
  5. [SOLVED] UK tax calculator
    By David HK in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 11-26-2014, 06:02 AM
  6. Fare Share Distribution Algorithm
    By bernsky in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-06-2007, 10:51 PM
  7. Integrated calculator in excel 07 instead of separate calculator
    By Wayne in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-26-2006, 11:20 AM

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