Excel Formulas & Functions
Excel Formulas & Functions
FORMULAS &
FUNCTIONS
With Best-Selling Excel instructor Chris Dutton
1 Excel Formulas 101 Syntax, reference types, errors, auditing, shortcuts, etc.
2 Conditionals & Logical Operators IF, AND, OR, NOT, ISERROR, ISNUMBER, etc.
6 Date & Time Functions DATEVALUE, TODAY/NOW, DATEDIF, YEARFRAC, EOMONTH, etc.
3 The goal of this course is to help you master the building blocks
• The beauty of Excel formulas is that no matter how complex they get, they’re ALL comprised of simple pieces.
We’ll start by mastering each individual component before combining them in more complex ways
All formulas start with Arguments are always Arguments are separated by commas in the US, but other
an equals sign surrounded by parentheses regions may use different list separators (like semi-colons)
The function name tells Excel what These are arguments, which vary by function and provide
type of operation you’re about to Excel with the info needed to evaluate a result
perform (Excel offers ~500 functions)
Note: Not all arguments are required; optional arguments are
Note: Function names aren’t case- surrounded by square brackets (like [match_type] above)
sensitive, and aren’t always required; Most functions have at least one required argument, but some
basic arithmetic and logical operations don’t require any, like ROW(), COLUMN(), TODAY() or NOW()
often don’t need one:
• = A1 + B1
• = A1 / B1
• = A1 > B1
• = A1 = B1 PRO TIP:
As you begin writing a formula, the Function ScreenTips box will guide
you through each individual argument – this is an extremely helpful tool!
Reference Ty p e s
Reference types allow you to “recycle” formulas across multiple cells, without
having to manually update your references (which would be completely impractical)
Cell references are relative by default (A1). This Relative Column & Row Relative Column, Fixed Row
allows the reference to change as the formula is
copied to new cells
PRO TIP:
Mastering reference types is my #1 tip
for working efficiently with formulas
Common Errors
Make sure that you didn’t move, delete, or replace cells that are
#REF! Formula refers to a cell that is not valid referenced in your formula
Evaluate Formula
Allows you to cycle through each
individual calculation step within a
formula, see how each component
evaluates, and pinpoint the source
of the error
1 2 3 4 5 6
PRO TIP:
Evaluate Formula is my go-to tool for breaking down complex or unfamiliar formulas
Auditing To o l s
Error Checking
Scans the sheet for errors and
provides a summary with options
to trace the source, ignore the
error, modify your options, or link
out to Microsoft support
CTRL Shortcuts
Ctrl + Arrow
• Jumps to the last cell in a data region, in the direction of the arrow
Ctrl + Shift +
Ctrl + Shift + Arrow
• Selects to the last cell in a data region, in the direction of the arrow
Ctrl + PgUp/PgDn
• Switches worksheet tabs, either to the left (PgUp) or right (PgDn)
F1
• Launches the Excel help pane (default)
• Links to the Microsoft Support website (tool-specific)
A1
F2
• Allows you to edit the active cell
F4
• Highlights cells referenced by the active formula
$A1 $A$1
F4
• Repeats the last action taken (default)
• Toggles absolute/relative cell references within a formula
A$1
F9
• Calculates all workbook formulas (when in manual mode)
• Evaluates each function argument within the formula bar
Alt – H – V – V
• Paste Special as Values
Some of my
go-to key tips
Alt – A – T
• Add or remove filters
Alt – M – V
• Evaluate Formula
Data Validation
Data Validation
Restricts the values that a user can enter into a given cell,
based on:
• Number Type (Whole vs. Decimal)
• Value (Between, Less Than, Equal To, etc) Decimal from 0 -1
List of Items
Congrats, You’re a Developer!
By definition, Excel is a full-stack development platform*; but rather than separating each layer
of the process (data, logic & presentation), Excel mixes them all within the same user interface:
DATA
BACK-END
LOGIC
VS
FRONT-END
PRESENTATION
PRESENTATION
*This is NOT a claim that Excel is always the right full-stack dev tool (or, in may cases, even a
viable one). Rather, it’s an effort to inspire users to think creatively about what Excel can do
CONDITIONAL STATEMENTS
Conditional Statements
Any test that results in either Value returned if logical Value returned if logical
TRUE or FALSE test is TRUE test is FALSE
(i.e. A1=“Google”, B2<100, etc)
= IF(B2<=0,“Yes”,”No”)
In this case we’re categorizing the Freeze column
as “Yes” if the temperature is equal to or below
32, otherwise “No”
Nested IF Statements
= IF(B2<40,”COLD”,IF(B2>80,”HOT”,”MILD”))
Excel’s AND and OR statements allow you to include multiple logical tests at once:
=IF(OR(F2=“Rain”,F2=“Snow”),“Wet",“Dry")
Here we’re categorizing conditions as “Wet” if the
precipitation type equals “rain” OR “snow”,
otherwise Conditions = “Dry”
=IF(AND(D2=“Yes”,C2>0),“Snow",IF(AND(D2=“No”,C2>0),“Rain",“None"))
If the temp is below freezing AND the amount of precipitation > 0, then Precip Type = “Snow”, if the temp is
above freezing AND the amount of precipitation >0, then Precip Type = “Rain”, otherwise Precip Type = “None”
PRO TIP:
When writing nested functions, copy/paste repetitive pieces and tweak
individual elements to save time (rather than starting from scratch)
NOT/<> Operators
If you want to evaluate a case where a logical statement is not true, you can use
either the NOT statement or a “<>” operator
=IF(NOT(C2=0),“Wet",“Dry")
=IF(C2<>0,“Wet",“Dry")
In both of these examples, we’re defining Conditions = “Wet” if the amount of precipitation is NOT equal to 0
IFERROR
=IFERROR(value, value_if_error)
PRO TIP:
If you’re writing a formula that may trigger an error (i.e. a VLOOKUP where not all values
have a match), WRITE THE FULL FORMULA FIRST then wrap it in an IFERROR statement
IS Statements
=COUNT(A2:A20)
=AVERAGE(A2:A20)
=MEDIAN(A2:A20)
=MODE(A2:A20)
=MAX(A2:A20)
=MIN(A2:A20)
=PERCENTILE(A2:A20,.25)
=PERCENTILE(A2:A20,.75)
=STDEV(A2:A20)
=VAR(A2:A20)
RANK/SMALL/LARGE
RANK(A2,A2:A8) = 2
RANK(A3,A2:A8) = 7 (lowest) The RANK function returns the rank of a
RANK(A4,A2:A8) = 6
particular number among a list of values
RANK(A5,A2:A8) = 1 (highest)
RANK(A6,A2:A8) = 4
RANK(A7,A2:A8) = 3
RANK(A8,A2:A8) = 5
LARGE(A2:A8,2) = 90
(the 2nd largest number in the array is 90)
The SMALL/LARGE functions return the
nth smallest/largest values within an array
SMALL(A2:A8,3) = 50
(the 3rd smallest number in the array is 50)
PERCENTRANK
=PERCENTRANK(array, x)
=RANDBETWEEN(0,100)
SUMPRODUCT
The SUMPRODUCT formula multiplies corresponding cells from multiple arrays and
returns the sum of the products (Note: all arrays must have the same dimensions)
SUMPRODUCT is often used with filters to calculate products only for rows that meet
certain criteria:
PRO TIP:
When you add filters to a SUMPRODUCT, you need
to change the commas to multiplication signs
SUMPRODUCT
The COUNTIF, SUMIF, and AVERAGEIF formulas calculate a sum, count, or average
based on specific criteria
=COUNTIF(range, criteria)
=SUMIF(range, criteria, sum_range)
=AVERAGEIF(range, criteria, average_range)
Which cells need to Under what condition Where are the values
match your criteria? do I want to sum, count, that I want to sum or
or average? average?
COUNTIF(B2:B20,22) = 2
SUMIF(A2:A20,“Ryan”,B2:B20) = 190
SUMIF(A2:A20,“<>Tim”,B2:B20) = 702
AVERAGEIF(A2:A20,“Maria”,B2:B20) = 45.75
COUNTIFS/SUMIFS/AVERAGEIFS
COUNTIFS, SUMIFS, and AVERAGEIFS are used when you want to evaluate a
count, sum, or average based on multiple conditions or criteria
=COUNTIFS(criteria_range1, criteria1, criteria_range2 , criteria2…)
=SUMIFS(sum_range, criteria_range1, criteria1, criteria_range2 , criteria2…)
=AVERAGEIFS(average_range, criteria_range1, criteria1, criteria_range2 , criteria2…)
COUNTIFS(B2:B13,“Search”, D2:D13,“>200”) = 3
SUMIFS(D2:D13, A2:A13,“Feb”,B2:B13,“Display”) = 734
AVERAGEIFS(D2:D13, A2:A13,“Jan”,C2:C13,“MSN”) = 263
PRO TIP:
If you use < or >, you need to add quotation
marks as you would with text (i.e. “>200”)
LOOKUP & REFERENCE FUNCTIONS
Named Ranges
Using Named Arrays can simplify a lookup function if you use the same
data array in multiple formulas
=VLOOKUP(A1,$A$1:$D$6,2)
=VLOOKUP(A1,Apparel,2)
VLOOKUP
Let’s take a look at one of Excel’s most common reference functions – VLOOKUP:
This is the value that This is where you Which column Are you trying to match the
you are trying to match are looking for the contains the data exact lookup value (0), or
in the table array lookup value you’re looking for? something similar (1)?
D2=VLOOKUP(A2, $G$1:$H$5, 2, 0)
Use HLOOKUP if your table array is transposed (variables headers listed in rows)
This is the value that This is where you Which row Are you trying to match the
you are trying to match are looking for the contains the data exact lookup value (0), or
in the table array lookup value you’re looking for? something similar (1)?
D2=HLOOKUP(A2, $H$1:$L$2, 2, 0)
With an HLOOKUP, we search for the product name
in F1:J2 and return the value from the 2nd row down
Laws of Lookups
There are two key rules that constrain VLOOKUP and HLOOKUP formulas:
2. Excel will always return the value from the top most
row or left most column of a table array when
multiple instances of the lookup value are present
PRO TIP:
Avoid breaking Law #2 by identifying a “Key”
that is common to both datasets and is unique
for every row (NOTE: Keys often take the form
of a concatenation of multiple fields)
ROW/ROWS
The ROW function returns the row number of a given reference, while the ROWS
function returns the number of rows in a given array or array formula
=ROW([reference])
=ROWS(array)
ROW(C10) = 10
This example uses an array, which is why
it includes the fancy { } signs – more on ROWS(A10:D15) = 6
that in the ARRAY functions section
ROWS({1,2,3;4,5,6}) = 2
COLUMN/COLUMNS
The COLUMN function returns the column number of a given reference, while the
COLUMNS function returns the number of columns in a given array or array formula
=COLUMN([reference])
=COLUMNS(array)
The INDEX function returns the value of a specific cell within an array
INDEX($A$1:$C$5, 5, 3) = 234
The MATCH function returns the position of a specific value within a column or row
What value are you In which row or column Are you looking for the exact
trying to find the are you looking? (must be value (0), or anything close?
position of? a 1-dimensional array)
1: Find largest value < or = lookup_value
0: Find exact lookup_value
-1: Find smallest value > or = lookup_value
MATCH(“Pliers”,$A$1:$A$5, 0) = 4
MATCH(66,$A$3:$C$3, 0) = 3
Matching the word “Pliers” in column A, we
find it in the 4th row. Matching the number
66 in row 3, we find it in the 3rd column
INDEX/MATCH
INDEX and MATCH are commonly used in tandem to act like a LOOKUP function; the
only difference is that INDEX/MATCH can find values in any column or row in an array
Example: Price Checker In this example, we want to populate the price of a given product and
size in cell B10 by returning a particular value within the array B2:D4
Considering the output of each MATCH function, the formula is just a simple INDEX:
XLOOKUP can retrieve values from a table or range by matching a lookup value,
and offers more flexibility than VLOOKUP, HLOOKUP, or INDEX & MATCH formulas
Which value are you Where are you trying Where are the values What if the lookup Are you looking for an Do you want to
looking to match? to find a match for you want to retrieve? value isn’t found in exact, approximate, or search top down
your lookup value? the lookup array? wildcard match? or bottom up?
IMPORTANT NOTE: XLOOKUP is currently only available for Office 365 subscribers
XLOOKUP VS. VLOOKUP
XLOOKUP VLOOKUP
Can retrieve a dynamic array of results Can only return a single value
Can lookup values anywhere in an array (left or Can only lookup values to the right, requires
right, horizontal or vertical) HLOOKUP for horizontal matching
Supports native wildcard text matching Does not natively support wildcard matching
Includes built-in error handling when a lookup Requires an additional IFERROR function for
value is not found error handling
Can find approximate matches in unsorted lists Requires sorted lists for approximate matching
The CHOOSE function selects a value, cell reference, or function to perform from
a list, based on a given index number
Which item in the following 1st item in 2nd item in 3rd, 4th, 5th, etc…
list should be evaluated? the list the list
The OFFSET function is similar to INDEX, but can return either the value of a cell
within an array (like INDEX) or a specific range of cells
Text functions can be used to standardize formatting, particularly the TRIM, UPPER,
LOWER, and PROPER functions:
PRO TIP:
If two text strings are identical except one has a trailing space, they will look exactly the same
but Excel will treat them as completely different values; TRIM will make them equivalent
CONCATENATE
CONCATENATE allows you to combine text, cell values, or formula outputs into a
single text string
Note: Rather than typing “=CONCATENATE(Text1, Text2…)”, you can simply
separate each piece of the resulting text string with an ampersand (“&”)
LEFT/MID/RIGHT/LEN
The LEFT, MID, and RIGHT functions return a specific number of characters from a
location within a text string, and LEN returns the total number of characters
=LEFT(text, [num_chars])
=RIGHT(text, [num_chars])
=MID(text, start_num, num_chars)
TEXT/VALUE
The TEXT function converts a numeric value to text and assigns a particular format
=TEXT(value, format_text)
Numeric value, formula that evaluates to a numeric Numeric format as a text string enclosed in
value, or reference to a cell containing a numeric quotes (i.e. “m/d/yyyy”, “$0.00” or “#,##0.00”
value
PRO TIP:
Use VALUE to convert a text string that
represents a number into a value
SEARCH/FIND
The SEARCH function returns the number of the character at which a specific
character or text string is first found (otherwise returns #VALUE! error)
What character or string Where is the text that Search from the beginning (default)
are you searching for? you’re searching or after a certain number of
through? characters?
PRO TIP:
The FIND function works exactly the same way, but is case-sensitive
IF(ISNUMBER(SEARCH
=IF(ISNUMBER(SEARCH(“Disp”,A2)),”Display”,”Other”)
Search the cells in column A for the text string “Disp” and
classify column B as “Display” if you find it, “Other” if you don’t
DATE & TIME FUNCTIONS
Date Value
Every date in Excel has an associated date value, which is how Excel
calculates the passage of time (using midnight on 1/1/1900 as the starting point)
Excel recognizes most typed dates and automatically applies a common format
(i.e. m/d/yyyy), along with an associated date value (cell format → General)
Note: If you type a date in a format that Excel does NOT recognize, it will be treated as text
and there will be no associated date value; however, you can use a DATEVALUE or
TIMEVALUE function to convert unformatted dates or times into serial values
Jan 1,1900 is the first date with an assigned date value (1). Feb 6,
2015 is the 42,041st day since 1/1/1900, so its date value = 42041
To format dates in Excel, you can either select a preset option from the “Date”
category of the “Format Cells” dialog box, OR create your own custom format
When you drag the corner of a cell containing a date, Excel automatically
applies subsequent values automatically using Fill Series options:
The TODAY() and NOW() functions return the current date or exact time
Note: These are volatile functions, meaning that they change with every worksheet calculation
PRO TIP:
Make sure to enter TODAY() and NOW() functions with both
parentheses included – these functions don’t refer to other cells
Serialization Formulas
Excel will always calculate dates and times based on their precise underlying
serial values, but what if you need to work with less-specific values, like
months instead of days, or hours instead of seconds?
The YEAR, MONTH, DAY, HOUR, MINUTE, and SECOND functions extract
individual components of a given date:
EOMONTH
Use the EOMONTH function to calculate the last day of a given month, or
to calculate the start/end dates of previous or future months
=EOMONTH(start_date, months)
Reference to the cell containing Number of months before or after the start/current date (positive
the start/current date number yields a date in the future, negative number yields a date in
the past
=EOMONTH(C2, 0)
=EOMONTH(C2, -1)+1
=EOMONTH(C2, 0)+1
YEARFRAC
YEARFRAC calculates the fraction of a year represented by the number of whole days
between two dates
If you want to know which day of the week a given date falls on, there are two
ways to do it:
1) Use a custom cell format of either “ddd” (Sat) or “dddd” (Saturday)
-Note that this doesn’t change the underlying value, only how that value is displayed
WORKDAY returns a date that is a specified number of days before or after a given start
date, excluding weekends and (optionally) holidays; NETWORKDAYS counts the
number of workdays between two dates:
DATEDIF calculates the number of days, months, or years between two dates
Reference to the cell Reference to the cell How do you want to calculate the difference?
containing the start date containing the end
“D” = # of days between dates
date
“M” = # of months between dates
“Y” = # of years between dates
“MD” = # of days between dates, ignoring months and years
PRO TIP:
If you only need to calculate the # of days between dates, just use subtraction
FORMULA-BASED FORMATS
Formula-Based Formatting
In this section we’ll introduce dynamic arrays, explore how array calculations work, and apply
powerful functions like FILTER, SORT, and UNIQUE to explore and analyze data in Excel
UNIQUE SEQUENCE
• Learn how dynamic calculations can be applied to
“legacy” functions in Excel
Dynamic array (DA) formulas are only available for Office 365 subscribers
• Users with standalone versions of Excel will not be able to use them
DA functions & spilled range references won’t work in older Excel versions
• Backwards compatibility is limited, and can lead to workbook errors
• Be mindful of this when creating workbooks that are meant to be shared!
PRO TIP: To verify whether or not you have access to dynamic array formulas, type a new DA function
(like =FILTER or =UNIQUE) into a worksheet cell to see if Excel recognizes it
THE SECTION PROJECT
THE You’ve just been hired as a Business Intelligence Analyst for Maven Recruiters*, a job
SITUATION placement agency based in the United States.
Your first task is to analyze a public dataset from Glassdoor, which tracks average salaries and
THE growth rates across a range of industries and job titles.
BRIEF Your goal is to use dynamic array formulas in Excel to explore the job landscape, compare
salary expectations, and identify high-growth opportunities for the agency.
*This data is adapted from Super Data Science sample data and is for informational purposes only . These samples are provided “as is” without warranty of any kind.
*Copyright 2021, Excel Maven & Maven Analytics, LLC
THE GLASSDOOR DATASET
Field Description
Industry The name of the industry, or job category, for each job title (17 total)
City The name of US cities where these job titles can be found (10 total)
Average Salary The average salary in 2020 for each job title in each city
The percentage change in average salary from 2019 to 2020 for each job title in
YoY % Growth each city
DYNAMIC EXCEL
Excel’s calculation engine has changed, and formulas will never be the same
Dynamic Excel
FILTER
UNIQUE
SEQUENCE
RANDARRAY
Legacy Functions
“Legacy” Excel “Dynamic” Excel
DYNAMIC EXCEL
SORT & SORTBY New dynamic array functions are now available
• Functions like SORT, FILTER and UNIQUE take advantage of the new calculation engine
FILTER
• Combining dynamic array functions can unlock brand new capabilities in Excel
UNIQUE
Dynamic array behavior applies to traditional Excel formulas as well
SEQUENCE
• Existing functions can also leverage Excel’s new calculation engine
RANDARRAY
Array functions are now simpler and easier to learn
Legacy Functions
• Traditional CSE array functions were typically only used by “experts”
• New dynamic array formulas are intuitive and user-friendly
DYNAMIC EXCEL
Formulas that can return arrays of variable size are called dynamic arrays; these
Dynamic Excel formulas are entered in a single cell and can “spill” results across an entire range
Spill Ranges
FILTER
UNIQUE
SEQUENCE
The resulting range
of cells is known as
RANDARRAY the spill range
HEY THIS IS IMPORTANT!
Legacy Functions
The formula itself only lives in
the first cell of the spilled range
SPILL RANGE PROPERTIES
The spill range contains the results of a single dynamic array formula
Dynamic Excel
#SPILL! errors occur when something is “blocking” the spill range, since Excel will not
Dynamic Excel overwrite existing values by default
• Clear any existing text, values, or merged cells from the entire spill range to fix the error
Spill Ranges
FILTER
UNIQUE
HEY THIS IS IMPORTANT!
SEQUENCE You may also see a #SPILL!
error if you try to use dynamic
array formulas inside of a table
RANDARRAY
Legacy Functions
PRO TIP: GROWING SOURCE DATA
References within dynamic array formulas do not automatically resize as you add new data, but
there are several ways to accommodate dynamic source data:
Format the data as a table and Select the extra rows to Define a dynamic named range
1 use structured references
2 accommodate new records
3 using OFFSET & COUNTA
FILTER() Filters an array of data based on specified criteria and returns the matching records
UNIQUE() Removes duplicates from an array of data and returns the unique records
SORT & SORTBY An array of cells Column # you want 1 = Ascending TRUE/1 = Sort by column
that you want to to sort by -1 = Descending FALSE/0 = Sort by row
FILTER sort (Default is 1) (Default is 1) (Default is FALSE or 0)
UNIQUE
SEQUENCE
SORT & SORTBY An array of cells Column # you want 1 = Ascending TRUE/1 = Sort by column
that you want to to sort by -1 = Descending FALSE/0 = Sort by row
FILTER sort (Default is 1) (Default is 1) (Default is FALSE or 0)
UNIQUE
SEQUENCE
Use array constants to define the The array in A2:D10 is being
sort order for multiple columns sorted by the 3rd column
RANDARRAY (Margin) in ascending order,
then the 4th column (Profit) in
descending order
Legacy Functions
SORTBY
SORT & SORTBY An array of cells that Array of cells that 1 = Ascending Additional pairs of
you want to sort you want to sort by -1 = Descending arrays to sort by
FILTER (Default is 1)
UNIQUE
Legacy Functions
This array is sorted by Profit in descending
order (even though it isn’t in the array!)
FILTER
FILTER() Filters an array of data based on specified criteria and returns the matching records
Dynamic Excel
SORT & SORTBY An array of cells that A logical test to determine An optional value to
you want to filter the filter criteria, where return if nothing passes
FILTER values of TRUE will be kept the filter criteria
UNIQUE
SEQUENCE
RANDARRAY
This array returns values from A2:C10,
where Category = Clothing
Legacy Functions
FILTER
FILTER() Filters an array of data based on specified criteria and returns the matching records
Dynamic Excel
SORT & SORTBY An array of cells that A logical test to determine An optional value to
you want to filter the filter criteria, where return if nothing passes
FILTER values of TRUE will be kept the filter criteria
UNIQUE
RANDARRAY
This array returns values from A2:C10 where
Legacy Functions Category = Clothing AND Sales > 5,000
(BOTH criteria must be met)
FILTER
FILTER() Filters an array of data based on specified criteria and returns the matching records
Dynamic Excel
SORT & SORTBY An array of cells that A logical test to determine An optional value to
you want to filter the filter criteria, where return if nothing passes
FILTER values of TRUE will be kept the filter criteria
UNIQUE
RANDARRAY
This array returns values from A2:C10 where
Legacy Functions Category = Clothing OR Sales > 5,000
(EITHER criteria must be met)
UNIQUE
UNIQUE() Removes duplicates from an array of data and returns only the unique records
Dynamic Excel
SORT & SORTBY An array of cells that TRUE/1 = Remove duplicates in columns TRUE/1 = Extract values that only appear once
you want to remove FALSE/0 = Remove duplicates in rows FALSE/0 = Extract all unique values
FILTER duplicates from (Default is FALSE or 0) (Default is FALSE or 0)
UNIQUE
SEQUENCE
Legacy Functions
UNIQUE
UNIQUE() Removes duplicates from an array of data and returns only the unique records
Dynamic Excel
SORT & SORTBY An array of cells that TRUE/1 = Remove duplicates in columns TRUE/1 = Extract values that only appear once
you want to remove FALSE/0 = Remove duplicates in rows FALSE/0 = Extract all unique values
FILTER duplicates from (Default is FALSE or 0) (Default is FALSE or 0)
UNIQUE
SEQUENCE
This array returns the Category values
from B2:B10 that appear exactly once
RANDARRAY
PRO TIP: Include multiple
Legacy Functions columns in the array to return
each unique combination of values
PRO TIP: Combining SORT, FILTER & UNIQUE
You can combine, or “nest”, multiple dynamic array functions to perform multiple operations
SORT & SORTBY Number of Number of Starting number Increment between each number
rows to return columns to return (Default is 1) (Default is 1)
FILTER
UNIQUE
PRO TIP: Nest SEQUENCE
SEQUENCE within other functions to make
them more dynamic
RANDARRAY
Legacy Functions
This generates a 10-row, 6-column array starting at 10 and
incrementing by 5 (note the numbers go left-to-right, then down)
RANDARRAY
UNIQUE
Legacy Functions
This generates a 10-row by 7-column array of
random whole numbers between 0 and 100
LEGACY FUNCTION: FREQUENCY
FREQUENCY() Returns the frequency of values in a range based on specified intervals (or bins)
Dynamic Excel
UNIQUE
SEQUENCE
=TRANSPOSE ( array )
Spill Ranges
PRO TIP: Use TRANSPOSE to “pivot” your data
SORT & SORTBY by turning rows into columns, or vice versa
An array of cells you
want to transpose
FILTER
UNIQUE
SEQUENCE
RANDARRAY
Here we’re flipping the original array in A1:C9 by
turning each column into a row
Legacy Functions
PRO TIP: JOINING ARRAYS WITH CHOOSE
The CHOOSE function can be used to combine separate cell ranges into a single array, which can be
referenced or manipulated within other formulas
=CHOOSE({1,2},F2#,G2#)
Avg Sales by Category
(using AVERAGEIF)
Raw data at the product-level PRO TIP: Using the array
constant {1,2} tells Excel to
Unique list of Categories combine both referenced
(using UNIQUE)
ranges into one dynamic array
PRO TIP: THE LET FUNCTION
LET() Allows you to declare variables, assign values, and use them within formulas
Name of the variable Value or calculation A calculation using the Additional pairs of variable
(must begin with a letter) assigned to the variable variable, or the name of names and values
another variable (optional)
The INDIRECT function returns the reference specified by a text string, and can be used
to change a cell reference within a formula without changing the formula itself
=INDIRECT(ref_text, [a1])
Which cell includes the Is your text string in A1 format (1) or R1C1 format (0)?
text that you are
evaluating?
Let’s be real, the INDIRECT function is pretty confusing at first. Here are a few more
examples that should give you a sense of how it works and why it can be useful:
SUM(D2) = 0
SUM(INDIRECT(D2)) = 16
The sum of “B3:B5” as a value doesn’t make sense, but the sum of
B3:B5 as a reference is valid – INDIRECT tells Excel to recognize
that the cell you’re referring to is a reference, not a value