ITC Session 6 by Email
ITC Session 6 by Email
Trim(Text)
Removes
spaces from start and end of text string all except single spaces between words
Clean(Text)
Removes
some non-printing characters from text
characters 0 to 31, 129, 141, 143, 144, and 157
If
value_if_true Required.
value_if_false Optional.
Up to 64 IF functions can be nested as value_if_true and value_if_false arguments to construct more elaborate tests.
Alternatively, to test many conditions, consider using the LOOKUP, VLOOKUP, HLOOKUP, or CHOOSE functions
If any of the arguments to IF are arrays, every element of the array is evaluated when the IF statement is carried out
6
=IF(A1>=0,0,A1)
If the value of A1 is greater than or equal to 0 (zero), show 0; otherwise, show the value of A1
IF(C10=AVERAGE(D1:D5),C10,"Out of Range"
If the average of D1:D5 is equal to C10, show that average; otherwise, show the text Out of Range
10
IF Examples: If the value of C6 is not equal to the value of A12 plus 14, display the text "Invalid"; otherwise, display the value of C6
=IF(C6<>A12+14,"Invalid",C6)
If the value of B4 is greater than the sum of A1:A12, multiply C10 by 1.25; otherwise, multiply C10 by 0.75
=IF(B4>SUM(A1:A12),C10*1.25,C10*0.75)
11
Nested IF Functions
=IF(condition1,expression1,IF(condition2,expression2,expression3))
=IF(A1<0,10,IF(A1=0,20,30)) entered in B2
if A1 contains a negative number, B2 contains 10 Otherwise, if A1 contains 0, B2 contains 20 Otherwise (meaning that A1 must contain a positive value), B2 contains 30
12
Using Boolean Logical Functions to Evaluate a List of Values and Determine a Single True or False Value
AND OR NOT Used to determine if all arguments are TRUE Used to determine if either argument is TRUE Evaluates only one logical argument to determine if it is FALSE
13
14
15
results in expression1 if both condition1 and condition2 are true Otherwise, it results in expression2
=IF(OR(condition1,condition2),expression1 ,expression2)
results in expression1 if either condition1 or condition2 is true (or if both are true) Otherwise, it results in expression2
Note that any number of conditions, not just two, could be included in the AND/ OR, all separated by commas
16
Key
pay careful attention to the parentheses.
Excel helps you by color-coding pairs of parentheses.
17
18
COUNTIF(range, criteria)
range Required
One or more cells to count, including numbers or names, arrays, or references that contain numbers. Blank and text values are ignored.
criteria Required
A number, expression, cell reference, or text string that defines which cells will be counted.
For example, criteria can be expressed as 32, ">32", B4, "apples", or "32".
Wildcard characters, the question mark (?) and the asterisk (*), can be used in criteria
A question mark matches any single character, and An asterisk matches any sequence of characters
If needed to find an actual question mark or asterisk, type a tilde ( ~) before the character
=COUNTIF(A1:C12,100)
Counts the number of cells containing the value 100.
=COUNTIF(A1:C12,"L*")
Counts the number of cells containing text entries that begin with the letter L
=COUNTIF(A1:C12,">0")
Counts the number of cells containing numeric values greater than zero
=COUNTIF(A1:C12,"<"&B2)
Counts the number of cells containing numeric values less than the numeric value in cell B2. The comparison operator (<) must be in quotation marks, but the cell reference can't be. The concatenation operator (&) is used to join them
20
=COUNTIF(A1:C12,TRUE)
Counts the number of cells containing the logical value TRUE (This is not the same as the text "TRUE")
=COUNTIF(A1:C12,"TRUE")
Counts the number of cells containing the word "TRUE" as a text entry
=COUNTIF(A1:C12,"<1")+COUNTIF(A1:C12,">10")
Counts the number of cells containing a numeric value less than 1 and the number of cells containing a numeric value greater than 10, and then adds the two counts
21
22
Lookup
With Vector form,
it looks for a value in a specified column or row,
LOOKUP(lookup_value,lookup_vector,result_vector)
lookup_value can be text, number, logical value, a name or a reference lookup_vector is a range with only one row or one column
23
Lookup
With Array form,
it looks in the first row or column of an array
LOOKUP(lookup_value,array)
lookup_value can be text, number, logical value, a name or a reference searches based on the array dimensions: if there are more columns than rows, it searches in the first row if equal number, or more rows, it searches first column returns value from same position in last row/column
24
Be Careful
The LOOKUP function doesn't have an option for Exact Match
If the lookup value isn't found, it matches the largest value that is less than the lookup value
If the first value in the lookup array/vector is bigger than the lookup value,
the result is an #N/A error
25
26
VLookup
VLOOKUP(lookup_value,table_array,col_index_num,range_lookup)
lookup_value:
the value that you want to look for,
a value, or a cell reference
table_array:
the lookup table
a range reference or a range name, with 2 or more columns
col_index_num:
the column that has the value you want returned, based on the column number within the table
[range_lookup]:
for an exact match, use FALSE or 0; for an approximate match, use TRUE or 1, with the lookup value column sorted in ascending order
27
VLOOKUP Function
=VLOOKUP(value,lookup table,column #,TRUE or FALSE)
28
if the fourth argument is FALSE, indicates exact match in the first column of the lookup table.
it doesn't matter whether the first column is in ascending order or not. returns an error if no exact match can be found.
Note
Because the VLOOKUP function is often copied down a column, make the second argument an absolute reference
give the lookup table a range name
29
30
The first column of the lookup table doesn't have to be in ascending order;
it can be, but order doesn't matter
31
32
33
34
35
MATCH - used when we want the position of a number in a range rather than the value
Match(lookup value, lookup range, [match type])
Lookup value is the value youre trying to match in the lookup range Lookup range is the range youre examining for a match to the lookup value Match type=0 returns the row location in the lookup range that contains the first exact match to the lookup value.
When no exact match exists and match type=0, Excel returns #N/A Most MATCH function applications use match type=0, but if match type is not included, match type=1 is assumed Use Match type 0 when the cell contents of the lookup range is unsorted
Match type=1 requires the lookup range to consist of numbers listed in ascending order.
The MATCH function then returns the row location in the lookup range (relative to the top of the lookup range) that contains the largest value in the range that is less than or equal to the lookup value
Match type=1 requires the lookup range to consist of numbers listed in descending order.
The MATCH function returns the row location in the lookup range (relative to the top of the lookup range) that contains the last value in the range that is greater than or equal to the lookup value
36
The MATCH function searches a table of data and returns the location of a desired value
=MATCH(lookup_value, table_array, match_type) The match_type parameter, can be
0
the location of the first value it finds that is equal to the value for which we are searching (default)
1
the location of the largest value that is less than or equal to our specified value (given that the data is in ascending order)
1
the location of the smallest value that is greater than or equal to our value (given that the data is in descending order
37
37
Thanks
38