Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 3
Default Bug with advanced if statment?

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!
  #2   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 620
Default Bug with advanced if statment?

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!



  #3   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 3
Default Bug with advanced if statment?

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!




  #4   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 6,582
Default Bug with advanced if statment?

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

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"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!






  #5   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 3
Default Bug with advanced if statment?

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

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"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!








  #6   Report Post  
Posted to microsoft.public.excel.charting
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!



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Blanks and Advanced Filters Janie Excel Discussion (Misc queries) 7 August 24th 06 06:31 PM
Advanced filter Daisy10 Excel Worksheet Functions 1 August 2nd 06 02:38 AM
Advanced Filter not working babypenquin Excel Worksheet Functions 1 June 22nd 06 05:48 PM
Advanced filtering on text and blanks dtencza Excel Discussion (Misc queries) 4 March 14th 06 01:07 AM
advanced IF statment tom Excel Discussion (Misc queries) 1 November 18th 05 07:46 AM


All times are GMT +1. The time now is 02:01 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"