Home : Products : Hach WIMS : Hach WIMS Client : Documentation : Function Reference : Spread Functions : Special Functions : IF
Q10771 - INFO: IF

IF returns one value if a condition you specify is true and another value if it evaluates to false.

SYNTAX:

IF(Condition,TrueResult, FalseResult)

Condition: What Value you are testing to be either true or false, such as variable, number, equation, or mathematical statement

TrueResult: Expression which determines what to display if the Condition is true

FalseResult: Expression which determines what will be displayed if the Condition is

 

NOTES:

TrueResult and FalseResult may be cell references, numeric values, numeric expressions (calculations), String expressions, or other IF Statements. 

EXAMPLES:

IF(D5>120,E5,F5)  This statement says "if the value in cell D5 is greater than 120, then display the value in cell E5, otherwise (else), display the value of cell F5".

IF(AND(D5>120,D5<200,D5<>150),D5,"") If D5 is greater than 120 AND Less Than 200 and Not equal to 150 THEN output D5 ELSE output "" (blank).

IF(OR(D5>120,D6>120,D7>120),1,0) If D5 is greater than 120 or D6 is greater than 120 or D7 is greater than 120 THEN 1 ELSE 0.

IF(NOT(ISBLANK(B1)), B1, 1) If B1 is NOT Blank THEN B1 ELSE 1

IF(GAVG(1,1,"M")>20, 40, 30) If the Monthly average for variable 1 is greater than 20 THEN 40 ELSE 30

STR(if(B4=1,"ONE",if(B4=2,"TWO",if(B4=3,"THREE","INVALID NUMBER"))))

VAL(if(C4="ONE",1,if(C4="TWO",2,if(C4="THREE",3,-1))))

Download Example Template: Help_IF_Function.ss3 (Click here for download instructions)

 

 

 

Related Articles
No Related Articles Available.

Article Attachments
No Attachments Available.

Related External Links
No Related Links Available.
Help us improve this article...
What did you think of this article?

poor 
1
2
3
4
5
6
7
8
9
10

 excellent
Tell us why you rated the content this way. (optional)
 
Approved Comments...
No user comments available for this article.
Created on 2/15/2008 10:02 AM.
Last Modified on 2/15/2008 10:37 AM.
Last Modified by Scott Dorner.
Article has been viewed 2384 times.
Rated 0 out of 10 based on 0 votes.
Print Article
Email Article