Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
"revpeachy" wrote:
Please could someone kindly check my formula: [....] =IF(G4="","",IF(G4<100%,1,IF(G4=100%,2,IF(G4=111 %,3)))) Conditions are tested left-to-right. If G4 is larger than 111%, it is also larger than 100%, which is tested first. So the formula would return 2 instead of 3 as you intended. At a minimum, try: =IF(G4="","",IF(G4<100%,1,IF(G4<111%,2,3))) More generally, especially if you might have more conditions to test in the futu =IF(G4="","",LOOKUP(G4,{0,1,1.11},{1,2,3})) That assumes G4 is never negative. If it might be, change 0 to -1E300, almost the smallest negative number that can be represented and that is easy to remember. However, in all cases, you might encounter some surprises if G4 is a calculated. It might display 100% or 111%, but that is rounded from the actual value, which might be less. The following is more reliable: =IF(G4="","",LOOKUP(ROUND(G4,2),{0,1,1.11},{1,2,3} ) Change ROUND(...,2) to ROUND(...,4) if you format G4 as Percentage with 2 decimal places, for example. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Gap check formula? | Excel Worksheet Functions | |||
Can someone please check this formula | Excel Programming | |||
Can someone check this formula please? | Excel Discussion (Misc queries) | |||
Check box and and formula | Excel Discussion (Misc queries) | |||
How do I set up a formula with a check box? | Excel Discussion (Misc queries) |