Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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%, but it will not calculate the 75% or 100%, it just stays at 50% |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
That is because 500 and 700 are = 3000, so it doesn't look any further
Change the order of testing the threshold values -- Kind regards, Niek Otten Microsoft MVP - Excel "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%, but it will not calculate the 75% or 100%, it just stays at 50% |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
On Feb 13, 6:14*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%, but it will not calculate the 75% or 100%, it just stays at 50% This should work =IF(F5<3000,"25%",IF(AND(F5=3000,F5<5000),"50%",I F(AND (F5=5000,F5<7000),"75%",IF(F5=7000,"100%")))) |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi George
Not pretty, but it works. Have you considered a lookup? =IF(F5<3000,25%,IF(AND(F5=3000,F5<5000),50%,IF(AN D(F5=5000,F5<7000),75%,100%))) Regards BT "Niek Otten" wrote: That is because 500 and 700 are = 3000, so it doesn't look any further Change the order of testing the threshold values -- Kind regards, Niek Otten Microsoft MVP - Excel "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%, but it will not calculate the 75% or 100%, it just stays at 50% |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
....or even
=IF(F57000,100%,IF(F55000,75%,IF(F53000,50%,25% ))) BT "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%, but it will not calculate the 75% or 100%, it just stays at 50% |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Another solution
=if(f5<=2999.99,"25%",if(f5<=4999.99,"50%",if(f5<= 6999.99,"75%","100%"))) -- Wag more, bark less "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%, but it will not calculate the 75% or 100%, it just stays at 50% |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Defintely not pretty, and unnecessarily complicated. You don't need the
various AND functions, because, for example, you have already tested for F5<3000 and hence you don't need to test for F5=3000. =IF(F5<3000,25%,IF(AND(F5=3000,F5<5000),50%,IF(AN D(F5=5000,F5<7000),75%,100%))) can be shortened to =IF(F5<3000,25%,IF(F5<5000,50%,IF(F5<7000,75%,100% ))) -- David Biddulph "BT" wrote in message ... Hi George Not pretty, but it works. Have you considered a lookup? =IF(F5<3000,25%,IF(AND(F5=3000,F5<5000),50%,IF(AN D(F5=5000,F5<7000),75%,100%))) Regards BT "Niek Otten" wrote: That is because 500 and 700 are = 3000, so it doesn't look any further Change the order of testing the threshold values -- Kind regards, Niek Otten Microsoft MVP - Excel "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%, but it will not calculate the 75% or 100%, it just stays at 50% |
#8
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Yes, but why do the unncessary ANDs, Dave? Why test for F5=3000, as you've
already tested for F5<3000? And let's guess that the OP may have wanted his percentages as numbers, not as text strings. =IF(F5<3000,"25%",IF(AND(F5=3000,F5<5000),"50%",I F(AND(F5=5000,F5<7000),"75%",IF(F5=7000,"100%")) )) can be shortened to =IF(F5<3000,25%,IF(F5<5000,50%,IF(F5<7000,75%,100% ))) -- David Biddulph "CurlyDave" wrote in message ... This should work =IF(F5<3000,"25%",IF(AND(F5=3000,F5<5000),"50%",I F(AND (F5=5000,F5<7000),"75%",IF(F5=7000,"100%")))) On Feb 13, 6:14 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%, but it will not calculate the 75% or 100%, it just stays at 50% |
#9
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks to all.
"David Biddulph" wrote: Defintely not pretty, and unnecessarily complicated. You don't need the various AND functions, because, for example, you have already tested for F5<3000 and hence you don't need to test for F5=3000. =IF(F5<3000,25%,IF(AND(F5=3000,F5<5000),50%,IF(AN D(F5=5000,F5<7000),75%,100%))) can be shortened to =IF(F5<3000,25%,IF(F5<5000,50%,IF(F5<7000,75%,100% ))) -- David Biddulph "BT" wrote in message ... Hi George Not pretty, but it works. Have you considered a lookup? =IF(F5<3000,25%,IF(AND(F5=3000,F5<5000),50%,IF(AN D(F5=5000,F5<7000),75%,100%))) Regards BT "Niek Otten" wrote: That is because 500 and 700 are = 3000, so it doesn't look any further Change the order of testing the threshold values -- Kind regards, Niek Otten Microsoft MVP - Excel "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%, but it will not calculate the 75% or 100%, it just stays at 50% |
#10
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
On Feb 13, 4:14*pm, 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%, but it will not calculate the 75% or 100%, it just stays at 50% Try this one =IF(F5<3000,"25%",IF(F5<5000,"50%",IF(F5<7000000," 75%","100%"))) In your formula. if a number is bigger than 3000, then obviously it will be greater than 5000 and 7000 therefore it will never pass this step. HTH |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
some help with an IF formual or something like it | Excel Worksheet Functions | |||
Formual | Excel Worksheet Functions | |||
WHAT DOES FORMUAL =C8+ 15 DO | Excel Discussion (Misc queries) | |||
Formual | Excel Discussion (Misc queries) | |||
Set Formual | Excel Discussion (Misc queries) |