=IF(J4 >= 20, A, IF(J4 < 20 AND J4 > 13, B, IF(J4 < 14 AND J4 > 8, C, IF(J4 < 8, D,0))))
The numeric values = points
The values A - D is a scoring systems that rates a person based upon their points and gives them a value from A-D.
I've been stuck on this formula for a long time and have no idea what I'm doing wrong, all help would be appretiated!
Try this:
=IF(J4 >= 20, "A", IF(J4 > 13, "B", IF(J4 > 8, "C", "D")))
Here is a formula:
=IF(20<=J4,"A",IF(13<=J4,"B",IF(8<=J4,"C",IF(J4<8,"D",0))))
You may consider to update your statement as follows.
=IF(J4<8,"D",IF(J4<14,"C",IF(J4<20,"B","A")))
You can see that it's important in this case to move in one direction, either low to high, or high to low. This allows us to return a result whenever a test returns TRUE, because we know that the previous tests have returned FALSE.
I think the syntax you're using for the AND function is wrong. You need to nest all the parameters you want to use within the AND function. like this:
=IF(AND(J4<20,J4>8),"true","false")
Another apporach assuming that the possible inputs in J4 are integers below 1000:
=IFERROR(INDEX({"A";"B";"C";"D"},MATCH(J4,{1000;19;12;7},-1)),0)
I think this one is easier to read and to maintain.
Related
I really don't know why this is not working, I want to create an additional column in excel with the following:
If the value X is lower or equal to 40, then 0, if between 41 and 55, then 1 and if greater 55, then 2.
I thought of this: =IF(x>41,0,IF(41<=x<=55,1,2)), but it does not work as it only gives me 0 and 2, but not 1...
Any idea here?
Thanks in advance!
The syntax for an Excel IF statement is:
IF(condition, value if True, value if False)
You should write your statement like this:
IF(x>55,2,IF(x>40,1,0))
On google sheets I was able to get the desired results with =IF(x>41,IF(x>=55,2,1),0). Your if statements appear to be backwards, and the double comparison statement is probably causing you to get false positives due to a partially true condition
I have a cell, and in this cell I can cycle through 1 to 15. I need another cell to check if that cell has any of these numbers: 1,3,5,7,9,11,13, and 15. If true, it outputs a 1. I couldn’t find nay examples for my specific problem, and I don’t really understand, so I need some help.
I have looked it up, but couldn’t understand it, and they don’t have g specific problem
=IF(B13=(1,3,5,7,9,11,13,15),1) this won’t work, but I imagine it to be something like this
Since they are all the ODD numbers:
=IF(ISODD(B13),1,0)
If you want specific numbers:
=IF(OR(B13={2,4,6,7}),1,0)
If 1 and 0 are your desired outputs we can remove the IF:
=--OR(B13={2,4,6,7})
Checks if the number is odd (based on the numbers you provided) and is below or equal to 15.
=IF(AND(ISODD(B13),B13<=15),1,0)
Or you could put the numbers you are checking for in a Select Case statement:
Sub CheckCell()
Dim ckNum As Integer
ckNum = Range("E25").Value
Select Case ckNum
Case 1, 3, 5, 7, 9, 11, 13, 15
Range("F25").Value = 1
Case Else
Range("F25").Value = 0
End Select
End Sub
Then you can check for any numbers you want.
I need to calculate the best 3 marks of class test assignment and get the sum of them in Excel. I am wondering what would be the formula for this. For the reference I have added an image below:
I want among (17, 1, 19, 20) I get (17, 19, 20) and the sum (17+19+20) = 56 put it in final marks column
Since you have only 4 items, it can be calculated like this
=SUM(B3:E3) - MIN(B3:E3)
You can use the LARGE() function to get the largest, second largest, third largest values and sum them all up.
=SUM(LARGE(B3:F3,1),LARGE(B3:F3,2),LARGE(B3:F3,3))
I use this to get best 4 out of 6:
=SUM(LARGE(N4:S4,{1,2,3,4}))
which for your three becomes:
=SUM(LARGE(B3:F3,{1,2,3}))
But I don't enter it as an array formula, works just fine dragged down as necessary.
I have another tricky Excel IF-Then formula that I need but I can’t figure out how to search for a solution online without knowing the correct terms to use.
What I’m trying to do is generate a result based off of 4 multiple options. This is similar to calculating someone's commission based on what price range they sell an item for.
Result =$1 for an item selling for $0-10.00
Result =$2 for an item selling between $10.01-12.50
Result =$3 for an item selling between $12.51-15.00
Result =$4 for an item selling $15.01 and up
Thanks for any help you can provide.
Let's say the selling price is in A2. We are starting from the bottom range of your pricing and using nested IF's to figure out which bucket the selling price is in. We will check if it is <= 10, if so then the result will be 1, if not then we will check if it is <= 12.50, if so then the result will be 2.. etc. Formula shown below.
=if(a2<=10,1,if(a2<=12.50,2,if(a2<=15,3,4)))
... or if the selling price was in A3,
=1+(a3>10)+(a3>12.5)+(a3>15)
A boolean TRUE is resolved as 1 when used in a maths operation like addition.
You need to use a capsuled if clause.
If is build up as following:
=if(condition, value if true, value if false)
Capsuled:
=if(condition1, value if true, if(condition2, value is true, if(...)))
The condition needs to resolve in a True/False Statement. For your case:
=if(price <= upperBound AND price >= lowerBound, commision, if(...))
If you arrange the conditions in the right order (from high to low) you do only need to type one bound per condition.
=if(price > 15, highestCommision, if(price > secondBound, Commision2, if(...)))
RESULT:
=if(A1 > 15, 4, if( A1 > 12.5, 3, if( A1 > 10, 2, 1 )))
Just for variety here is a version with vlookup:
VLOOKUP(E4,B3:C6,2,1)
and the table I used:
Corrected after Scott's comment and Jeeped's - cheers guys...
Use MATCH in its relative form. This will find where the number fits and return the relative location as a Long:
=MATCH(A1,{0,10.01,12.51,15.01})
Or if you have Office 365 Excel you can use IFS:
=IFS(A1<=10,1,A1<=12.5,2,A1<=15,3,A1>15,4)
I was trying to do a formula to see if I should or not not have a bet on something.
The formula divides two cells, then -1, then multiplies by 100 to get a percentage. If this percentage is greater to or equal to 10, I want it to say bet, if not, I want it to say Don't bet. Here is what I can't get to work now.
=IF(SUM((D27/C27)- 1) * 100) >= 10, "BET", "DON'T BET")
Your formula contains an error
=IF((SUM((D27/C27)- 1) * 100) >= 10, "BET", "DON'T BET")
^ You are missing a bracket here.