IF X is Greater or Smaller than give an outcome - excel

I need help with the following formula for Excel.
It's not working, the only feedback I'm getting is #VALUE! outcome.
What I'm trying to do is simply:
F5≥-8 = Big,
-3≤F5≤-7.99999= Bigger,
F5≥-2.9999999 = "Blank" <--- No outcome display required
=IF((F5)>=-8, "Big"),IF((F5)>=-3, "Bigger"), IF((F5)<=-1,",")

=IF(F5>=-8, "Big",IF(F5>=-3, "Bigger", IF(F5<=-1,"Biggest","")))
I share the same thought with TotsieMae, you are absolutely right mate. The formula above is by syntax correct but logically not.
Anyway, if the formula involve too many IF functions, then it might be worth to consider an alternate form:
=IFERROR(VLOOKUP(F5,{-8,"Big";-3,"Bigger";-1,"Biggest"},2,TRUE),"Big")

Related

So I'm trying to stack up some =if(and( functions in excel, I can't seem to find the problem in the formula used, could anyone help me?

=IF(AND(F2=N2;G2>O2);"No Notificar";"Notificar";IF(AND(F2=N3;G2>O3);"No Notificar";"Notificar";IF(AND(F2=N4;G2>O4);"No Notificar";"Notificar";IF(AND(F2=N5;G2>O5);"No Notificar";"Notificar";IF(AND(F2=N6;G2>O6);"No Notificar";"Notificar";IF(AND(F2=N7;G2>O7);"No Notificar";"Notificar")))))
As #KromeWing said - you've entered too many parameters for an IF formula.
It should have a logical calculation that would return TRUE/FALSE and then what to do if it's TRUE and what to do if it's FALSE.
Currently your formula reads as:
=IF(AND(F2=N2,G2>O2),"No Notificar","Notificar",
IF(AND(F2=N3,G2>O3),"No Notificar","Notificar",
IF(AND(F2=N4,G2>O4),"No Notificar","Notificar",
IF(AND(F2=N5,G2>O5),"No Notificar","Notificar",
IF(AND(F2=N6,G2>O6),"No Notificar","Notificar",
IF(AND(F2=N7,G2>O7),"No Notificar","Notificar")))))
It should look more like:
=IF(AND(F2=N2,G2>O2),"No Notificar",
IF(AND(F2=N3,G2>O3),"No Notificar",
IF(AND(F2=N4,G2>O4),"No Notificar",
IF(AND(F2=N5,G2>O5),"No Notificar",
IF(AND(F2=N6,G2>O6),"No Notificar",
IF(AND(F2=N7,G2>O7),"No Notificar","Notificar"))))))
So if the first equation is TRUE it will show No Notificar, otherwise it will test the second equation. If all equations return FALSE then it will return Notificar.
IF has only 3 parameters.
Your consecutive IF should be the 3rd parameter, there is no 4th parameter in this formula.
You are expecting IF() to accept four arguments instead of three.
I often get messed up by nested ifs, too, and it's usually from having to think too hard.
To make things easier on yourself, both today and next month when you come back to this and have to try to figure out what the heck you were trying to do, try using alt-enter to add a new line within your formula, allowing you to format your formula like this:
=IF(test, valueIfTest,
IF(test2, valueIfTest2,
IF(test3, valueIfTest3,
...
valueIfAllTestsFail
)))
I find that as long as I stick to this format, the hardest part of the syntax is reduced to having the right number of closing parentheses at the end, but thanks to how Excel color-codes matching parentheses, I can manage that even when I'm caffeine-deprived!

EXCEL - Circular Reference Error when Entering Data

I've got another one that is really kicking my butt.
I know why the error is occurring. I just don't know how to fix it. There are a lot of IF statements so I'm thinking maybe they are arranged in a way that is causing the error. I'm sure there is a much cleaner way to write them.
Whenever I try to input data into D7 or E7 I get the circular reference error.
These are my current formulas for all relevant cells:
F7: =IF(C7<0,"FAIL",IF(OR(ISBLANK(B7),ISBLANK(C7))," ",IF(ABS(F8)<=30,"PASS","FAIL")))
G7: =IF(D7<0,"FAIL",IF(OR(ISBLANK(B7),ISBLANK(D7))," ",IF(ABS(G8)<=30,"PASS","FAIL")))
H7: =IF(E7<0,"FAIL",IF(OR(ISBLANK(B7),ISBLANK(E7))," ",IF(ABS(H8)<=30,"PASS","FAIL")))
F8: =IF(B7<0,"",IF(C7<0,"",IF(D7<0,"",IF(E7<0,"",IF(G7="FAIL","",IF(H7="FAIL","",IF(ISBLANK(B7),IF(ISBLANK(C7),"","input Lw_Lw"),IF(ISBLANK(C7),"input Lw_Up",SUM(C7-B7)))))))))
G8: =IF(B7<0,"",IF(C7<0,"",IF(D7<0,"",IF(E7<0,"",IF(F7="FAIL","",IF(H7="FAIL","",IF(ISBLANK(B7),IF(ISBLANK(D7),"","input Lw_Lw"),IF(ISBLANK(D7),"input Up_Lw",SUM(D7-B7)))))))))
H8: =IF(B7<0,"",IF(C7<0,"",IF(D7<0,"",IF(E7<0,"",IF(G7="FAIL","",IF(F7="FAIL","",IF(ISBLANK(B7),IF(ISBLANK(E7),"","input Lw_Lw"),IF(ISBLANK(E7),"input Up_Up",SUM(E7-B7)))))))))
Snip of Excel table
Any help would be much appreciated!
I worked out the following two formulas for you. Please try them.
[F7] =IF(IFERROR(ABS(F8)<=30,FALSE),"PASS","FAIL")
[F8] ==IF(ISBLANK(C7),"input "&F$3,IF(OR(COUNT($B7:$E7)<4,COUNTIF($B7:$E7,"<0")>0),"",SUM(C7-$B7)))
Copy them from F7:F8 to G7:H8.
The basic principle I applied in order to avoid a circular reference is to do all testing in row 8 with the outcome that F8 will either hold a blank or a number. Therefore "Pass" or "Fail" in row 7 can be decided based on the number: If the number is within range it's a PASS, else it's failed. Note that Abs("") will cause an error. Therefore IFERROR(ABS(F8)<=30,FALSE) will return False in case F8 = "". Effectively, this is the reverse of what I wrote in my comment above.
I looked for shorter expressions for other tests as well. Count() will only count cells with numbers in them. Therefore I use this function instead of a series of ISBLANK() queries. Similarly for COUNTIF($B7:$E7,"<0").
I used mixed absolute and relative addressing to enable copying formulas to other columns and referred to the column captions in place of repeating the same texts in the formulas.
I didn't fully test my solution. However, with my above explanation as a guide you should be able to take possession and eliminate any errors I might have left behind.

IF statement returning false with no data

I am working on an elongated IF statement that produces different outputs depending on the start of a part number e.g. 3XXXXXXX = Software, 4XXXXXXX = Hardware.
The problem I am having is that the formula outputs FALSE when a part number is yet to be given to the row.
=IF(B2>0,IF(LEFT(D2,1)="1","Assembly",IF(LEFT(D2,1)="2","Sub-Assembly",IF(LEFT(D2,1)="3","Software",IF(LEFT(D2,1)="4","Hardware",IF(LEFT(D2,1)="5","Chemical",IF(LEFT(D2,1)="6","Spare",IF(LEFT(D2,1)="7","Spare",IF(LEFT(D2,1)="8","Document",IF(LEFT(D2,1)="9","Misc",""))))))))))
Please let me know if you can spot where I am going wrong!
You have at least two other options, both of them providing you better maintainable code.
If you use Excel 2016 or higher, there is the SWITCH function. Your formula will then look much more readable:
=IF(B2>0,SWITCH(LEFT(D2,1),"1","Assembly","2","Sub-Assembly","3","Software","4","Hardware","5","Chemical","6","Spare","7","Spare","8","Document","9","Misc",""))
Even in earlier Excel versions, you may use a lookup table, which provides you much higher versatility. Create a table of your categories, you may place them in a separate sheet Categories:
Use VLOOKUP function together with IFERROR to provide the default value when not found:
=IFERROR(VLOOKUP(LEFT(D2,1),Categories!$A$1:$B$9,2,FALSE),"")
You're not putting any value for the first big condition (if B2 is not > 0)
Try this instead:
=IF(B2>0,IF(LEFT(D2,1)="1","Assembly",IF(LEFT(D2,1)="2","Sub-Assembly",IF(LEFT(D2,1)="3","Software",IF(LEFT(D2,1)="4","Hardware",IF(LEFT(D2,1)="5","Chemical",IF(LEFT(D2,1)="6","Spare",IF(LEFT(D2,1)="7","Spare",IF(LEFT(D2,1)="8","Document",IF(LEFT(D2,1)="9","Misc",""))))))))),"")
You can simplify your formula like this:
=IF(B2<=0,"",CHOOSE(LEFT(D2,1),"Assembly","Sub-Assembly","Software","Hardware",
"Chemical","Spare","Spare","Document","Misc"))

Excel formula score and award a place - Rank based on multiple parameters

Let me share the problem, where I am trying to decide the winner list comparing multiple parameters:
First of all, I need to compare the fault points. The less you have the better place you get. If the fault points are equal, then I need to compare the time. Comparing the time, the faster you performed the greater place you get (green column represents the right result).
I have used this formula:
=IF(AA16="";"";COUNTIF($Z$16:$Z$24;"<"&Z16)+1+SUMPRODUCT(--($Z$16:$Z$24=Z16);--($AA$16:$AA$24>AA16)))
However, I get a wrong comparison for the time parameter. My guess is that it is either a small issue I am having or the formula itself is completely wrong.
Thanks in advance.
Use this formula instead:
=RANK(Z16,Z$16:Z$24,1)+SUMPRODUCT((Z$16:Z$24=Z16)*(AA$16:AA$24<AA16))
See image for reference:
Looks like this might be helpful. They have an example related to breaking ties that I think will work for your scenario.
Excel Functions: Rank

I can't seem to solve an IF() false positive in Excel

Attached is a bowling sheet I have been working on to figure out my averages, and any "free game awards" I may get, as well as patches, etc...
https://dl.dropbox.com/u/3327208/excel/Bowling.xlsx
I am getting a false positive in column S.
Up till S12 the formula seems to work, in where there is a blank, and it shows me getting over 500.
The formula is:
=IF($E12>499,"X","")
Something simple and sweet or so I thought.
Now $E12 has this formula in it, which I don't see why it should affect it at all:
=IF(D12<>0,SUM($B12:$D12),"")
I tried using ISBLANK, but it seems to blow up in my face and not show anything. If someone can help me it would be greatly appreciated, thanks.
A simpler alternative
=IF(N($E12)>499,"X","")
Try this (in E9):
=IF(ISNUMBER(E9),IF($E9>499,"X",""),"")
This is likely a type comparison issue, so this only compares if the cell is actually a number.

Resources