![if then formula excel 2013 if then formula excel 2013](https://cdn.lynda.com/course/126129/126129-16x9.jpg)
This simple macro, when added to the ThisWorkbook module, is executed every time there is a change in the workbook. If Not (Application.Intersect(Target, Range("A1")) _ ' See if the change is related to our cell Private Sub Workbook_SheetChange(ByVal Sh As Object, _ If you don't want to allow a circular reference in your worksheet, then the only recourse is to create a macro that updates the value in cell B1 based upon any changes to cell A1: Excel will now allow the circular reference without complaint. If you are using Excel 2007, choose Tools | Options | Calculation tab and make sure the Iteration check box is selected.
![if then formula excel 2013 if then formula excel 2013](https://i.ytimg.com/vi/q_2o2ZlhSME/maxresdefault.jpg)
Note that the words "under ten" are returned if the value in A1 is less than 10. For instance, let's say that your formula is in cell B1 and you are comparing something in cell A1. The obvious solution, then, is to make sure that you provide the IF function with something that should be returned when the comparison is false. (This is what Vineet is seeing returned by his IF function usage.) It is possible to leave off the last parameter, but if you do then Excel will return the value 0 if the comparison is false. The first parameter is the comparison that is to be made, the second parameter is what should be returned if the comparison is true, and the third is what should be returned if the comparison is false. The IF function can take up to three parameters. By default, however, the IF function makes the value 0 if the condition is False. In other words, the value in a cell where the IF function is used should change only if the condition being tested by the IF function is true.
![if then formula excel 2013 if then formula excel 2013](https://i.pinimg.com/originals/5c/bc/78/5cbc784d9b977fa0a64fa1306effe3aa.png)
While using the IF function, Vineet wants to retain the old value in the cell if the condition is false.