View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.charting
David Biddulph David Biddulph is offline
external usenet poster
 
Posts: 620
Default Bug with advanced if statment?

I hope you mean:
=IF(C21=1000,C21*50%,IF(C21=500,C21*25%,IF(C21= 250,C21*15%,"N/A")))
as in your second test below you've got IF(4=500,... which isn't often
true.
--
David Biddulph

"H4X3R" wrote in message
...
=IF(C21=1000,C21*50%,IF(4=500,C21*25%,IF(C21=25 0,C21*15%,"N/A"))) works
w00t thanks all

"Jon Peltier" wrote:

As David suggested, reverse the order of tests in your IF statement.


"H4X3R" wrote in message
...
Hi David thanks,

i want ot to choose weather the number is between 250 and 499 and give
a
15%
discount, weather the number is between 500 and 999 and give a 25%
discount
and finally weather it is between 1000 or more and give a 50% diso****
how
can i do this

Thanks David!

"David Biddulph" wrote:

1000 is greater than 250, so the answer from your first IF condition
is
1000*15%. It doesn't get as far as any of the other tests.
You'll need to reverse the order of the tests.
--
David Biddulph

"H4X3R" wrote in message
...
Hello im using the follow if statment

=IF(C21250,C21*15%,IF(C21=500,C21*25%,IF(C21=10 00,C21*50%,"NO")))

it works fine but when it comes accross a number "1000" it doesnt
times
it
by 50% for e.g 1000*50% is ment to be 500 the if statment gives me
150
anyone
help thanks!