Condition in Excel (if)
when you compare things you say: if this items is cheaper than this item then I will buy the first one. Same applies in Excel. You use the IF statement.
You write If a certain condition is true then do task1 and if not true then do task2. You write it like this: IF(condition, task1 if true, task2 if false). Here some examples.
In the example, the sign > (bigger than), is the operator. There are many type of operators but these 3 are the most common ones. You can also do:
bigger or equal than: >=
smaller or equal than: <=
You can go more complex and put brackets and conditions in conditions and tasks that include formulas like folowing crazy example (which is here for no other purpose than to remind you on very important point.
if((C1+C2)>(C3+C4/4*sin(C8)), if(C1>C9,10,"a"), sum(C1;C4))
The very important point: BRACKETS are treacherous, make sure you brackets correctly. Count them or if you cannot, than split your formula in smaller ones (for example here by having another cell (for example B3 do the formula C3+C4/4*sin(C8) and than refering to B3 in the formula.
if((C1+C2)>B3, if(C1>C9,10,"a"), sum(C1;C4))
Good luck with your formulas!
Updated December 29th, 2010
You are visitor no: 4517