Difference between revisions of "Manuals/calci/IF"

From ZCubes Wiki
Jump to navigation Jump to search
(Created page with "<div id="16SpaceContent" align="left"><div class="ZEditBox" align="justify"> Syntax </div></div> ---- <div id="2SpaceContent" align="left"><div class="ZEditBox" align=...")
 
 
(15 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<div id="16SpaceContent" align="left"><div class="ZEditBox" align="justify">
+
<div style="font-size:30px">'''IF (condition,truepart,falsepart)'''</div><br/>
 +
*<math>condition</math> is the logical test.
 +
*<math>truepart</math> and <math>falsepart</math> are the values.
 +
**IF(), specifies a logical test to perform.
  
Syntax
+
==Description==
 +
*This function gives one value when our specified condition is TRUE and the second value when our specified condition is FALSE.
 +
*<math> IF </math> is the Conditional statement and it is  used to perform different actions based on different conditions.
 +
*In <math>IF (condition,truepart,falsepart)</math>, <math>condition </math> is the logical test or expression to evaluate.
 +
*<math> truepart</math> is any value or the string and it is displays when the specified <math> condition </math> is TRUE. 
 +
*<math>falsepart </math> is any value or the string and it is displays when the specified <math>condition</math> is FALSE.
 +
*For e.g, IF(A2>1000,"costly","cheap"). Here A2>1000 is the logical expression. Costly is the <math>truepart</math> value and cheap is the <math>falsepart</math> value.
 +
*When our mentioned amount is satisfying the <math> lt</math> then it shows "costly". Suppose our amount is not satisfying the <math>lt</math> it shows "cheap".
 +
*In CALCI we can give any number of <math>IF</math> functions can be nested as <math>truepart</math> and <math>falsepart</math> statements to give for a complicated tests.
 +
*When <math>truepart</math> and <math>falsepart</math> are calculated, <math>IF</math> returns the value returned by <math>truepart</math> or <math>falsepart</math>. 
 +
*If any of the arguments to <math>IF</math> are arrays, each element of the array is evaluated when the <math>IF</math> statement is carried out. 
 +
*We can use [[Manuals/calci/COUNTIF  | COUNTIF ]] and [[Manuals/calci/SUMIF  | SUMIF ]] functions for more to examine our data based on a condition.
  
</div></div>
+
==Examples==
----
+
1.Number=20
<div id="2SpaceContent" align="left"><div class="ZEditBox" align="justify">
+
IF(A2>=0,"positive","negative") = positive
 +
Number=-18
 +
IF(A2>=0,"positive","negative") = negative
  
Examples-1
+
2.A1= IF(ISBLANK(A1)=TRUE,"BLANK",IF(ISTEXT(A1)=TRUE,"TEXT",IF(ISNUMBER(A1)=TRUE,"NUM","")))= BLANK
  
</div></div>
+
3. A1= winter
----
+
IF(ISBLANK(A1)=TRUE,"BLANK",IF(ISTEXT(A1)=TRUE,"TEXT",IF(ISNUMBER(A1)=TRUE,"NUM",""))) = TEXT
<div id="8SpaceContent" align="left"><div class="ZEditBox" align="justify">'''<font face="Times New Roman">''''''''''''<font size="6"> </font>''' '''''''''</font>'''</div></div>
 
----
 
<div id="11SpaceContent" align="left"><div class="ZEditBox mceEditable" align="justify">
 
  
<font size="5">Description</font>
+
4. A1=10000
 +
IF(ISBLANK(A1)=TRUE,"BLANK",IF(ISTEXT(A1)=TRUE,"TEXT",IF(ISNUMBER(A1)=TRUE,"NUM","")))=NUM
  
</div></div>
+
5.C1=40,D1=90
----
+
IF(C1<D1,C1+D1,C1-D1) = 130
<div id="5SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify"> 
 
  
<font color="#484848"><font face="Arial, sans-serif"><font size="2">IF is used to conduct conditional tests on values and formulas.</font></font></font>
+
==Related Videos==
  
</div></div>
+
{{#ev:youtube|RhuD0l080kg|280|center|IF FUNCTION}}
----
 
<div id="10SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify"><font size="6">IF</font></div></div>
 
----
 
<div id="6SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify"> 
 
  
<font color="#484848"><font face="Arial, sans-serif"><font size="2">'''IF'''</font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">('''L'''</font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">'''og Test'''</font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">,</font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">'''V If true'''</font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">,'''v If false''')</font></font></font>
+
==See Also==
 +
*[[Manuals/calci/AND| AND]]
 +
*[[Manuals/calci/OR| OR]]
  
<font color="#484848"><font face="Arial, sans-serif"><font size="2">'''where Log Test'''</font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">   is any value or expression that can be evaluated to TRUE or FALSE and '''V''' </font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">'''If true'''</font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">   is the value that is returned if logical_test is TRUE and '''V''' </font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">'''If false'''</font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">   is the value that is returned if logical_test is FALSE.</font></font></font>
+
==References==
 +
*[http://www.excel-easy.com/functions/logical-functions.html Logical functions]
  
</div></div>
 
----
 
<div id="1SpaceContent" class="zcontent" align="left">
 
  
{| id="TABLE3" class="SpreadSheet blue"
 
|- class="even"
 
| class=" " |
 
| Column1
 
| Column2
 
| Column3
 
| Column4
 
|- class="odd"
 
| class=" " | Row1
 
| class="sshl_f " | 8
 
| class="sshl_f" | Alkaline
 
| class="                                                  " |
 
|
 
|- class="even"
 
| class="  " | Row2
 
| class="                                                                                                                    " |
 
|
 
| class="SelectTD" |
 
|
 
|- class="odd"
 
| Row3
 
|
 
|
 
|
 
|
 
|- class="even"
 
| Row4
 
|
 
|
 
|
 
|
 
|- class="odd"
 
| class=" " | Row5
 
|
 
|
 
|
 
|
 
|- class="even"
 
| Row6
 
|
 
|
 
|
 
|
 
|}
 
  
<div align="left">[[Image:calci1.gif]]</div></div>
 
----
 
<div id="7SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">
 
  
Examples-2
+
*[[Z_API_Functions | List of Main Z Functions]]
  
</div></div>
+
*[[ Z3 Z3 home ]]
----
 
<div id="13SpaceContent" class="zcontent" align="left">
 
 
 
{| id="TABLE5" class="SpreadSheet blue"
 
|- class="even"
 
| class=" " |
 
| Column1
 
| Column2
 
| Column3
 
| Column4
 
|- class="odd"
 
| class=" " | Row1
 
| class="sshl_f  " | 40
 
| class="sshl_f" | P
 
| class="              " |
 
| class=" " |
 
|- class="even"
 
| class="  " | Row2
 
| class="sshl_f  " | 85
 
| class="sshl_f" | A
 
| class="  " |
 
| class=" " |
 
|- class="odd"
 
| Row3
 
| class="sshl_f" | 66
 
| class="                        sshl_f  " |
 
| class=" sshl_f" |
 
| class=" sshl_f" |
 
|- class="even"
 
| Row4
 
| class="  sshl_f  " |
 
<div id="13Space_Copy" title="Click and Drag over to AutoFill other cells."></div>
 
| class="  " |
 
| class=" " |
 
| class="SelectTD  sshl_t  SelectTD" |
 
<div id="13Space_Handle" title="Click and Drag to resize CALCI Column/Row/Cell. It is EZ!"></div><div id="13Space_Copy" title="Click and Drag over to AutoFill other cells."></div>
 
|- class="odd"
 
| class=" " | Row5
 
| class="                                                                            sshl_f  " |
 
| class=" " |
 
| class=" " |
 
| class=" " |
 
|- class="even"
 
| Row6
 
| class="  " |
 
| class=" " |
 
| class=" " |
 
| class=" " |
 
|}
 
 
 
<div align="left">[[Image:calci1.gif]]</div></div>
 
----
 
<div id="14SpaceContent" class="zcontent" align="left">
 
 
 
{| id="TABLE8" class="SpreadSheet blue"
 
|- class="even"
 
| class=" " |
 
| Column1
 
| Column2
 
| Column3
 
| Column4
 
|- class="odd"
 
| class=" " | Row1
 
| class="sshl_f " | 1000
 
| class=" " | 1500
 
| class="sshl_f" | Negative
 
| class="  sshl_f   " |
 
|- class="even"
 
| class="  " | Row2
 
| class="sshl_f" | 900
 
| class="sshl_f" | 900
 
| class="                            " |
 
| class="SelectTD" |
 
|- class="odd"
 
| Row3
 
| class="sshl_f" | 650
 
| class="sshl_f" | 1000
 
|
 
|
 
|- class="even"
 
| Row4
 
| class="                                                                                                                      " |
 
|
 
|
 
|
 
|- class="odd"
 
| class=" " | Row5
 
|
 
|
 
|
 
|
 
|- class="even"
 
| Row6
 
|
 
|
 
|
 
|
 
|}
 
 
 
<div align="left">[[Image:calci1.gif]]</div></div>
 
----
 
<div id="4SpaceContent" class="zcontent" align="left">  <font color="#484848"><font face="Arial, sans-serif"><font size="2">Let's see an example in Column1Row1</font></font></font>
 
 
 
<font color="#484848"><font face="Arial, sans-serif"><font size="2">B1 = 8</font></font></font>
 
 
 
<font color="#484848"><font face="Arial, sans-serif"><font size="2">I.e.=IF(B1&lt;7,”Acid”,”Alkaline”) is Alkaline</font></font></font>
 
 
 
</div>
 
----
 
<div id="9SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">
 
 
 
Examples-3
 
 
 
</div></div>
 
----
 
<div id="12SpaceContent" class="zcontent" align="left">  <font color="#484848"><font face="Arial, sans-serif"><font size="2">Assets Liabilities</font></font></font>
 
 
 
<font color="#484848"><font face="Arial, sans-serif"><font size="2">B1= 1000 C1 =1500</font></font></font>
 
 
 
<font color="#484848"><font face="Arial, sans-serif"><font size="2">B2 =900 C2=900</font></font></font>
 
 
 
<font color="#484848"><font face="Arial, sans-serif"><font size="2">B3 = 650 C3 = 1000</font></font></font>
 
 
 
<font color="#484848"><font face="Arial, sans-serif"><font size="2">I.e = IF(B1&lt;C2,”negative equity”,”plus”) is negative equity</font></font></font>
 
 
 
</div>
 
----
 
<div id="15SpaceContent" class="zcontent" align="left"> 
 
 
 
<font color="#484848"><font face="Arial, sans-serif"><font size="2">B1 = 40</font></font></font>
 
 
 
<font color="#484848"><font face="Arial, sans-serif"><font size="2">B2 = 85</font></font></font>
 
 
 
<font color="#484848"><font face="Arial, sans-serif"><font size="2">B3 =66</font></font></font>
 
 
 
<font color="#484848"><font face="Arial, sans-serif"><font size="2">I.e =IF(B1&gt;80,”A”,IF(B1&gt;60,”B”,IF(B1&gt;30,”P”))) is P</font></font></font>
 
 
 
<font color="#484848"><font face="Arial, sans-serif"><font size="2">///rly =IF(B2&gt;80,”A”,IF(B2&gt;60,”B”,IF(B2&gt;30,”P”))) is A</font></font></font>
 
 
 
</div>
 
----
 

Latest revision as of 15:41, 3 August 2018

IF (condition,truepart,falsepart)


  • is the logical test.
  • and are the values.
    • IF(), specifies a logical test to perform.

Description

  • This function gives one value when our specified condition is TRUE and the second value when our specified condition is FALSE.
  • is the Conditional statement and it is used to perform different actions based on different conditions.
  • In , is the logical test or expression to evaluate.
  • is any value or the string and it is displays when the specified is TRUE.
  • is any value or the string and it is displays when the specified is FALSE.
  • For e.g, IF(A2>1000,"costly","cheap"). Here A2>1000 is the logical expression. Costly is the value and cheap is the value.
  • When our mentioned amount is satisfying the then it shows "costly". Suppose our amount is not satisfying the it shows "cheap".
  • In CALCI we can give any number of functions can be nested as and statements to give for a complicated tests.
  • When and are calculated, returns the value returned by or .
  • If any of the arguments to are arrays, each element of the array is evaluated when the statement is carried out.
  • We can use COUNTIF and SUMIF functions for more to examine our data based on a condition.

Examples

1.Number=20 IF(A2>=0,"positive","negative") = positive Number=-18 IF(A2>=0,"positive","negative") = negative

2.A1= IF(ISBLANK(A1)=TRUE,"BLANK",IF(ISTEXT(A1)=TRUE,"TEXT",IF(ISNUMBER(A1)=TRUE,"NUM","")))= BLANK

3. A1= winter IF(ISBLANK(A1)=TRUE,"BLANK",IF(ISTEXT(A1)=TRUE,"TEXT",IF(ISNUMBER(A1)=TRUE,"NUM",""))) = TEXT

4. A1=10000 IF(ISBLANK(A1)=TRUE,"BLANK",IF(ISTEXT(A1)=TRUE,"TEXT",IF(ISNUMBER(A1)=TRUE,"NUM","")))=NUM

5.C1=40,D1=90 IF(C1<D1,C1+D1,C1-D1) = 130

Related Videos

IF FUNCTION

See Also

References