5 Master Excel Functions
5 Master Excel Functions
Excel
The most used functions in Excel are the functions that count and sum. You
can count and sum based on one criteria or multiple criteria.
COUNT
To count the number of cells that contain numbers, use the COUNT function.
Note: to count blank and nonblank cells in Excel, use COUNTBLANK and
COUNTA.
COUNTIF
To count cells based on one criteria (for example, greater than 9), use the
following COUNTIF function.
Note: visit our page about the COUNTIF function for many more examples.
COUNTIFS
To count rows based on multiple criteria (for example, green and greater
than 9), use the following COUNTIFS function.
SUM
To sum a range of cells, use the SUM function.
Note: visit our page about the SUM function for many more examples.
SUMIF
To sum cells based on one criteria (for example, greater than 9), use the
following SUMIF function (two arguments).
To sum cells based on one criteria (for example, green), use the following
SUMIF function (three arguments, last argument is the range to sum).
Note: visit our page about the SUMIF function for many more examples.
SUMIFS
To sum cells based on multiple criteria (for example, circle and red), use the
following SUMIFS function (first argument is the range to sum).
General note: in a similar way, you can use the AVERAGEIF function to
average cells based on one criteria and the AVERAGEIFS function to average
cells based on multiple criteria.
Explanation: the AND function returns TRUE if the first score is greater than
or equal to 60 and the second score is greater than or equal to 90, else it
returns FALSE. Visit our page about the AND function to learn more about
this Excel function.
OR
The OR function returns TRUE if any of the conditions are TRUE and returns
FALSE if all conditions are false.
Explanation: in this example, the NOT function reverses the result of the OR
function (see previous example).
Cell D3 references cell B3 and cell C3. Cell D4 references cell B4 and cell C4.
Cell D5 references cell B5 and cell C5. In other words: each cell references its
two neighbors on the left.
Absolute Reference
See the formula in cell E3 below.
The reference to cell H3 is locked (when we drag the formula down and
across). As a result, the correct lengths and widths in inches are calculated.
Visit our page about absolute reference to learn more about this type of
reference.
Mixed Reference
Sometimes we need a combination of relative and absolute reference (mixed
reference).
1. See the formula in cell F2 below.
2. We want to copy this formula to the other cells quickly. Drag cell F2 across
one cell, and look at the formula in cell G2.
Do you see what happens? The reference to the price should be a locked
reference to column B. Solution: place a $ symbol in front of the column
letter ($B2) in the formula of cell F2. In a similar way, when we drag cell F2
down, the reference to the reduction should be a locked reference to row 6.
Solution: place a $ symbol in front of the row number (B$6) in the formula of
cell F2.
Result:
Note: we don't place a $ symbol in front of the row number of $B2 (this way
we allow the reference to change from $B2 (Jeans) to $B3 (Shirts) when we
drag the formula down). In a similar way, we don't place a $ symbol in front
of the column letter of B$6 (this way we allow the reference to change from
B$6 (Jan) to C$6 (Feb) and D$6 (Mar) when we drag the formula across).
Note: use the MONTH function and the DAY function to get the month and
day of a date.
DATE function
To add a number of days to a date, use the following simple formula.
To add a number of years, months and/or days, use the DATE function.
Note: the DATE function accepts three arguments: year, month and day.
Excel knows that 6 + 2 = 8 = August has 31 days and rolls over to the next
month (23 August + 9 days = 1 September).
Current Date & Time
To get the current date and time, use the NOW function.
Note: use the MINUTE function and the SECOND function to return the
minute and second.
TIME function
To add a number of hours, minutes and/or seconds, use the TIME function.
RIGHT
To extract the rightmost characters from a string, use the RIGHT function.
MID
To extract a substring, starting in the middle of a string, use the MID
function.
LEN
To get the length of a string, use the LEN function.
Note: space (position 8) included!
FIND
To find the position of a substring in a string, use the FIND function.
Note: string "am" found at position 3. Visit our page about the FIND
function for more examples.
SUBSTITUTE
To replace existing text with new text in a string, use the SUBSTITUTE
function.
Explanation: the VLOOKUP function looks for the ID (104) in the leftmost
column of the range $E$4:$G$7 and returns the value in the same row from
the third column (third argument is set to 3). The fourth argument is set to
FALSE to return an exact match or a #N/A error if not found.