logical & count functions
TRANSCRIPT
-
8/7/2019 Logical & count functions
1/4
Kthe king
1
LOGICAL FUNCTIONS
1. AND
Syntax: = AND (logical 1, logical 2 ...)
Returns TRUE if all its arguments are TRUE; returns FALSE if one ormore argument is FALSE.
Logical1, logical2 ... are 1 to 30 conditions you want to test that can beeither TRUE or FALSE.
Logic 1 Logic 2 RESULT
TRUE TRUE TRUEFALSE FALSE FALSETRUE FALSE FALSEFALSE FALSE FALSE
EX: =AND(35>23,21>19) TRUE
2. OR
Syntax: = OR (logical1, logical2...)
Returns TRUE if any argument is TRUE; returns FALSE if all argumentsare FALSE.
Logical1, logical2... are 1 to 30 conditions you want to test that can beeither TRUE or FALSE.
Logic 1 Logic 2 RESULT
TRUE TRUE TRUEFALSE FALSE TRUETRUE FALSE TRUEFALSE FALSE FALSE
EX: = OR (3>2, 4>5) TRUE
-
8/7/2019 Logical & count functions
2/4
Kthe king
2
3. IF
Syntax: = IF (logical_test, value_if_true, value_if_false)
Returns one value if a condition you specify evaluates to TRUE andanother value if it evaluates to FALSE. Use IF to conduct conditional tests onvalues and formulas.
A2 A3 A4
Blue dry nice day
Cloudy dry bring umbrella
EX : =IF(AND(A2="blue",B2="dry"),C2,C3) nice day
4. NOT
Syntax : = NOT ( logical )
Reverses the value of its argument. Use NOT when you want tomake sure a value is not equal to one particular value.
Logical is a value or expression that can be evaluated to TRUE orFALSE.
EX : =NOT ( 3>4 ) TRUE
-
8/7/2019 Logical & count functions
3/4
Kthe king
3
COUNTING FUNCTIONS
A B C D E
1 ROLL NO
EXAM
NAME DATE
CLEARED OR
NOT ? MARKS2 1 C 1/12/2009 # 203 2 C++ 2/12/2009 234 3 JAVA 3/12/2009 # 535 4 VB 4/12/2009 486 5 VB .NET 5/12/2009 # 727 68 COUNT 0 5 0 59 COUNTA 5 5 3 510 COUNTBLANK 1 1 3 111 COUNTIF
3
1. COUNT
Syntax: = COUNT (value1, value2...)
Counts the number of cells that contain numbers and also numbers within thelist of arguments. Use COUNT to get the number of entries in a number field that's ina range or array of numbers.
Value1, value2 ... are 1 to 30 arguments that can contain or refer to a varietyof different types of data, but only numbers are counted.
EX: = COUNT (A2:A6) Refers table
2. COUNTA
Syntax: = COUNTA (value1, value2...)
Counts the number of cells that are not empty and the values within the list of
arguments. Use COUNTA to count the number of cells that contain data in a rangeor array.
Value1, value2 ... are 1 to 30 arguments representing the values you want tocount. In this case, a value is any type of information, including empty text ("") butnot including empty cells. If an argument is an array or reference, empty cells withinthe array or reference are ignored. If you do not need to count logical values, text, orerror values, use the COUNT function.
EX : = COUNTA ( A2:A6) Refers table
-
8/7/2019 Logical & count functions
4/4
Kthe king
4
3. COUNTBLANK
Syntax: = COUNTBLANK (range)
Counts empty cells in a specified range of cells.
Range : is the range from which you want to count the blankcells.
Cells with formulas that return "" (empty text) are also counted.Cells with zero values are not counted.
EX: = COUNTBLANK (A2: A6) Refers table
4. COUNTIF
Syntax : = COUNTIF ( range, criteria )
Counts the number of cells within a range that meet the givencriteria.
Range is the range of cells from which you want to count cells.
Criteria is the criteria in the form of a number, expression, or text
that defines which cells will be counted. For example, criteria can beexpressed as 32, "32", ">32", "apples".
EX: = COUNTIF (E2:E6, >35) Refers table