#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 347
Default Formula Won't Work

Hello, can someone please help me with the following formula;
=IF(F5<=2999.99,"25%",IF(F5=3000,"50%",IF(F5=500 0,"75%",IF(F5=7000,"100%"))))
For some reason it calculates the 25% and 50% correctly, but it won't
calculate the 75% or 100% at all, it just stays at 50%
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Formula Won't Work


George;228856 Wrote:
Hello, can someone please help me with the following formula;
=IF(F5<=2999.99,"25%",IF(F5=3000,"50%",IF(F5=500 0,"75%",IF(F5=7000,"100%"))))
For some reason it calculates the 25% and 50% correctly, but it won't
calculate the 75% or 100% at all, it just stays at 50%


That is because you cover everything with the first two conditions

F5<=2999.99 and F53000
There is nothing else to test, any number is smaller than or larger
than 3000


--
Pecoflyer

Cheers -
*'Membership is free' (http://www.thecodecage.com)* & allows file
upload -faster and better answers

*Adding your XL version* to your post helps finding solution faster
------------------------------------------------------------------------
Pecoflyer's Profile: http://www.thecodecage.com/forumz/member.php?userid=14
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=63852

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 206
Default Formula Won't Work

On Feb 13, 6:12*am, George wrote:
Hello, can someone please help me with the following formula;
=IF(F5<=2999.99,"25%",IF(F5=3000,"50%",IF(F5=500 0,"75%",IF(F5=7000,"100%"))))
For some reason it calculates the 25% and 50% correctly, but it won't
calculate the 75% or 100% at all, it just stays at 50%


See the other same question
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default Formula Won't Work

On Fri, 13 Feb 2009 05:12:04 -0800, George
wrote:

Hello, can someone please help me with the following formula;
=IF(F5<=2999.99,"25%",IF(F5=3000,"50%",IF(F5=50 00,"75%",IF(F5=7000,"100%"))))
For some reason it calculates the 25% and 50% correctly, but it won't
calculate the 75% or 100% at all, it just stays at 50%


=IF(F5<=2999.99,"25%",IF(F5=3000,"50%",

If F5=3000, your second IF conditional evaluates to TRUE and the 50% statement
gets executed. Your function will never go past that.

You need to ensure that your conditionals are mutually exclusive, otherwise the
first one will get executed.

Write your IF statements in descending order and you will avoid that problem:

=if(f5=7000,100%,if(f5=5000,75%,if(f5=3000,50%, 25%)))

Also, if you want to use the result of this formula in a math function, don't
use the quotation marks, as they will return the result as TEXT (which will not
be recognized as a number by some Functions).
--ron
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,819
Default Formula Won't Work

Because in an IF statement, once the the test is TRUE, the Else is not
evaluated. Reorder your test with that in mind.

George wrote:

Hello, can someone please help me with the following formula;
=IF(F5<=2999.99,"25%",IF(F5=3000,"50%",IF(F5=500 0,"75%",IF(F5=7000,"100%"))))
For some reason it calculates the 25% and 50% correctly, but it won't
calculate the 75% or 100% at all, it just stays at 50%




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Formula Won't Work

Check in descending order:

=IF(F5=7000,100%,IF(F5=5000,75%,IF(F5=3000,50%, 25%)))

And I would think that you would want a real number returned--not text.

Make sure you format the cell as a percentage, too.



George wrote:

Hello, can someone please help me with the following formula;
=IF(F5<=2999.99,"25%",IF(F5=3000,"50%",IF(F5=500 0,"75%",IF(F5=7000,"100%"))))
For some reason it calculates the 25% and 50% correctly, but it won't
calculate the 75% or 100% at all, it just stays at 50%


--

Dave Peterson
  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 41
Default Formula Won't Work

Hi George,

It's because once you have any number in F5 greater than 3000, the second If
statement is fulfilled and the formula never gets to the later stages.

You could readjust your less than and greater than arguments but here is
another way to do it.

=LOOKUP(F5,{0,3000,5000,7000},{"25%","50%","75%"," 100%"})

HTH
Martin




"George" wrote in message
...
Hello, can someone please help me with the following formula;
=IF(F5<=2999.99,"25%",IF(F5=3000,"50%",IF(F5=500 0,"75%",IF(F5=7000,"100%"))))
For some reason it calculates the 25% and 50% correctly, but it won't
calculate the 75% or 100% at all, it just stays at 50%


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
Sorting the cells of a formula causes the formula to not work Jake Excel Worksheet Functions 3 January 31st 09 04:42 AM
Formula will not work Indymanny Excel Discussion (Misc queries) 6 May 15th 07 10:50 PM
FORMULA DOESN'T WORK Loyd Excel Discussion (Misc queries) 4 March 30th 06 06:17 PM
A search for $ in a formula use to work now it does not work JuneJuly Excel Discussion (Misc queries) 2 November 30th 05 10:13 PM
formula won't work tink13ub Excel Worksheet Functions 1 January 17th 05 06:59 AM


All times are GMT +1. The time now is 01:37 PM.

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

About Us

"It's about Microsoft Excel"