Documente Academic
Documente Profesional
Documente Cultură
IF Function to return Text =IF(C2>=B2,Yes,No) The formula means if C2 more or equals to B2, display Yes, else display No.
2)
IF Function to return a Value =IF(E2=Yes,(C2-B2) 1!",#) The formula calculates the commission based on a commission rate of 15% from the Total ales. This formula means if the cell !2 equals to Yes, the difference of cell C2 and cell B2 "ill multiple by 15% commission rate, else no commission is payable.
$)
Neste% IF #Note$ %a& ' () in nested* =IF(F2>1###,2##,IF(F2>!##,1##,#)) This formula means that if the commission is more than 1+++, than 2++ bonus is ,i-en, else if the commission is in bet"een 5++.1+++, 1++ bonus is ,i-en, else no bonus "ill be ,i-en.
&)
The condition being evaluated !should result in either T"#E or F$%&E' The value to display if the condition is T"#E The value to display if the condition is F$%&E
The formula below( for example( returns ) if cell $) contains *$*. If cell $) does not contain *$*( the formula returns an empty string. =IF(A1="A",1,"") For more decision-making power( you can *nest* IF functions within a formula. In other words( you can use an IF function as the second argument for an IF function. +ere's an example =IF(A1="A",1,IF(A1="B",2,IF(A1="C",3,""))) This formula checks cell $). If it contains *$*( the formula returns ). If it doesn't contain *$*( then the second argument is evaluated. The second argument contains another IF function that determines if $) contains a *,*. If so( the formula returns -. if not( the formula evaluates the IF function contained in the second argument and checks to see if $) contains */*. If so( it returns 0. otherwise( it returns an empty string. Excel allows up to seven levels of nested IF functions. The formula below works correctly( but Excel will not allow you to nest the IF functions any deeper than this. =IF(A1="A",1,IF(A1="B",2,IF(A1="C",3,IF(A1="D",4, IF(A1="E",5,IF(A1="F",6,IF(A1="G",7,IF(A1="H",8,"")))))))) The sections that follow present various ways to get around the limit of seven nested IF functions. ,e aware that these techni1ues may not be appropriate for all situations.
=CO CA!E A!E(IF(A1="A",1,""),IF(A1="B",2,""),IF(A1="C",3,""), IF(A1="D",4,""),IF(A1="E",5,""),IF(A1="F",6,""),IF(A1="G",7,""), IF(A1="H",8,""),IF(A1="I",",""),IF(A1="#",10,"")) The /39/$TE9$TE function can handle as many as 06 arguments -- which e1uates to testing 06 different conditions. $nd( as $lan :illiams pointed out( you can avoid using the /39/$TE9$TE function and use the concatenation operator !;' =IF(A1="A",1,"")$IF(A1="B",2,"")$IF(A1="C",3,"") $IF(A1="D",4,"")$IF(A1="E",5,"")$IF(A1="F",6,"") $IF(A1="G",7,"")$IF(A1="H",8,"")$IF(A1="I",","") $IF(A1="#",10,"") This method is not limited to 06 comparisons.
Use
oolean multi!lication
$nother alternative( suggest by <aniel Filer is to use ,oolean multiplication. This techni1ue takes advantage of the fact that( when multiplying( T"#E is treated as ) and F$%&E is treated as 6. +ere's an example =(A1="A")%1&(A1="B")%2&(A1="C")%3&(A1="D")%4&(A1="E")%5 &(A1="F")%6&(A1="G")%7&(A1="H")%8&(A1="I")%"&(A1="#")%10