Formula 101 - 4
Formula 101 - 4
ϭ tĞ͛ůůďĞƵƐŝŶŐdžĐĞůĨŽƌtŝŶĚŽǁƐͬW ;džĐĞůϮϬϭϯͲϮϬϭϵͿ
D/ZK^K&dy>͗ tŚĂƚLJŽƵƐĞĞŽŶLJŽƵƌƐĐƌĞĞŶǁŝůůŶŽƚĂůǁĂLJƐŵĂƚĐŚŵŝŶĞ͕ĞƐƉĞĐŝĂůůLJŝĨLJŽƵ͛ƌĞƵƐŝŶŐĂŶŽůĚĞƌǀĞƌƐŝŽŶŽĨdžĐĞů
Ϯ tĞ͛ůůĨŽĐƵƐŽŶŵĂŶLJŽĨdžĐĞů͛ƐŵŽƐƚƉŽǁĞƌĨƵů͕ǁŝĚĞůLJͲƵƐĞĚ ĨƵŶĐƚŝŽŶƐ
džĐĞů͛ƐĨŽƌŵƵůĂůŝďƌĂƌLJŝŶĐůƵĚĞƐŶĞĂƌůLJϱϬϬĨƵŶĐƚŝŽŶƐ͖ǁĞǁŽŶ͛ƚĐŽǀĞƌƐŽŵĞŽĨƚŚĞŵŽƌĞƐƉĞĐŝĂůŝnjĞĚĐĂƚĞŐŽƌŝĞƐ
&KZDh>^Θ ;ůŝŬĞ&ŝŶĂŶĐŝĂůŽƌŶŐŝŶĞĞƌŝŶŐĨƵŶĐƚŝŽŶƐͿ͕ŽƌƚŚŽƐĞǁŚŝĐŚƌĞƋƵŝƌĞŬŶŽǁůĞĚŐĞŽƵƚƐŝĚĞƚŚĞƐĐŽƉĞŽĨƚŚŝƐĐŽƵƌƐĞ
ϯ dŚĞŐŽĂůŽĨƚŚŝƐĐŽƵƌƐĞŝƐƚŽŚĞůƉLJŽƵŵĂƐƚĞƌƚŚĞďƵŝůĚŝŶŐďůŽĐŬƐ
dŚĞďĞĂƵƚLJŽĨdžĐĞůĨŽƌŵƵůĂƐŝƐƚŚĂƚŶŽŵĂƚƚĞƌŚŽǁĐŽŵƉůĞdžƚŚĞLJŐĞƚ͕ƚŚĞLJ͛ƌĞ>>ĐŽŵƉƌŝƐĞĚŽĨƐŝŵƉůĞƉŝĞĐĞƐ͘
&hEd/KE^ tĞ͛ůůƐƚĂƌƚďLJŵĂƐƚĞƌŝŶŐĞĂĐŚŝŶĚŝǀŝĚƵĂůĐŽŵƉŽŶĞŶƚďĞĨŽƌĞĐŽŵďŝŶŝŶŐƚŚĞŵŝŶŵŽƌĞĐŽŵƉůĞdžǁĂLJƐ
tŝƚŚĞƐƚͲ^ĞůůŝŶŐdžĐĞůŝŶƐƚƌƵĐƚŽƌŚƌŝƐƵƚƚŽŶ
ϰ &ĞĞůŝŶŐƐƚƵĐŬ͍tĞ͛ǀĞŐŽƚLJŽƵƌďĂĐŬ͘
/ĨLJŽƵŚĂǀĞƋƵĞƐƚŝŽŶƐĂďŽƵƚƚŚĞĐŽƵƌƐĞŵĂƚĞƌŝĂů͕ĨĞĞůĨƌĞĞƚŽƉŽƐƚĂƋƵĞƐƚŝŽŶĂŶĚǁĞ͛ůůďĞŚĂƉƉLJƚŽŚĞůƉ
&ŽƌƉƌŽũĞĐƚͲƐƉĞĐŝĨŝĐƋƵĞƐƚŝŽŶƐ͕ƌĞĐŽŵŵĞŶĚƉŽƐƚŝŶŐƚŽƚŚĞĂŶƐǁĞƌƐ͘ŵŝĐƌŽƐŽĨƚ͘ĐŽŵĐŽŵŵƵŶŝƚLJĨŽƌƵŵ
ΎŽƉLJƌŝŐŚƚDĂǀĞŶŶĂůLJƚŝĐƐ͕>>͘
KhZ^Khd>/E
ϭ džĐĞů&ŽƌŵƵůĂƐϭϬϭ ^LJŶƚĂdž͕ƌĞĨĞƌĞŶĐĞƚLJƉĞƐ͕ĞƌƌŽƌƐ͕ĂƵĚŝƚŝŶŐ͕ƐŚŽƌƚĐƵƚƐ͕ĞƚĐ͘
Ϯ ŽŶĚŝƚŝŽŶĂůƐΘ>ŽŐŝĐĂůKƉĞƌĂƚŽƌƐ /&͕E͕KZ͕EKd͕/^ZZKZ͕/^EhDZ͕ĞƚĐ͘
ϯ ĂƐŝĐ^ƚĂƚŝƐƚŝĐĂů&ƵŶĐƚŝŽŶƐ DyͬD/E͕ZE<͕ZE;Ϳ͕^hD/&^ͬKhEd/&^͕^hDWZKhd͕ĞƚĐ͘
ϰ >ŽŽŬƵƉͬZĞĨĞƌĞŶĐĞ&ƵŶĐƚŝŽŶƐ s>KK<hWͬ,>KK<hW͕/EyͬDd,͕K&&^d͕ĞƚĐ͘
ϱ dĞdžƚ&ŽƌŵƵůĂƐ dydͬs>h͕>&dͬD/ͬZ/',d͕^Z,͕dZ/D͕>E͕ĞƚĐ͘
&KZDh>^ϭϬϭ
ϲ ĂƚĞΘdŝŵĞ&ƵŶĐƚŝŽŶƐ ds>h͕dKzͬEKt͕d/&͕zZ&Z͕KDKEd,͕ĞƚĐ͘
ϳ &ŽƌŵƵůĂͲĂƐĞĚ&ŽƌŵĂƚƚŝŶŐ ƌĞĂƚŝŶŐ͕ĞĚŝƚŝŶŐ͕ĂŶĚŵĂŶĂŐŝŶŐĨŽƌŵƵůĂͲĚƌŝǀĞŶĨŽƌŵĂƚƚŝŶŐƌƵůĞƐ
ϴ ƌƌĂLJ&ŽƌŵƵůĂƐ sĞƌƚŝĐĂůͬ,ŽƌŝnjŽŶƚĂůĂƌƌĂLJƐ͕ĚŽƵďůĞƵŶĂƌLJ͕dZE^WK^͕ĞƚĐ͘
ϵ džƚƌĂŽŶƵƐ&ƵŶĐƚŝŽŶƐ ,zWZ>/E<͕/E/Zd͕t^Zs/͕&/>dZyD>͕ĞƚĐ͘
Formula Syntax Common Errors
All formulas start with Arguments are always Arguments are separated by commas in the US, but other Error Type What it means How to fix it
an equals sign surrounded by parentheses regions may use different list separators (like semi-colons)
Make sure that function names are correct, references are valid
#NAME? Excel does not recognize text in a formula and spelled properly, and quotation marks and colons are in place
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) Check that your formula isn’t trying to perform an arithmetic
#VALUE! Formula has the wrong type of argument operation on text strings or cells formatted as text
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; Check the value of your divisor; if 0 is correct, use an IF statement
Most functions have at least one required argument, but some #DIV/0! Formula is dividing by zero or an empty cell to display an alternate value if you choose
basic arithmetic and logical operations don’t require any, like ROW(), COLUMN(), TODAY() or NOW()
often don’t need one:
= A1 + B1 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
= A1 / B1
= A1 > B1
= A1 = B1 PRO TIP: Check that all references and formula arguments evaluate properly
#N/A Formula can’t find a referenced value (the most common cause is a lookup value with no match)
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 Auditing To o l 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 Trace Precedents Trace Dependents Show Formulas
Identifies cells which affect the Identifies cells which are affected by Temporarily displays all formulas in
The $ symbol is used to create fixed references. value of the one selected the value of the one selected the worksheet as text strings
You can fix entire cells ($A$1) or just the column
($A1) or row (A$1), which prevents references from
changing as the formula is copied to new cells
Fixed Column, Relative Row Fixed Column & Row
PRO TIP:
Mastering reference types is my #1 tip
for working efficiently with formulas
Ctrl + Arrow
Jumps to the last cell in a data region, in the direction of the arrow
Evaluate Formula
Allows you to cycle through each
Ctrl + Shift +
individual calculation step within a Ctrl + Shift + Arrow
formula, see how each component
evaluates, and pinpoint the source Selects to the last cell in a data region, in the direction of the arrow
of the error
Ctrl + PgUp/PgDn
PRO TIP: Switches worksheet tabs, either to the left (PgUp) or right (PgDn)
Evaluate Formula is my go-to tool for breaking down complex or unfamiliar formulas
Auditing To o l s Fn Shortcuts
F1
Error Checking
Launches the Excel help pane (default)
Scans the sheet for errors and Links to the Microsoft Support website (tool-specific)
provides a summary with options
to trace the source, ignore the
error, modify your options, or link A1
out to Microsoft support F2
Allows you to edit the active cell
Highlights cells referenced by the active formula
$A1 F4 $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
Command-Arrow Jumps to the edge of a contiguous data array CTRL-ARROW FUN FACT: You can customize your own error alerts!
List of Items
LOGIC
Alt – H – V – V DATA
Some of my VS
go-to key tips
Alt – A – T PRESENTATION
FRONT-END
Alt – M – V
Evaluate Formula
*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
IF 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)
KE/d/KE>^ddDEd^
= 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”
All C
Conditional Statements in Excel are
base
based on simple “IF/THEN” statements:
You’r
You’re basically saying “Hey Excel, if this statement is
true, do this. Otherwise, do something else.”
AND/OR Statements IFERROR
Excel’s AND and OR statements allow you to include multiple logical tests at once: The IFERROR statement is an excellent tool to eliminate annoying error messages
(#N/A, #DIV/0!, #REF!, etc.), which is particularly useful for front-end formatting
=
=IF(OR(F2=“Rain”,F2=“Snow”),“Wet",“Dry")
Here we’re categorizing conditions as “Wet” if the =IFERROR(value, value_if_error)
precipitation type equals “rain” OR “snow”,
otherwise Conditions = “Dry”
R
RANK(A2,A2:A8) = 2
R
RANK(A3,A2:A8) = 7 (lowest) The RANK function returns the rank of a
R
RANK(A4,A2:A8) = 6
particular number among a list of values
R
RANK(A5,A2:A8) = 1 (highest)
R
RANK(A6,A2:A8) = 4
R
RANK(A7,A2:A8) = 3
KDDKE^dd^&hEd/KE^ R
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)
=COUNT(A2:A20) =PERCENTRANK(array, x)
=AVERAGE(A2:A20)
=MEDIAN(A2:A20)
= What range of data Which value within the
are you looking at? range are you looking at?
=MODE(A2:A20)
=
=MAX(A2:A20)
=
=
=MIN(A2:A20)
PERCENTRANK($A$2:$A$19,
PE A14) = 100% (highest)
=PERCENTILE(A2:A20,.25)
=PERCENTILE(A2:A20,.75) PERCENTRANK($A$2:$A$19, A16) = 0% (lowest)
=STDEV(A2:A20)
=VAR(A2:A20)
=
RAND/RANDBETWEEN SUMPRODUCT
RAND() and RANDBETWEEN act like random number generators in Excel: SUMPRODUCT is often used with filters to calculate products only for rows that meet
certain criteria:
=RANDBETWEEN(0,100)
SUMPRODUCT SUMPRODUCT
The SUMPRODUCT formula multiplies corresponding cells from multiple arrays and Great, but how does it really work?
returns the sum of the products (Note: all arrays must have the same dimensions) SUMPRODUCT((A2:A17=“Shaws”)*(B2:B17=“Apple”)*C2:C17*D2:D17) = $0.50
Without using SUMPRODUCT, you could multiply SUMPRODUCT(B2:B4,C2:C4) = $7.40 If you multiply all four columns,
ONLY ROWS THAT SATISFY
quantity*price in each row and sum the products
ALL CONDITIONS WILL
PRODUCE A NON-ZERO SUM
COUNTIF/SUMIF/AVERAGEIF
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
>KK<hWΘZ&ZE&hEd/KE^
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, and AVERAGEIFS are used when you want to evaluate a
count, sum, or average based on multiple conditions or criteria Using Named Arrays can simplify a lookup function if you use the same
data array in multiple formulas
=COUNTIFS(criteria_range1, criteria1, criteria_range2 , criteria2…)
=SUMIFS(sum_range, criteria_range1, criteria1, criteria_range2 , criteria2…) For example, if you name the array from A1:D6 “Apparel”…
=AVERAGEIFS(average_range, criteria_range1, criteria1, criteria_range2 , criteria2…)
…you can write your vlookup formula in either of
the following ways:
COUNTIFS(B2:B13,“Search”, D2:D13,“>200”) = 3
SUMIFS(D2:D13, A2:A13,“Feb”,B2:B13,“Display”) = 734 =VLOOKUP(A1,$A$1:$D$6,2)
AVERAGEIFS(D2:D13, A2:A13,“Jan”,C2:C13,“MSN”) = 263 =VLOOKUP(A1,Apparel,2)
PRO TIP:
If you use < or >, you need to add quotation
marks as you would with text (i.e. “>200”)
VLOOKUP Laws of Lookups
Let’s take a look at one of Excel’s most common reference functions – VLOOKUP: There are two key rules that constrain VLOOKUP and HLOOKUP formulas:
=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup]) 1. The lookup value must be in the first column of a
VLOOKUP table array or the first row of a HLOOKUP
table array
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 2. Excel will always return the value from the top most
in the table array lookup value you’re looking for? something similar (1)? row or left most column of a table array when
multiple instances of the lookup value are present
D2=VLOOKUP(A2, $G$1:$H$5, 2, 0)
D PRO TIP:
Avoid breaking Law #2 by identifying a “Key”
To populate the Price in
that is common to both datasets and is unique
column D, we look up the
for every row (NOTE: Keys often take the form
name of the product in the
of a concatenation of multiple fields)
data array from G1:H5 and
return the value from the 2nd
column over
HLOOKUP ROW/ROWS
Use HLOOKUP if your table array is transposed (variables headers listed in 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
=HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup])
=ROW([reference])
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 =ROWS(array)
in the table array lookup value you’re looking for? something similar (1)?
ROW(C10) = 10
D2=HLOOKUP(A2, $H$1:$L$2, 2, 0)
D This example uses an array, which is why
With an HLOOKUP, we search for the product name it includes the fancy { } signs – more on ROWS(A10:D15) = 6
in F1:J2 and return the value from the 2nd row down that in the ARRAY functions section
ROWS({1,2,3;4,5,6}) = 2
COLUMN/COLUMNS MATCH
The MATCH function returns the position of a specific value within a column or row
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 =MATCH(lookup_value, lookup_array, [match_type])
=COLUMN([reference])
What value are you In which row or column Are you looking for the exact
=COLUMNS(array) 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
PRO TIP: COLUMN(C10) = 3
Leave the cell reference out and just MATCH(“Pliers”,$A$1:$A$5, 0) = 4
write ROW() or COLUMN() to return the COLUMNS(A10:D15) = 4
row or column number of the cell in
which the formula is written COLUMNS({1,2,3;4,5,6}) = 3 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 INDEX/MATCH
The INDEX function returns the value of a specific cell within an array 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
=INDEX(array, row_num, column_num)
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
What range of cells How many rows How many columns
are you looking at? down is the value over is the value you
you want? want? B10=INDEX(B2:D4, MATCH(B6,A2:A4,0), MATCH(B8,B1:D1,0))
INDEX($A$1:$C$5, 5, 3) = 234 The number of rows down to index The numberr of co columns over to
depends on what product I’m index depends on what size I’m
looking for, so we use a MATCH looking for, so we use a MATCH
In this case we’re telling Excel to find the value of a cell
function and search for the value in function and search for the value
somewhere within the array of A1:C5. Starting from the
cell B6 (in this case “Pants”) in cell B8 (in this case, “Medium”)
upper left, we move down to the 5th row and right to the
3rd column, to return the value of 234
Considering the output of each MATCH function, the formula is just a simple INDEX:
The CHOOSE function selects a value, cell reference, or function to perform from
XLOOKUP can retrieve values from a table or range by matching a lookup value, a list, based on a given index number
and offers more flexibility than VLOOKUP, HLOOKUP, or INDEX & MATCH formulas
Which item in the following 1st item in 2nd item in 3rd, 4th, 5th, etc…
Which value are you Where are you trying Where are the values What if the lookup Are youu lookin
looking for an Do
o you wa
want to list should be evaluated? the list the list
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?
XLOOKUP VLOOKUP 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
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 =OFFSET(reference, rows, columns, [height], [width])
right, horizontal or vertical) HLOOKUP for horizontal matching
Defaults to exact match Defaults to approximate match What’s your How many How many If you want to return a
starting rows down columns over multidimensional array,
point? should you should you how tall and wide should it
Supports native wildcard text matching Does not natively support wildcard matching move? move? be?
Includes built-in error handling when a lookup Requires an additional IFERROR function for An OFFSET formula where [height]=1
value is not found error handling and [width]=1 will operate exactly like an PRO TIP:
INDEX. A more common use of OFFSET Don’t use OFFSET or INDEX/MATCH when
Can find approximate matches in unsorted lists Requires sorted lists for approximate matching
is to create dynamic arrays (like the a simple VLOOKUP will do the trick
Can search top-down or bottom-up Only searches top-down Scroll Chart example in the appendix)
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 (“&”)
dyd&hEd/KE^
TRIM/UPPER/LOWER/PROPER LEFT/MID/RIGHT/LEN
Text functions can be used to standardize formatting, particularly the TRIM, UPPER, The LEFT, MID, and RIGHT functions return a specific number of characters from a
LOWER, and PROPER functions: 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)
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
TEXT/VALUE IF(ISNUMBER(SEARCH
The TEXT function converts a numeric value to text and assigns a particular format IF(ISNUMBER(SEARCH is powerful combination of functions that can be used to
classify data based on cells that contain specific strings of text
=TEXT(value, format_text)
=IF(ISNUMBER(SEARCH(find_text, within_text)),value_if_true, value_if_false)
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 Returns one value if that string is
Searches for a specific string of
text within a given cell found (TRUE), and another if it is
=“Lisa earned ”&B4 returns “Lisa earned 3725” not found (FALSE)
=IF(ISNUMBER(SEARCH(“Disp”,A2)),”Display”,”Other”)
PRO TIP:
Search the cells in column A for the text string “Disp” and
Use VALUE to convert a text string that classify column B as “Display” if you find it, “Other” if you don’t
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)
=SEARCH(find_text,
( within_text, [start_num])
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? dΘd/D&hEd/KE^
PRO TIP:
The FIND function works exactly the same way, but is case-sensitive
Date Value Fill Series
Every date in Excel has an associated date value, which is how Excel When you drag the corner of a cell containing a date, Excel automatically
calculates the passage of time (using midnight on 1/1/1900 as the starting point) applies subsequent values automatically using Fill Series options:
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)
Click the Auto Fill Options button to determine exactly which
Note: If you type a date in a format that Excel does NOT recognize, it will be treated as text values your subsequent cells should take:
and there will be no associated date value; however, you can use a DATEVALUE or
Copy Cells = Repeats the same value in all cells
TIMEVALUE function to convert unformatted dates or times into serial values
Fill Days = Increases the date by 1 day per cell
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 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
You can build your own custom
Preset Formats: Custom Format:
formats using combinations of
date/time codes. For example:
This is what the TODAY() and NOW() functions return at 5:15pm on
d = day w/out leading zero (1-31) February 6, 2015. Note that these values will automatically update
dd = day w/ leading zero (01-31) with every change made to the workbook
ddd = day-of-week (Sat)
dddd = day-of-week (Saturday)
m = month w/out leading zero (1-15)
mm = month w/ leading zero (01-15)
mmm = month abbreviation (Jan)
mmmm = full month (January) PRO TIP:
yy = last 2 digits of year (15)
yyyy = full year (2015) Make sure to enter TODAY() and NOW() functions with both
parentheses included – these functions don’t refer to other cells
(full list available at
support.office.com)
Serialization Formulas YEARFRAC
YEARFRAC calculates the fraction of a year represented by the number of whole days
Excel will always calculate dates and times based on their precise underlying between two dates
serial values, but what if you need to work with less-specific values, like
months instead of days, or hours instead of seconds? =YEARFRAC(start_date,
( end_date, [basis])
])
Option
Opt specify the type of day count to use:
0 (default) = US (NASD) 30/360
The YEAR, MONTH, DAY, HOUR, MINUTE, and SECOND functions extract Reference to the cell Reference to the cell
containing the start date containing the end 1 = actual/actual (RECOMMENDED)
individual components of a given date: date
2 = actual/360
3 = actual/365
4 = European 30/360
EOMONTH WEEKDAY
Use the EOMONTH function to calculate the last day of a given month, or If you want to know which day of the week a given date falls on, there are two
to calculate the start/end dates of previous or future months ways to do it:
1) Use a custom cell format of either “ddd” (Sat) or “dddd” (Saturday)
=EOMONTH(start_date, months)
-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 If you want to go rogue, you can adjust the style of existing
conditional formats or create your own formula-based rules
=DATEDIF(start_date,
( end_date, unit))
PRO TIP:
If you only need to calculate the # of days between dates, just use subtraction
This is where you can add, clear, and
manage your conditional formatting rules
Formula-Based Formatting zED/ZZz^
/ŶƚŚŝƐƐĞĐƚŝŽŶǁĞ͛ůůŝŶƚƌŽĚƵĐĞĚLJŶĂŵŝĐĂƌƌĂLJƐ͕ĞdžƉůŽƌĞŚŽǁĂƌƌĂLJĐĂůĐƵůĂƚŝŽŶƐǁŽƌŬ͕ĂŶĚĂƉƉůLJ
ƉŽǁĞƌĨƵůĨƵŶĐƚŝŽŶƐůŝŬĞ&/>dZ͕^KZd͕ĂŶĚhE/YhƚŽĞdžƉůŽƌĞĂŶĚĂŶĂůLJnjĞĚĂƚĂŝŶdžĐĞů
dKW/^t͛>>KsZ͗ 'K>^&KZd,/^^d/KE͗
hŶĚĞƌƐƚĂŶĚŚŽǁĚLJŶĂŵŝĐĂƌƌĂLJĐĂůĐƵůĂƚŝŽŶƐĂŶĚƐƉŝůů
LJŶĂŵŝĐdžĐĞů ^ƉŝůůZĂŶŐĞƐ
ƌĂŶŐĞƐǁŽƌŬ
ƉƉůLJƉŽǁĞƌĨƵůĂƌƌĂLJĨƵŶĐƚŝŽŶƐůŝŬĞ&/>dZ͕^KZd͕
^KZdΘ^KZdz &/>dZ
^YhEĂŶĚhE/Yh
In this example we’re formatting the cells in columns B
through H with a green fill and bold text, but only when the >ĞĂƌŶŚŽǁĚLJŶĂŵŝĐĐĂůĐƵůĂƚŝŽŶƐĐĂŶďĞĂƉƉůŝĞĚƚŽ
state name is equal to the value in cell $C$2 hE/Yh ^YhE
͞ůĞŐĂĐLJ͟ĨƵŶĐƚŝŽŶƐŝŶdžĐĞů
Note that the row label is relative (no “$”), which allows us to ŶĂůLJnjĞĚĂƚĂďLJĐŽŵďŝŶŝŶŐĚLJŶĂŵŝĐĂƌƌĂLJĨƵŶĐƚŝŽŶƐ
apply this formatting to other rows without losing functionality ZEZZz >ĞŐĂĐLJ&ƵŶĐƚŝŽŶƐ
sZ^/KE^ΘKDWd//>/dz
LJŶĂŵŝĐĂƌƌĂLJ;ͿĨŽƌŵƵůĂƐĂƌĞŽŶůLJĂǀĂŝůĂďůĞĨŽƌKĨĨŝĐĞϯϲϱƐƵďƐĐƌŝďĞƌƐ
hƐĞƌƐǁŝƚŚƐƚĂŶĚĂůŽŶĞǀĞƌƐŝŽŶƐŽĨdžĐĞůǁŝůůŶŽƚďĞĂďůĞƚŽƵƐĞƚŚĞŵ
dƌĂĚŝƚŝŽŶĂůdZ>н^,/&dнEdZ;^ͿĂƌƌĂLJĨŽƌŵƵůĂƐĂƌĞŶŽůŽŶŐĞƌŶĞĞĚĞĚ
zŽƵŽŶůLJŶĞĞĚƚŽƉƌĞƐƐŶƚĞƌĨŽƌĚLJŶĂŵŝĐĂƌƌĂLJƐ;ůŝŬĞĂŶLJŽƚŚĞƌĨƵŶĐƚŝŽŶͿ
zED/ZZz&KZDh>^ &ŽƌĐŽŵƉĂƚŝďŝůŝƚLJƉƵƌƉŽƐĞƐ͕ƚƌĂĚŝƚŝŽŶĂů^ĨŽƌŵƵůĂƐǁŝůůƐƚŝůůǁŽƌŬ
ĨƵŶĐƚŝŽŶƐΘƐƉŝůůĞĚƌĂŶŐĞƌĞĨĞƌĞŶĐĞƐǁŽŶ͛ƚǁŽƌŬŝŶŽůĚĞƌdžĐĞůǀĞƌƐŝŽŶƐ
ĂĐŬǁĂƌĚƐĐŽŵƉĂƚŝďŝůŝƚLJŝƐůŝŵŝƚĞĚ͕ĂŶĚĐĂŶůĞĂĚƚŽǁŽƌŬŬĞƌƌŽƌƐ
ĞŵŝŶĚĨƵůŽĨƚŚŝƐǁŚĞŶĐƌĞĂƚŝŶŐǁŽƌŬŬƐƚŚĂƚĂƌĞŵĞĂŶƚƚŽďĞƐŚĂƌĞĚ͊
^YhE
/ĚĞŶƚŝĨLJƚŽƉŝŶĚƵƐƚƌŝĞƐďLJƐĂůĂƌLJĂŶĚŐƌŽǁƚŚƌĂƚĞ
ZĞǀŝĞǁƉŽƉƵůĂƌũŽďƚŝƚůĞƐďLJŝŶĚƵƐƚƌLJ ZEZZz
d,
ƌĞĂƚĞĂƚŽŽůƚŽĞdžƉůŽƌĞƌĂŶĚŽŵƐĂŵƉůĞƐŽĨũŽďƚŝƚůĞƐ
K:d/s^ sŝƐƵĂůŝnjĞƚŚĞŽǀĞƌĂůůƐĂůĂƌLJĚŝƐƚƌŝďƵƚŝŽŶ >ĞŐĂĐLJ&ƵŶĐƚŝŽŶƐ
ŽŵƉĂƌĞĂǀĞƌĂŐĞũŽďƐĂůĂƌŝĞƐĂĐƌŽƐƐƚŽƉh^ĐŝƚŝĞƐ
͞>ĞŐĂĐLJ͟džĐĞů ͞LJŶĂŵŝĐ͟džĐĞů
ΎdŚŝƐĚĂƚĂŝƐĂĚĂƉƚĞĚĨƌŽŵ^ƵƉĞƌĂƚĂ^ĐŝĞŶĐĞƐĂŵƉůĞĚĂƚĂĂŶĚŝƐĨŽƌŝŶĨŽƌŵĂƚŝŽŶĂůƉƵƌƉŽƐĞƐŽŶůLJ͘dŚĞƐĞƐĂŵƉůĞƐĂƌĞƉƌŽǀŝĚĞĚ͞ĂƐŝƐ͟ǁŝƚŚŽƵƚǁĂƌƌĂŶƚLJŽĨĂŶLJŬŝŶĚ͘
ΎŽƉLJƌŝŐŚƚϮϬϮϭ͕džĐĞůDĂǀĞŶΘDĂǀĞŶŶĂůLJƚŝĐƐ͕>>
d,'>^^KKZd^d zED/y>
ƐŝŶŐůĞĨŽƌŵƵůĂŝŶĂƐŝŶŐůĞĐĞůůĐĂŶƌĞƚƵƌŶŵĂŶLJ ƌĞƐƵůƚƐ
LJŶĂŵŝĐdžĐĞů sĂůƵĞƐ͞ƐƉŝůů͟ĂĐƌŽƐƐĂĚũĂĐĞŶƚĐĞůůƐ
ZĞƐƵůƚƐĂƌĞŶŽƚŚĂƌĚͲĐŽĚĞĚ͕ĂŶĚĐĂŶĐŚĂŶŐĞĚLJŶĂŵŝĐĂůůLJǁŝƚŚƚŚĞƐŽƵƌĐĞĚĂƚĂ
^ƉŝůůZĂŶŐĞƐ
^KZdΘ^KZdz
^KZd Θ ^KZdz EĞǁĚLJŶĂŵŝĐĂƌƌĂLJĨƵŶĐƚŝŽŶƐ ĂƌĞŶŽǁĂǀĂŝůĂďůĞ
&ƵŶĐƚŝŽŶƐůŝŬĞ^KZd͕&/>dZĂŶĚhE/YhƚĂŬĞĂĚǀĂŶƚĂŐĞŽĨƚŚĞŶĞǁĐĂůĐƵůĂƚŝŽŶĞŶŐŝŶĞ
&/>dZ
ŽŵďŝŶŝŶŐĚLJŶĂŵŝĐĂƌƌĂLJĨƵŶĐƚŝŽŶƐĐĂŶƵŶůŽĐŬďƌĂŶĚŶĞǁĐĂƉĂďŝůŝƚŝĞƐŝŶdžĐĞů
&ŝĞůĚ ĞƐĐƌŝƉƚŝŽŶ
hE/Yh
/ŶĚƵƐƚƌLJ dŚĞŶĂŵĞŽĨƚŚĞŝŶĚƵƐƚƌLJ͕ŽƌũŽďĐĂƚĞŐŽƌLJ͕ĨŽƌĞĂĐŚũŽďƚŝƚůĞ;ϭϳƚŽƚĂůͿ
LJŶĂŵŝĐĂƌƌĂLJďĞŚĂǀŝŽƌĂƉƉůŝĞƐƚŽƚƌĂĚŝƚŝŽŶĂůdžĐĞůĨŽƌŵƵůĂƐĂƐǁĞůů
:ŽďdŝƚůĞ dŚĞŶĂŵĞŽĨƚŚĞũŽďƚŝƚůĞ;ϴϰƚŽƚĂůͿ ^YhE
džŝƐƚŝŶŐĨƵŶĐƚŝŽŶƐĐĂŶĂůƐŽůĞǀĞƌĂŐĞdžĐĞů͛ƐŶĞǁĐĂůĐƵůĂƚŝŽŶĞŶŐŝŶĞ
ŝƚLJ dŚĞŶĂŵĞŽĨh^ĐŝƚŝĞƐǁŚĞƌĞƚŚĞƐĞũŽďƚŝƚůĞƐĐĂŶďĞĨŽƵŶĚ;ϭϬƚŽƚĂůͿ
ZEZZz
ǀĞƌĂŐĞ^ĂůĂƌLJ dŚĞĂǀĞƌĂŐĞƐĂůĂƌLJŝŶϮϬϮϬĨŽƌĞĂĐŚũŽďƚŝƚůĞŝŶĞĂĐŚĐŝƚLJ
ƌƌĂLJĨƵŶĐƚŝŽŶƐĂƌĞŶŽǁƐŝŵƉůĞƌĂŶĚĞĂƐŝĞƌƚŽůĞĂƌŶ
dŚĞƉĞƌĐĞŶƚĂŐĞĐŚĂŶŐĞŝŶĂǀĞƌĂŐĞƐĂůĂƌLJĨƌŽŵϮϬϭϵƚŽϮϬϮϬĨŽƌĞĂĐŚũŽďƚŝƚůĞŝŶ >ĞŐĂĐLJ&ƵŶĐƚŝŽŶƐ
zŽzй'ƌŽǁƚŚ ĞĂĐŚĐŝƚLJ dƌĂĚŝƚŝŽŶĂů^ĂƌƌĂLJĨƵŶĐƚŝŽŶƐǁĞƌĞƚLJƉŝĐĂůůLJŽŶůLJƵƐĞĚďLJ͞ĞdžƉĞƌƚƐ͟
EĞǁĚLJŶĂŵŝĐĂƌƌĂLJĨŽƌŵƵůĂƐĂƌĞŝŶƚƵŝƚŝǀĞĂŶĚƵƐĞƌͲĨƌŝĞŶĚůLJ
zED/y> η^W/>>͊ZZKZ^
^KZdΘ^KZdz ^KZdΘ^KZdz
&/>dZ &/>dZ
hE/Yh hE/Yh
,zd,/^/^/DWKZdEd͊
^YhE ^YhE zŽƵŵĂLJĂůƐŽƐĞĞĂη^W/>>͊
ĞƌƌŽƌŝĨLJŽƵƚƌLJƚŽƵƐĞĚLJŶĂŵŝĐ
dŚĞƌĞƐƵůƚŝŶŐƌĂŶŐĞ
ŽĨĐĞůůƐŝƐŬŶŽǁŶĂƐ ĂƌƌĂLJĨŽƌŵƵůĂƐŝŶƐŝĚĞŽĨĂƚĂďůĞ
ZEZZz ƚŚĞƐƉŝůůƌĂŶŐĞ ZEZZz
,zd,/^/^/DWKZdEd͊
>ĞŐĂĐLJ&ƵŶĐƚŝŽŶƐ
dŚĞĨŽƌŵƵůĂŝƚƐĞůĨŽŶůLJůŝǀĞƐŝŶ >ĞŐĂĐLJ&ƵŶĐƚŝŽŶƐ
ƚŚĞĨŝƌƐƚĐĞůůŽĨƚŚĞƐƉŝůůĞĚƌĂŶŐĞ
^W/>>ZE'WZKWZd/^ WZKd/W͗'ZKt/E'^KhZd
hE/Yh ^ƉŝůůƌĂŶŐĞƐĂƌĞŚŝŐŚůŝŐŚƚĞĚǁŝƚŚĂ
ďůƵĞďŽƌĚĞƌǁŚĞŶƐĞůĞĐƚĞĚ
^YhE dŚŝƐŶĂŵĞĚƌĂŶŐĞǁŝůůŐƌŽǁĂƐ
^ƉŝůůĞĚƌĂŶŐĞƐƵƉĚĂƚĞĂƵƚŽŵĂƚŝĐĂůůLJĂŶĚ ŶĞǁŝƚĞŵƐĂƌĞĂĚĚĞĚƚŽĐŽůƵŵŶ
ƌĞƐŝnjĞ ƚŽĨŝƚƚŚĞƌĞƐƵůƚŝŶŐĂƌƌĂLJ
ZEZZz
ŶLJŶĞǁƌŽǁƐ dŚĞƐĞƌŽǁƐǁŝůůďĞ
dŚĞ͞η͟ƐLJŵďŽůĐĂŶďĞƵƐĞĚƚŽ ǁŝůůďĞŝŶĐůƵĚĞĚ ŝŶĐůƵĚĞĚ;нďůĂŶŬƐͿ
>ĞŐĂĐLJ&ƵŶĐƚŝŽŶƐ ƌĞĨĞƌĞŶĐĞĂŶĞŶƚŝƌĞƐƉŝůůĞĚƌĂŶŐĞ
zED/ZZz&hEd/KE^ ^KZd
^KZd;Ϳ ^ŽƌƚƐĂŶĂƌƌĂLJŽĨĚĂƚĂďLJŽŶĞŽƌŵŽƌĞĐŽůƵŵŶƐŝŶƚŚĞĂƌƌĂLJ
^KZd;Ϳ ^ŽƌƚƐĂŶĂƌƌĂLJŽĨĚĂƚĂďLJŽŶĞŽƌŵŽƌĞĐŽůƵŵŶƐŝŶƚŚĞĂƌƌĂLJ LJŶĂŵŝĐdžĐĞů
с^KZd ;ĂƌƌĂLJ͕ƐŽƌƚͺŝŶĚĞdž͕ƐŽƌƚͺŽƌĚĞƌ͕ďLJͺĐŽůͿ
^ƉŝůůZĂŶŐĞƐ
^KZdz;Ϳ ^ŽƌƚƐĂŶĂƌƌĂLJŽĨĚĂƚĂďLJŽŶĞŽƌŵŽƌĞĐŽůƵŵŶƐŝŶĂŶŽƚŚĞƌĂƌƌĂLJ
^KZdΘ^KZdz ŶĂƌƌĂLJŽĨĐĞůůƐ ŽůƵŵŶηLJŽƵǁĂŶƚ ϭсƐĐĞŶĚŝŶŐ dZhͬϭс^ŽƌƚďLJĐŽůƵŵŶ
ƚŚĂƚLJŽƵǁĂŶƚƚŽ ƚŽƐŽƌƚďLJ ͲϭсĞƐĐĞŶĚŝŶŐ &>^ͬϬс^ŽƌƚďLJƌŽǁ
&/>dZ;Ϳ &ŝůƚĞƌƐĂŶĂƌƌĂLJŽĨĚĂƚĂďĂƐĞĚŽŶƐƉĞĐŝĨŝĞĚĐƌŝƚĞƌŝĂĂŶĚƌĞƚƵƌŶƐƚŚĞŵĂƚĐŚŝŶŐƌĞĐŽƌĚƐ &/>dZ ƐŽƌƚ ;ĞĨĂƵůƚŝƐϭͿ ;ĞĨĂƵůƚŝƐϭͿ ;ĞĨĂƵůƚŝƐ&>^ŽƌϬͿ
hE/Yh
hE/Yh;Ϳ ZĞŵŽǀĞƐĚƵƉůŝĐĂƚĞƐĨƌŽŵĂŶĂƌƌĂLJŽĨĚĂƚĂĂŶĚƌĞƚƵƌŶƐƚŚĞƵŶŝƋƵĞƌĞĐŽƌĚƐ
^YhE
hƐĞĂƌƌĂLJĐŽŶƐƚĂŶƚƐ ƚŽĚĞĨŝŶĞƚŚĞ dŚĞĂƌƌĂLJŝŶϮ͗ϭϬ ŝƐďĞŝŶŐ
^YhE;Ϳ 'ĞŶĞƌĂƚĞƐĂŽŶĞͲ ŽƌƚǁŽͲĚŝŵĞŶƐŝŽŶĂůĂƌƌĂLJŽĨƐĞƋƵĞŶƚŝĂůŶƵŵďĞƌƐ ƐŽƌƚĞĚďLJƚŚĞϯϯƌĚ ĐŽůƵŵŶ
ZEZZz ƐŽƌƚŽƌĚĞƌĨŽƌŵƵůƚŝƉůĞĐŽůƵŵŶƐ
;DĂƌŐŝŶͿŝŶĂĂƐĐĞŶĚŝŶŐ ŽƌĚĞƌ͕
ƚŚ
ϰ ĐŽůƵŵŶ ;WƌŽĨŝƚͿŝŶ
ƚŚĞŶƚŚĞϰ
ĚĞƐĐĞŶĚŝŶŐ ŽƌĚĞƌ
'ĞŶĞƌĂƚĞƐĂŽŶĞͲ ŽƌƚǁŽͲĚŝŵĞŶƐŝŽŶĂůĂƌƌĂLJŽĨƌĂŶĚŽŵŶƵŵďĞƌƐ >ĞŐĂĐLJ&ƵŶĐƚŝŽŶƐ
ZEZZz;Ϳ
^KZd ^KZdz
^KZdΘ^KZdz ŶĂƌƌĂLJŽĨĐĞůůƐ ŽůƵŵŶηLJŽƵǁĂŶƚ ϭсƐĐĞŶĚŝŶŐ dZhͬϭс^ŽƌƚďLJĐŽůƵŵŶ ^KZdΘ^KZdz ŶĂƌƌĂLJŽĨĐĞůůƐƚŚĂƚ ƌƌĂLJŽĨĐĞůůƐƚŚĂƚ ϭ сƐĐĞŶĚŝŶŐ ĚĚŝƚŝŽŶĂůƉĂŝƌƐŽĨ
ƚŚĂƚLJŽƵǁĂŶƚƚŽ ƚŽƐŽƌƚďLJ ͲϭсĞƐĐĞŶĚŝŶŐ &>^ͬϬс^ŽƌƚďLJƌŽǁ LJŽƵǁĂŶƚƚŽƐŽƌƚ LJŽƵǁĂŶƚƚŽƐŽƌƚďLJ Ͳϭ сĞƐĐĞŶĚŝŶŐ ĂƌƌĂLJƐƚŽƐŽƌƚďLJ
&/>dZ ƐŽƌƚ ;ĞĨĂƵůƚŝƐϭͿ ;ĞĨĂƵůƚŝƐϭͿ ;ĞĨĂƵůƚŝƐ&>^ŽƌϬͿ &/>dZ ;ĞĨĂƵůƚŝƐϭͿ
hE/Yh hE/Yh
,zd,/^/^/DWKZdEd͊
^YhE ^YhE
dŚĞĂƌƌĂLJLJŽƵƐŽƌƚďLJŵƵƐƚďĞ
dŚĞĂƌƌĂLJŝŶϮ͗ϭϬ ŝƐďĞŝŶŐ ƚŚĞƐĂŵĞƐŝnjĞ ĂƐƚŚĞĂƌƌĂLJ
ZEZZz ƐŽƌƚĞĚďLJƚŚĞϰϰƚŚ ĐŽůƵŵŶ
ZEZZz LJŽƵĂƌĞƐŽƌƚŝŶŐ
;WƌŽĨŝƚͿŝŶĚ
ĚĞƐĐĞŶĚŝŶŐ ŽƌĚĞƌ
>ĞŐĂĐLJ&ƵŶĐƚŝŽŶƐ >ĞŐĂĐLJ&ƵŶĐƚŝŽŶƐ
dŚŝƐĂƌƌĂLJŝƐƐŽƌƚĞĚďLJWƌŽĨŝƚ ŝŶĚĞƐĐĞŶĚŝŶŐ
ŽƌĚĞƌ;ĞǀĞŶƚŚŽƵŐŚŝƚŝƐŶ͛ƚŝŶƚŚĞĂƌƌĂLJ͊Ϳ
&/>dZ &/>dZ
hE/Yh hE/Yh
ZEZZz ZEZZz
dŚŝƐĂƌƌĂLJƌĞƚƵƌŶƐǀĂůƵĞƐĨƌŽŵϮ͗ϭϬ͕
ǁŚĞƌĞĂƚĞŐŽƌLJсůŽƚŚŝŶŐ dŚŝƐĂƌƌĂLJƌĞƚƵƌŶƐǀĂůƵĞƐĨƌŽŵϮ͗ϭϬ ǁŚĞƌĞ
>ĞŐĂĐLJ&ƵŶĐƚŝŽŶƐ >ĞŐĂĐLJ&ƵŶĐƚŝŽŶƐ ĂƚĞŐŽƌLJсůŽƚŚŝŶŐKZ^ĂůĞƐхϱ͕ϬϬϬ
;/d,ZĐƌŝƚĞƌŝĂŵƵƐƚďĞŵĞƚͿ
&/>dZ hE/Yh
^KZdΘ^KZdz
^KZd Θ ^KZdz ŶĂƌƌĂLJŽĨĐĞůůƐƚŚĂƚ ůŽŐŝĐĂůƚĞƐƚƚŽĚĞƚĞƌŵŝŶĞ ŶŽƉƚŝŽŶĂůǀĂůƵĞƚŽ ^KZdΘ^KZdz
^KZd Θ ^KZdz ŶĂƌƌĂLJŽĨĐĞůůƐƚŚĂƚ dZhͬϭ сZĞŵŽǀĞĚƵƉůŝĐĂƚĞƐŝŶĐŽůƵŵŶƐ dZhͬϭ сdžƚƌĂĐƚǀĂůƵĞƐƚŚĂƚŽŶůLJĂƉƉĞĂƌŽŶĐĞ
LJŽƵǁĂŶƚƚŽĨŝůƚĞƌ ƚŚĞĨŝůƚĞƌĐƌŝƚĞƌŝĂ͕ǁŚĞƌĞ ƌĞƚƵƌŶŝĨŶŽƚŚŝŶŐƉĂƐƐĞƐ LJŽƵǁĂŶƚƚŽƌĞŵŽǀĞ &>^ͬϬ сZĞŵŽǀĞĚƵƉůŝĐĂƚĞƐŝŶƌŽǁƐ &>^ͬϬ сdžƚƌĂĐƚĂůůƵŶŝƋƵĞǀĂůƵĞƐ
&/>dZ ǀĂůƵĞƐŽĨdZh ǁŝůůďĞŬĞƉƚ ƚŚĞĨŝůƚĞƌĐƌŝƚĞƌŝĂ &/>dZ ĚƵƉůŝĐĂƚĞƐĨƌŽŵ ;ĞĨĂƵůƚŝƐ&>^ŽƌϬͿ ;ĞĨĂƵůƚŝƐ&>^ŽƌϬͿ
hE/Yh hE/Yh
dŽĐƌĞĂƚĞĂŶE ĐŽŶĚŝƚŝŽŶďĞƚǁĞĞŶ
^YhE ŵƵůƚŝƉůĞůŽŐŝĐĂůƚĞƐƚƐ͕LJŽƵĐĂŶ ^YhE
ŵƵůƚŝƉůLJƚŚĞŵƚŽŐĞƚŚĞƌ
^KZdΘ^KZdz ŶĂƌƌĂLJŽĨĐĞůůƐƚŚĂƚ dZhͬϭ сZĞŵŽǀĞĚƵƉůŝĐĂƚĞƐŝŶĐŽůƵŵŶƐ dZhͬϭ сdžƚƌĂĐƚǀĂůƵĞƐƚŚĂƚŽŶůLJĂƉƉĞĂƌŽŶĐĞ ^KZdΘ^KZdz EƵŵďĞƌŽĨ EƵŵďĞƌŽĨ ^ƚĂƌƚŝŶŐŶƵŵďĞƌ /ŶĐƌĞŵĞŶƚďĞƚǁĞĞŶĞĂĐŚŶƵŵďĞƌ
LJŽƵǁĂŶƚƚŽƌĞŵŽǀĞ &>^ͬϬ сZĞŵŽǀĞĚƵƉůŝĐĂƚĞƐŝŶƌŽǁƐ &>^ͬϬ сdžƚƌĂĐƚĂůůƵŶŝƋƵĞǀĂůƵĞƐ ƌŽǁƐƚŽƌĞƚƵƌŶ ĐŽůƵŵŶƐƚŽƌĞƚƵƌŶ ;ĞĨĂƵůƚŝƐϭͿ ;ĞĨĂƵůƚŝƐϭͿ
&/>dZ ĚƵƉůŝĐĂƚĞƐĨƌŽŵ ;ĞĨĂƵůƚŝƐ&>^ŽƌϬͿ ;ĞĨĂƵůƚŝƐ&>^ŽƌϬͿ &/>dZ
hE/Yh hE/Yh
WZKd/W͗ EĞƐƚ ^YhE
^YhE ^YhE ǁŝƚŚŝŶŽƚŚĞƌĨƵŶĐƚŝŽŶƐƚŽŵĂŬĞ
dŚŝƐĂƌƌĂLJƌĞƚƵƌŶƐƚŚĞĂƚĞŐŽƌLJǀĂůƵĞƐ ƚŚĞŵŵŽƌĞĚLJŶĂŵŝĐ
ĨƌŽŵϮ͗ϭϬ ƚŚĂƚĂƉƉĞĂƌĞdžĂĐƚůLJŽŶĐĞ
ZEZZz ZEZZz
WZKd/W͗ /ŶĐůƵĚĞŵƵůƚŝƉůĞ
>ĞŐĂĐLJ&ƵŶĐƚŝŽŶƐ ĐŽůƵŵŶƐŝŶƚŚĞĂƌƌĂLJƚŽƌĞƚƵƌŶ >ĞŐĂĐLJ&ƵŶĐƚŝŽŶƐ
dŚŝƐŐĞŶĞƌĂƚĞƐĂϭϬͲƌŽǁ͕ϲͲĐŽůƵŵŶ ĂƌƌĂLJƐƚĂƌƚŝŶŐĂƚϭϬ ĂŶĚ
ĞĂĐŚƵŶŝƋƵĞĐĐŽŵďŝŶĂƚŝŽŶ ŽĨǀĂůƵĞƐ ŝŶĐƌĞŵĞŶƚŝŶŐďLJϱ;ŶŽƚĞƚŚĞŶƵŵďĞƌƐŐŽůĞĨƚͲƚŽͲƌŝŐŚƚ͕ƚŚĞŶĚŽǁŶͿ
WZKd/W͗ŽŵďŝŶŝŶŐ^KZd͕&/>dZΘhE/Yh ZEZZz
сZEZZz ;ƌŽǁƐ͕ĐŽůƵŵŶƐ͕ŵŝŶ͕ŵĂdž͕ŝŶƚĞŐĞƌͿ
^ƉŝůůZĂŶŐĞƐ
hE/Yh
>ĞŐĂĐLJ&ƵŶĐƚŝŽŶƐ
dŚŝƐŐĞŶĞƌĂƚĞƐĂϭϬͲƌŽǁ ďLJϳͲĐŽůƵŵŶ ĂƌƌĂLJŽĨ
ƌĂŶĚŽŵǁŚŽůĞŶƵŵďĞƌƐďĞƚǁĞĞŶϬ ĂŶĚϭϬϬ
>'z&hEd/KE͗&ZYhEz WZKd/W͗:K/E/E'ZZz^t/d,,KK^
hE/Yh
с,KK^;ϭ͕Ϯ͕&Ϯη͕'ϮηͿ
^YhE ǀŐ^ĂůĞƐďLJĂƚĞŐŽƌLJ
;ƵƐŝŶŐsZ'/&Ϳ
ZĂǁĚĂƚĂĂƚƚŚĞƉƌŽĚƵĐƚͲůĞǀĞů WZKd/W͗ hƐŝŶŐƚŚĞĂƌƌĂLJ
,ĞƌĞǁĞ͛ƌĞĐŽƵŶƚŝŶŐƚŚĞĨƌĞƋƵĞŶĐLJŽĨ^ĂůĞƐ
ZEZZz ƌĞĐŽƌĚƐǁŚŝĐŚĨĂůůŝŶƚŽĞĂĐŚďŝŶŝŶ&Ϯ͗&ϲ ĐŽŶƐƚĂŶƚϭ͕Ϯ ƚĞůůƐdžĐĞůƚŽ
hŶŝƋƵĞůŝƐƚŽĨĂƚĞŐŽƌŝĞƐ ĐŽŵďŝŶĞďŽƚŚƌĞĨĞƌĞŶĐĞĚ
EKd͗&ZYhEzĂůǁĂLJƐƌĞƚƵƌŶƐŽŶĞ ;ƵƐŝŶŐhE/YhͿ
>ĞŐĂĐLJ&ƵŶĐƚŝŽŶƐ ĞdžƚƌĂƌŽǁ ƚŽĂĐĐŽƵŶƚĨŽƌǀĂůƵĞƐĂďŽǀĞƚŚĞ ƌĂŶŐĞƐŝŶƚŽŽŶĞĚLJŶĂŵŝĐĂƌƌĂLJ
ůĂƌŐĞƐƚĚĞĨŝŶĞĚďŝŶ
>'z&hEd/KE͗dZE^WK^ WZKd/W͗d,>d&hEd/KE
dZE^WK^;Ϳ &ůŝƉƐĂǀĞƌƚŝĐĂůƌĂŶŐĞŽĨĐĞůůƐƚŽĂŚŽƌŝnjŽŶƚĂůƌĂŶŐĞ͕ŽƌǀŝĐĞǀĞƌƐĂ
>d;Ϳ ůůŽǁƐLJŽƵƚŽĚĞĐůĂƌĞǀĂƌŝĂďůĞƐ͕ĂƐƐŝŐŶǀĂůƵĞƐ͕ĂŶĚƵƐĞƚŚĞŵǁŝƚŚŝŶĨŽƌŵƵůĂƐ
LJŶĂŵŝĐdžĐĞů
сdZE^WK^ ;ĂƌƌĂLJ Ϳ
^ƉŝůůZĂŶŐĞƐ с>d ;ŶĂŵĞϭ͕ŶĂŵĞͺǀĂůƵĞϭ͕ĐĂůĐƵůĂƚŝŽŶͺŽƌͺŶĂŵĞϮ͕ŶĂŵĞͺǀĂůƵĞϮ͕͙Ϳ
WZKd/W͗ hƐĞdZE^WK^ ƚŽ͞ƉŝǀŽƚ͟LJŽƵƌĚĂƚĂ
^KZdΘ^KZdz
^KZd Θ ^KZdz ďLJƚƵƌŶŝŶŐƌŽǁƐŝŶƚŽĐŽůƵŵŶƐ͕ŽƌǀŝĐĞǀĞƌƐĂ
ŶĂƌƌĂLJŽĨĐĞůůƐLJŽƵ
EĂŵĞŽĨƚŚĞǀĂƌŝĂďůĞ sĂůƵĞŽƌĐĂůĐƵůĂƚŝŽŶ ĐĂůĐƵůĂƚŝŽŶƵƐŝŶŐƚŚĞ ĚĚŝƚŝŽŶĂůƉĂŝƌƐŽĨǀĂƌŝĂďůĞ
ǁĂŶƚƚŽƚƌĂŶƐƉŽƐĞ
;ŵƵƐƚďĞŐŝŶǁŝƚŚĂůĞƚƚĞƌͿ ĂƐƐŝŐŶĞĚƚŽƚŚĞǀĂƌŝĂďůĞ ǀĂƌŝĂďůĞ͕ŽƌƚŚĞŶĂŵĞŽĨ ŶĂŵĞƐĂŶĚǀĂůƵĞƐ
&/>dZ ĂŶŽƚŚĞƌǀĂƌŝĂďůĞ;ŽƉƚŝŽŶĂůͿ
hE/Yh
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
ydZKEh^&hEd/KE^ 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
INDIRECT HYPERLINK
The INDIRECT function returns the reference specified by a text string, and can be used HYPERLINK creates a shortcut that links users to a document or location within a
to change a cell reference within a formula without changing the formula itself document (which can exist on a network server, within a workbook, or via a web
address)
=INDIRECT(ref_text, [a1]) =HYPERLINK(link_location,[friendly_name])