Results 1 to 4 of 4
Thread: IF formula (XP)

20060123, 16:13 #1
 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,(B336378)*0.22+5457,IF(72756<B3<=118285,(B372756)*0.26+13460,IF(B3>118285,(B3118285)*0.29+25297))))
Help!

20060123, 16:30 #2
 Join Date
 Mar 2002
 Posts
 84,353
 Thanks
 0
 Thanked 31 Times in 31 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,(B336378)*0.22+5457,IF(B3<=118285,(B372756)*0.26+13460,B3118285)*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),...

20060123, 16:37 #3
 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

20060123, 16:43 #4
 Join Date
 Mar 2002
 Posts
 84,353
 Thanks
 0
 Thanked 31 Times in 31 Posts
Re: IF formula (XP)
I stand corrected. <img src=/S/grin.gif border=0 alt=grin width=15 height=15>