Results 1 to 4 of 4

Thread: IF formula (XP)

  1. #1
    Lounger
    Join Date
    Apr 2004
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    IF formula (XP)

    Hello

    I don't understand why this formula gives me a FALSE result at all the fringe values...

    =IF(B3<=36378,B3*0.15,IF(36378<B3<=72756,(B3-36378)*0.22+5457,IF(72756<B3<=118285,(B3-72756)*0.26+13460,IF(B3>118285,(B3-118285)*0.29+25297))))

    Help!

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: IF formula (XP)

    The condition

    36378<B3<=72756

    is not valid in Excel. You can simply use

    B3<=72756

    since B3 will be larger than 36378 if this part of the formula is evaluated. So try

    =IF(B3<=36378,B3*0.15,IF(B3<=72756,(B3-36378)*0.22+5457,IF(B3<=118285,(B3-72756)*0.26+13460,B3-118285)*0.29+25297)))

    If you ever need to use a range as criteria, you can use the AND function:

    IF(AND(B3>36378,B3<=72756),...

  3. #3
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: IF formula (XP)

    <hr>The condition
    36378<B3<=72756
    is not valid in Excel. <hr>

    <img src=/S/whisper.gif border=0 alt=whisper width=29 height=17> This is a minor "nit", but that is incorrect.
    The condition is "valid" it just does not do what the user thinks it does. It compares 36378 to B3. If 36378 < B3 the eqn becomes:
    TRUE <=72756
    which is always FALSE.

    If 36378>=B3 it becomes:
    FALSE<=72756
    which is also FALSE. Each of the sections will thus always give false if it goes into that IF portion.

    Steve

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: IF formula (XP)

    I stand corrected. <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

Posting Permissions

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