# Solved How do I get my if statement to work?

May 6, 2015 at 16:56:18
Specs: Windows 7
 How to get an "IF statement to give me the results needed in my spreadsheet. Below is the formula I have tried. Example : If cell a2 has a value of 200, then I would want 80 to be the result. If the cell a2 has a value of 12.75, then I would want the result to be 12.75.=IF(a2<="80", "80"), IF(A2>"80", a2)) See More: How do I get my if statement to work?

#1 May 6, 2015 at 18:43:40
 Your bracket start-finish count doesn't match. Wait for someone more expert if this doesn't work out, but try removing the last bracket.EDIT: Also see this:http://fiveminutelessons.com/learn-...Always pop back and let us know the outcome - thanksmessage edited by Derek

Report •

#2 May 6, 2015 at 18:48:09
✔ Best Answer
 The syntax of If Function is:=IF (Logic_Test, Value_if_True, Value_if_False)So your formula should look like;=IF(A2<="80" , "80" , A2)If cell a2 has a value of 200, then I would want 80 to be the result. If the cell a2 has a value of 12.75, then I would want the result to be 12.75.This one requires a Nested IF which simply means one of the Values_if's is another IF statement:=IF(A2=200 , 80 , IF(A2=12.75 , A2 , ""))If the only two values that will ever be input into A2 are 200 or 12.75the above can be shortened to something similar to the first formula:=IF(A2=200 , 80 , A2 )Does that help?MIKEedited by moderator: SpellCheck

Report •
Related Solutions 