+ Reply to Thread
Results 1 to 5 of 5

Error when using IF functino

  1. #1
    Registered User
    Join Date
    04-06-2013
    Location
    Northampton, England
    MS-Off Ver
    Excel 2010
    Posts
    4

    Error when using IF functino

    Hi,

    I am trying to create an excel spreadsheet that will show me the amount of UK Income tax I need to pay when I enter my earnings. I'm sure this must be something that someone else has already achieved.

    This is the formula that I have at the moment and that is currently not working:

    =IF(B16>150001,((B16-150001)*0.45)+((150000-32012)*0.4)+((32011-9441)*0.2)),IF(150000>B16>32012,((B16-32012)*0.4)+((32011-9441)*0.2)),IF(32011>B16>9441,(((B16-9441)*0.2),"Null"))

    It currently gives me a "Parse Error". The tax brackets are as follows; <9440 @ 0%, 9441-32000 @ 20%, 32001-150000 @ 40%, 150001+ @ 50%. Can anyone see where I am going wrong or have another idea of how I could do this?

    Thanks a lot in advance!!

    Regards,
    Taylrl

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Error when using IF functino

    Try

    =IF(B16>150001,((B16-150001)*0.45)+((150000-32012)*0.4)+((32011-9441)*0.2),IF(B16>32012,((B16-32012)*0.4)+((32011-9441)*0.2),IF(B16>9441,((B16-9441)*0.2),"Null")))

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Error when using IF functino

    IF(32011>B16>9441 is wrong it should be if(and(32011>B16,B16>9441), same for IF(150000>B16>32012
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,945

    Re: Error when using IF functino

    Replace this part of the statement: IF(150000>B16>32012
    with: If(And(150000>B16,B16>32012)

    Replace this part of the statement: IF(32011>B16>9441
    with If(And(32011>B16, B16>9441)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Error when using IF functino

    Maybe this...

    =B16*LOOKUP(B16,{0;9441;32001;150001},{0;0.2;0.4;0.5})
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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.6.0 RC 1