+ Reply to Thread
Results 1 to 5 of 5

Thread: 'When' function

  1. #1
    Registered User
    Join Date
    04-26-2008
    Posts
    3

    Question 'When' function

    I'm attempting to put tgether a mileage expense sheet, which will include a list of rows into which the employee will input their mileage for each business related journey.

    Mileage will be reimbursed @ £0.40 per mile to 10k miles, thereafter @ £0.25 per mile.

    Reimbursments need to be shown for each row, to correctly calculate mileage @ 25p when 10k miles is reached, but I can't establish the correct formula. Anyone's assistance would be much appreciated. Many thanks.

  2. #2
    Forum Guru
    Join Date
    03-14-2006
    Location
    Pakistan
    Posts
    1,799

    Lightbulb

    Try this formula for mileage in A1

    =IF(A1<=10000,A1*0.4,IF(A1>10000,(10000*0.4+((A1-10000)*0.25))))
    starguy

    Tahir Aziz
    PAKISTAN

    __________________
    Forum Rules (read before you post)
    Links to the world of Excel

  3. #3
    Registered User
    Join Date
    04-26-2008
    Posts
    3
    Thanks so much, however I have tried using the formula, but if mileage exceeds 10k, the formula considers all mileage below 10k @ £0.25, rather than £0.40. In effect £4,000 can be claimed before £0.25 mileage rate is applied. Does this clarify? Any further assistance would really help. Many thanks

  4. #4
    Forum Moderator daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2007
    Posts
    10,057
    Hello Suzy,

    Starguy's formula works OK for me....although I think you could use a shorter formula, i.e.

    =A1*0.25+MIN(A1,10000)*(0.4-0.25)

    If that doesn't work for you can you give an example where it doesn't, i.e. data, result returned by formula, required result

  5. #5
    Registered User
    Join Date
    04-26-2008
    Posts
    3
    My sincerest thanks to you both. Both formulas work perfectly. Best regards.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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.2.0