101 Excel Functions PDF
101 Excel Functions PDF
exceljet.net/101-excel-functions
This guide describes important Excel functions. Click function names for more
information and detailed examples. We also have a large list of example
formulas, a more complete list of Excel functions, and video training. If you are new to
Excel formulas altogether, see this introduction.
Quick navigation
ABS, AGGREGATE, AND, AVERAGE, AVERAGEIF, AVERAGEIFS, CEILING, CHAR, CHOOSE,
CLEAN, CODE, COLUMN, COLUMNS, CONCAT, CONCATENATE, CONVERT, COUNT,
COUNTA, COUNTBLANK, COUNTIF, COUNTIFS, DATE, DATEDIF, DAY, EDATE, EOMONTH,
EXACT, FIND, FLOOR, GETPIVOTDATA, HLOOKUP, HOUR, HYPERLINK, IF, IFERROR, IFNA,
IFS, INDEX, INDIRECT, INT, ISBLANK, ISERROR, ISEVEN, ISFORMULA, ISLOGICAL,
ISNUMBER, ISODD, ISTEXT, LARGE, LEFT, LEN, LOOKUP, LOWER, MATCH, MAX, MAXIFS,
MID, MIN, MINIFS, MINUTE, MOD, MODE, MONTH, MROUND, NETWORKDAYS, NOT,
NOW, OFFSET, OR, PROPER, RAND, RANDBETWEEN, RANK, REPLACE, RIGHT, ROUND,
ROUNDDOWN, ROUNDUP, ROW, ROWS, SEARCH, SECOND, SMALL, SUBSTITUTE,
SUBTOTAL, SUM, SUMIF, SUMIFS, SUMPRODUCT, TEXT, TEXTJOIN, TIME, TODAY,
TRANSPOSE, TRIM, UPPER, VLOOKUP, WEEKDAY, WEEKNUM, WORKDAY, YEAR,
YEARFRAC
1/29
TODAY() // returns current date
NOW() // returns current time
Note: these are volatile functions and will recalculate with every worksheet change. If
you want a static value, use date and time shortcuts.
3/29
EDATE(date,6) // 6 months forward
EOMONTH(date,6) // 6 months forward (end of month)
4/29
NETWORKDAYS(start,end,holidays) // number of workdays between dates
Note: Both functions automatically skip weekends (Saturday and Sunday) and will also
skip holidays, if provided. If you need more flexibility on what days are considered
weekends, see the WORKDAY.INTL function and NETWORKDAYS.INTL function.
5/29
Engineering
CONVERT
Most Engineering functions are pretty technical...you'll find a lot of functions for complex
numbers in this section. However, the CONVERT function is quite useful for everyday unit
conversions. You can use CONVERT to change units for distance, weight, temperature,
and much more.
Information Functions
6/29
Excel also has ISODD and ISEVEN functions will test a number to see if it's even or odd.
By the way, the green fill in the screenshot above is applied automatically with
a conditional formatting formula.
Logical Functions
Excel's logical functions are a key building block of many advanced formulas. Logical
functions return the boolean values TRUE or FALSE. If you need a primer on logical
formulas, this video goes through many examples.
7/29
=AND(B5>3,B5<9)
=OR(B5=3,B5=9)
=NOT(B5=2)
8/29
Whereas IFNA only catches an #N/A error, the IFERROR function will catch any formula
error.
Multiple IF functions can be nested together to perform more complex logical tests.
New in Excel via Office 365, the IFS function can run multiple logical tests
without nesting IFs.
=IFS(C5<60,"F",C5<70,"D",C5<80,"C",C5<90,"B",C5>=90,"A")
=VLOOKUP(C5,$F$5:$G$7,2,TRUE)
=HLOOKUP(C5,$G$4:$I$5,2,TRUE)
10/29
=INDEX(C5:E12,MATCH(H4,B5:B12,0),MATCH(H5,C4:E4,0))
Both the INDEX function and the MATCH function are powerhouse functions that turn up
in all kinds of formulas.
LOOKUP
The LOOKUP function has default behaviors that make it useful when solving certain
problems. LOOKUP assumes values are sorted in ascending order and always performs
an approximate match. When LOOKUP can't find a match, it will match the next smallest
value. In the example below we are using LOOKUP to find the last entry in a column:
The row function also shows up often in advanced formulas that process data with
relative row numbers.
Note ROWS returns a count of data rows in a table, excluding the header row. By the
way, here are 23 things to know about Excel Tables.
HYPERLINK
12/29
You can use the HYPERLINK function to construct a link with a formula. Note
HYPERLINK lets you build both external links and internal links:
=HYPERLINK(C5,B5)
GETPIVOTDATA
The GETPIVOTDATA function is useful for retrieving information from existing pivot
tables.
=GETPIVOTDATA("Sales",$B$4,"Region",I6,"Product",I7)
CHOOSE
The CHOOSE function is handy any time you need to make a choice based on a number:
13/29
=CHOOSE(2,"red","blue","green") // returns "blue"
TRANSPOSE
The TRANSPOSE function gives you an easy way to transpose vertical data to horizontal,
and vice versa.
{=TRANSPOSE(B4:C9)}
Note: TRANSPOSE is a formula and is therefore dynamic. If you just need to do a one-
time transpose operation, use Paste Special instead.
OFFSET
The OFFSET function is useful for all kinds of dynamic ranges. From a starting location, it
lets you specify row and column offsets, and also the final row and column size. The
result is a range that can be respond dynamically to changing conditions and inputs. You
14/29
can feed this range to other functions, as in the screen below, where OFFSET builds a
range that is fed to the SUM function:
=SUM(OFFSET(B4,1,I4,4,1)) // sum of Q3
INDIRECT
The INDIRECT function allows you to build references as text. This concept is a bit tricky
to understand at first, but it can be useful in many situations. Below, we are using
INDIRECT to get values from cell A1 in 5 different worksheets. Each reference is dynamic.
If a sheet name changes, the reference will update.
=INDIRECT(B5&"!A1") // =Sheet1!A1
The INDIRECT function is also used to "lock" references so they won't change, when rows
or columns are added or deleted. For more details, see linked examples at the bottom of
the INDIRECT function page.
Caution: both OFFSET and INDIRECT are volatile functions and can slow down large or
complicated spreadsheets.
15/29
STATISTICAL Functions
16/29
=COUNTIF(C5:C12,"red") // count red
=COUNTIF(F5:F12,">50") // count total > 50
=COUNTIFS(C5:C12,"red",D5:D12,"TX") // red and tx
=COUNTIFS(C5:C12,"blue",F5:F12,">50") // blue > 50
=SUM(F5:F12) // everything
=SUMIF(C5:C12,"red",F5:F12) // red only
=SUMIF(F5:F12,">50") // over 50
=SUMIFS(F5:F12,C5:C12,"red",D5:D12,"tx") // red & tx
=SUMIFS(F5:F12,C5:C12,"blue",F5:F12,">50") // blue & >50
17/29
=AVERAGE(F5:F12) // all
=AVERAGEIF(C5:C12,"red",F5:F12) // red only
=AVERAGEIFS(F5:F12,C5:C12,"red",D5:D12,"tx") // red and tx
18/29
=MAX(data) // largest
=MIN(data) // smallest
=LARGE(data,1) // 1st largest
=LARGE(data,2) // 2nd largest
=LARGE(data,3) // 3rd largest
=SMALL(data,1) // 1st smallest
=SMALL(data,2) // 2nd smallest
=SMALL(data,3) // 3rd smallest
MINIFS, MAXIFS
The MINIFS and MAXIFS. These functions let you find minimum and maximum values
with conditions:
Note: MINIFS and MAXIFS are new in Excel via Office 365.
MODE
The MODE function returns the most commonly occurring number in a range:
19/29
=MODE(B5:G5) // returns 1
RANK
To rank values largest to smallest, or smallest to largest, use the RANK function:
MATH Functions
ABS
To change negative values to positive use the ABS function.
20/29
=ABS(-134.50) // returns 134.50
21/29
MROUND, CEILING, FLOOR
To round values to a the nearest multiple use the MROUND function. The FLOOR
function and CEILING function also round to a given multiple. FLOOR forces rounding
down, and CEILING forces rounding up.
MOD
The MOD function returns the remainder after division. This sounds boring and geeky,
but MOD turns up in all kinds of formulas, especially formulas that need to do something
"every nth time". In the screen below, you can see how MOD returns zero every third
number when the divisor is 3:
22/29
SUMPRODUCT
The SUMPRODUCT function is powerful and versatile tool when dealing with all kinds
data. You can use SUMPRODUCT to easily count and sum based on criteria, and you can
use it in elegant ways that just don't work with COUNTIFS and SUMIFS. In the screen
below, we are using SUMPRODUCT to count and sum orders in March. See the
SUMPRODUCT page for details and links to many examples.
SUBTOTAL
The SUBTOTAL function is an "aggregate function" that can perform a number of
operations on a set of data. All told, SUBTOTAL can perform 11 operations,
including SUM, AVERAGE, COUNT, MAX, MIN, etc. (see this page for the full list). The key
23/29
feature of SUBTOTAL is that it will ignore rows that have been "filtered out" of an Excel
Table, and, optionally, rows that have been manually hidden. In the screen below,
SUBTOTAL is used to count and sum only the 7 visible rows in the table:
AGGREGATE
Like SUBTOTAL, the AGGREGATE function can also run a number of aggregate operations
on a set of data and can optionally ignore hidden rows. The key differences are that
AGGREGATE can run more operations (19 total) and can also ignore errors.
In the screen below, AGGREGATE is used to perform MIN, MAX, LARGE and SMALL
operations while ignoring errors. Normally, the error in cell B9 would prevent these
functions from returning a result. See this page for a full list of operations AGGREGATE
can perform.
24/29
TEXT Functions
LEN
The LEN function will return the length of a text string. LEN shows up in a lot of formulas
that count words or characters.
FIND, SEARCH
To look for specific text in a cell, use the FIND function or SEARCH function. These
functions return the numeric position of matching text, but SEARCH allows wildcards and
FIND is case-sensitive. Both functions will throw an error when text is not found, so wrap
in the ISNUMBER function to return TRUE or FALSE (example here).
25/29
=FIND("Better the devil you know","devil") // returns 12
=SEARCH("This is not my beautiful wife","bea*") // returns 12
REPLACE, SUBSTITUTE
To replace text by position, use the REPLACE function. To replace text by matching, use
the SUBSTITUTE function. In the first example, REPLACE removes the two asterisks (**)
by replacing the first two characters with an empty string (""). In the second example,
SUBSTITUTE removes all hash characters (#) by replacing "#" with "".
CODE, CHAR
To figure out the numeric code for a character, use the CODE function. To translate the
numeric code back to a character, use the CHAR function. In the example below, CODE
translates each character in column B to its corresponding code. In column F, CHAR
translates the code back to a character.
26/29
Video: How to use theCODE and CHAR functions
TRIM, CLEAN
To get rid of extra space in text, use the TRIM function. To remove line breaks and other
non-printing characters, use CLEAN.
27/29
Excel also provides the CONCATENATE function, but it doesn't offer special features. I
would't bother with it and would instead concatenate directly with the ampersand (&)
character in a formula.
EXACT
The EXACT function allows you to compare two text strings in a case-sensitive manner.
28/29
Video: How to change case with formulas
TEXT
Last but definitely not least is the TEXT function. The text function lets you apply number
formatting to numbers (including dates, times, etc.) as text. This is especially useful when
you need to embed a formatted number in a message, like "Sale ends on [date]".
29/29