Excel functions Flashcards
=IF
=IF(logical_test, [value_if_true], [value_if_false])
logical test: condition one wants to test.
value_if_true: value that Excel will return if the condition is true.
value_if_false: value that it will return if the condition is false.
Example:
=IF(A2>100, “Yes, “No”)
=IF output
Letters or numbers according to the [value_if_true] and the [value_if_false]
=LEFT
=LEFT(text, num_chars)
text: text string to extract characters from.
num_chars: number of characters to extract.
Example:
=LEFT(A1, 2)
=LEFT output
Specified numbers of characters.
=RIGHT
=RIGHT(text, num_chars)
text: text string to extract characters from (cell).
num_chars: number of characters to extract.
=RIGHT output
Specified number of characters.
=MID
=MID(text, start_num, num_chars)
text: string extracting characters from.
start_num: the position in the text string to start extracting characters from - counting from the left.
num_chars: the number of characters you want to extract.
Example: =MID(A1,4,3)
=MID output
Specific characters.
=CONCAT
=CONCAT(text1, [text2], …)
text1: the first text value (a cell).
Example: =CONCAT(A2, “ “, B2, “, “, C2)
Equivalent: C2&” “&D2
=TRIM
=TRIM(text)
Example: =TRIM(A1)
=TRIM output
A specific text string with no spaces at the beginning nor the end. Only one space in the middle of words.
=SUBSTITUTE
=SUBSTITUTE(text, old_text, new_text, instance_num)
text: text string to replace characters in.
old_text: the character to replace.
new_text: new character to replace it with.
=SUBSTITUTE(D2,”COMM”,”BUSI”)
=SUBSTITUTE output
A new string with the specific “substitute text” in it.
=REPLACE
=REPLACE(old_text, start_num, num_chars, new_text)
old_text: original text string to replace characters in.
start_num: the position within the text string to start replacing characters
num_chars: the number of characters to replace (# of characters to replace).
new_text: the new text string to replace the old characters with.
Example:
A1: hello
=REPLACE(A1, 2, 1, “o”)
=> hollo
=COUNTSIF
=COUNTIFS(range1, criteria1, [range2, criteria2]…)
range1: the first range of cells to evaluate using criteria1.
criteria1: the condition that must be met by the cells in range1 for the cells to be counted.
range2, criteria2: optional - additional ranges and criteria to include in the count
Example:
=COUNTIFS(A1:A10,”>10”,A1:A10,”<20”)