Uploaded by Chery Gada

Excel Crash Course

advertisement
Chapter One: Welcome to Excel
I.
●
●
●
●
II.
●
●
●
III.
●
●
●
●
●
IV.
Getting Started
Excel 2016 vs 2013 vs 2010
○ Virtually same but little differences
Use keyboard over mouse
Excel Layout
○ Name box: tells you what cells you are in
○ Formula bar: when you insert a formula in a cell and hit return, cell will show you the
output
○ Worksheet: an excel file is called a workbook
■ add / delete more: alt i w
■ Move back and forth between worksheet in workbook by pressing Ctrl Page Up
or Ctrl Page Down
○ Columns labeled alphabetically
○ Rows labeled by number
To access features in ribbon:
○ Press ALT of F10 and appropriate letter with each tab (Ex blank file: Alt f n)
Mac Quick Setup
https://www.wallstreetprep.com/knowledge/excel-shortcuts/
Function Keys
○ Press FN key and then hit f keys
Control Arrow keys
Using the Keyboard to Navigate Excel Ribbon
Open blank workbook:
○ Alt F N L
○ Shortcut: Ctrl N
Open a file:
○ Alt f o
○ Ctrl o
Save a file
○ Alt f s
○ Ctrl s
Print a file
○ Alt f p
○ Ctrl p
Navigating to the toolbars without the mouse:
○ Hit Alt and the appropriate letter (or use the right/left arrow keys) to get to the desired
tab. Once there, use the Tab and Shift Tab keys to navigate around
Ribbon layout
●
●
●
●
●
●
The Home Tab Includes most formatting properties:
○ Font type, size, and color
○ Background color
○ Text/cell alignment
○ Changing currency, decimal, percent formats
○ Inserting, deleting, and hiding rows and columns
○ Adjusting columns and rows width
○ Inserting, deleting, and renaming worksheets
The Insert Tab:
○ Pivot tables
○ Tables
○ Pictures
○ clip art, and custom shapes
○ Charts
○ Headers & Footers
○ Inserting text boxes, objects, and symbols
Page Layout Tab
○ Includes page layout options:
■ 1. Adjust margins, orientation, size, and print area of page
■ 2. Scale a worksheet
■ 3. Sheet formatting options, including showing gridlines
■ 4. Apply a theme of colors, fonts, and effects to the worksheet
Formulas Tab
○ Includes most options related to function and formula making:
■ 1. Insert a function
● 2. Select a function from a function library
● 3. Name cells
● 4. Formula auditing to trace relationship between cells
● 5. Adjust Excel’s calculation settings including iterations
Data Tab
○ Includes options to manipulate and analyze data:
■ 1. Retrieve data external to Excel
■ 2. Sorting and filtering data
■ 3. Splicing long text into columns
■ 4. Data validation
■ 5. Scenario analysis
■ 6. Goal seek
■ 7. Data tables
■ 8. Grouping rows/columns
■ 9. Statistical data analyses
Review Tab
○ Includes editing and proofing features:
■ 1. Check spelling
■
■
■
■
●
●
V.
●
●
●
●
●
●
2. Create comment boxes
3. Protect worksheets and/or workbooks
4. Share workbooks with other users
5. Track changes made to your file
View Tab
○ Includes editing and proofing features
○ Adjust the way one views the workbook
○ Show or hide worksheet features such as gridlines and the formula bar
○ Select an appropriate zoom level
○ View multiple workbooks simultaneously
○ Freeze panes for more efficient scrolling
○ View and record macros
Developer Tab
○ Recording Macros
○ VBA development
Excel Settings
Accessing Settings (Excel Options)
○ File > Options (Alt f t)
○ Alt t o works too (don’t ask why)
Disabling the Start Screen and adding more worksheets on startup
○ Most of the time, the Start Screen is an unnecessary extra step to get to the Excel screen
○ To disable the Start screen: Click on ‘Blank worksheet’
■ 1. Hit alt f t to go to Excel options (you can get there from the ribbon by clicking
on the file tab)
■ 2. Under ‘General’ unselect “Show the Start screen when this application starts”
Recommended Settings
○ Enable iterations
○ Automatic except for data tables
Advanced – recommended settings
○ After pressing enter, move selection down?
○ Automatically insert a decimal point?
Advanced – recommended settings
○ Excel 2013/2016: Turn off the animation by disabling hardware graphics acceleration
(also good if Excel is performing slowly)
File > Info > Password protecting files
○ You can password protect files “Encrypt with Password”
○ You can also protect individual worksheets so that people can’t see or edit formulas
“Protect Current Sheet”
Chapter Two: Excel Basics
I.
●
●
●
●
II.
●
Basic Excel Shortcuts, Navigating, & Editing
Most keyboard shortcuts involve Alt or Ctrl keys, so it is crucial that you understand how to use
each of them.
○ When using keyboard shortcuts involving Alt, you can press each key and let go; that is,
you do NOT need to hold down the Alt key as you press ‘f’ and ‘a’ keys.
○ You can think of the above ‘Save As’ shortcut as consisting of the following three distinct
steps (do each of them slowly to see what happens):
■ i. Press Alt (and let go) – it activates the Main Tabs
■ ii. Press f (and let go) – it opens the Office Button menu
■ iii. Press a (and let go) – it brings up the ‘Save As’ screen
Most commands involving Ctrl are shortcuts that have been automated by default to make Excel
more efficient and user-friendly
○ For example, a keyboard shortcut that makes the contents of a cell bold is Ctrl b.
Widening Columns & Rows
○ 1. Highlight Column B by pressing Ctrl Spacebar. Then press Alt h o i to auto-fit the
column width.
○ 2. If you want a column to have a certain width, press Alt h o w and enter the desired
width (Excel’s default column width setting is 8.43).
○ 3. Analogously, to expand a desired row, press Shift Spacebar, and then press Alt h o a to
auto-fit the row height.
○ 4. If you want a row to have a certain height, press Alt h o h and enter the desired height
(Excel’s default row height setting is 12.75).
○ The following shortcuts also work:
■ Auto-fit column width: Alt o c a
■ Column width selection: Alt o c w
■ Auto-fit row height: Alt o r a
■ Row height selection: Alt o r e
Calculations & formulas
○ Excel formulas start with the = sign:
○ The = sign tells Excel that the information that will follow the = sign should be treated as
a formula and not as plain text.
○ Once you type in the = sign, use the arrow keys to navigate around the Excel workbook
to find the cells you need for your formula. The signs for formulas are intuitive in Excel
and are as follows:
Basic Formatting
Format cells (F1)
○ Excel aligns numbers to the right and text to the left by default. You can, of course,
always override any default formatting by pressing Ctrl 1 to access the ‘Format Cells’
menu.
○
●
III.
●
●
●
Hitting Ctrl 1 from an Excel worksheet pulls up the ‘Format Cells’ menu, from where any
formatting that Excel is capable of can be applied on the active cell or highlighted cell
region. In the Alignment tab, for example, users can change the alignment of text.
Navigating the format cell menu
○ After hitting Ctrl 1 to pull up the ‘Format Cells’ menu, you can navigate around tabs by
hitting Ctrl tab
○ Each category within a tab can be accessed by pressing Alt and the appropriate
underlined letter, or by hitting tab to move clockwise and shift tab to move counter
clockwise.
○ When on the desired tab, For example, within the alignment tab, horizontal alignment can
be accessed through Alt h and vertical alignment through Alt v.
Referencing Cells from Other Worksheets
Formatting
○ all numbers to 1 decimal, thousands should be separated by commas, while negative
numbers should appear in parenthesis:
■ i. Hit Ctrl 1 to open the ‘Format Cells’ menu.
■ ii. Within the Number tab, hit the Tab key and scroll down the category menu to
the ‘Number’ category.
■ iii. Press the Tab key again to select the 1 decimal place preference.
■ iv. Select the comma separator option.
■ v. Select the (1,234.0) treatment of negative numbers.
■ vi. Press Enter to exit to format cells menu.
Referencing other worksheets
○ We are now going to consolidate both matrices in Sheet 3:
■ 1. Copy and Paste the row and column headers from Sheet2 into Sheet3.
■ 2. In cell C2, press = then holding the Ctrl key press Page Up until you reach
Sheet1. Within Sheet1, use the arrow keys to hover over cell C2.
■ 3. Press the + key (Shift =) and then hit Ctrl Page Down to go to Sheet2 and then
again, using the arrow keys hover over C2. Your edit box should now have the
following formula inside: =Sheet1! C2+Sheet2! C2.
■ 4. Hit Enter. Notice that once you hit enter, Excel takes you back to Sheet3,
where it has added up C2 from both Sheet1 and Sheet2.
■ 5. Now hit Ctrl C to copy this cell and using shift and the arrow keys, hover over
the cell input range (C2:F3) and then hit Ctrl V to paste.
■ 6. Calculate the gross profit in row 4 as you did in both earlier exercises.
■ 7. Format the cell range as you did in the last exercise using the ‘Format Cells’
menu.
Paste Special
○ Highlight the already-formatted cell range in Sheet2, press Ctrl c to copy and then
highlight the corresponding cell range in Sheet3 and press Alt h v s t (or Alt e s t).
○ This is the shortcut to “Paste Special”. What is special about it is that it only applies the
formatting style – not the formulas – onto the target cells.
○
●
Within the “Paste Special” menu (Alt h v s or Alt e s), you can choose to paste specific
features of a cell range, not just its formats. Remember, you must first copy a cell range
in order to reach the “Paste Special” menu.
○ Paste special can be quite powerful and can do things you may not have expected - much
more on this in the next section.
Alt E S → paste special
Chapter Three: Formatting & Navigation
●
●
●
●
●
●
●
Excel worksheets often become too large to allow users to view all of their contents on one
screen.
Accordingly, ‘Freezing Panes’ and ‘Splitting Panes’ options provide users with the flexibility to
select specific rows and columns that always remain visible when scrolling in the worksheet
Panes are defined as portions of the worksheet that are bounded and separated by vertical and/or
horizontal bars.
Freezing Panes:
○ Click the cell below the desired row and to the right of the desired column where you
want to freeze panes and hit alt w f f.
○ To unfreeze panes: press alt w f f again.
Splitting Panes
○ While freezing panes allows users to select specific rows and columns that always remain
visible when scrolling in the worksheet, splitting panes allows users to scroll in both areas
of the worksheet, while rows and columns in the non-scrolled area remain visible.
○ To Split Panes:
■ Click the cell below the desired row and to the right of the desired column where
you want to split panes and hit alt w s.
■ To un-split panes, click alt w s again.
■ Press F6 to move from pane to pane in a clockwise direction; press Shift F6 to
move from pane to pane in a counter-clockwise direction.
The Undo and redo commands
○ Undo the delete by hitting Ctrl z.
○ Redo the delete by pressing Ctrl y
Manipulating data inside a cell
○ 1. Go to cell C4 and hit F2. F2 is the command that puts you “inside” a cell.
○ 2. Within cell C4, press Shift left arrow until ‘C3’ is highlighted.
○ 3. Hit Shift Ctrl left arrow and you’ll notice that C2 is instantly highlighted. Notice that it
is a similar idea to editing outside cells: Shift arrow-keys highlight characters one at a
time, while Shift Ctrl arrow-keys highlight contiguous ranges of characters within the
cell.
○ 4. Now hit backspace to delete the highlighted region, and while still within the cell hit
Esc to cancel everything we have done so far. Within cells, the Esc key is very useful
●
when you will be working with complex worksheets because it cancels unintended cell
entries.
Cell edit vs. point mode: Hitting F2 a second time
○ Go back to C4 and press F2, putting you “inside” again.
○ Now try to add cell C6 by typing + and using the arrow keys - you’ll find that you are
stuck – hit F2 again to get “unstuck” and then use the arrow keys.
○ Pressing F2 again activates the cursor and enables you to move to different cells,
worksheets, and even other open Excel files (you should see a dotted border when you
move to any of these locations) in order to insert additional formula components into the
original cell’s pre-existing formula (C4 in our example)
Pressing the F2 key once:
● Shows the components of the formula you created earlier
● Puts you inside a cell and enables you to navigate through it to edit the existing cell data
Pressing the F2 key twice:
● Activates the cursor and enables you to move to different cells, worksheets, and even other
open Excel files
●
●
●
●
●
Deleting and clearing cell data
○ You can delete the contents of a cell simply by hitting Delete on an active cell.
○ Important – hitting delete does NOT delete the formatting in the cell – this is retained, so
next time you type a number into that cell, it will retain the formatting of the originally
deleted data. It also won’t delete a comment that may exist in the cell. So how do your
truly delete a cell?
○ With your cursor on the desired cell, hit Alt h e (Home Tab -> Clear). From a
drop-down menu, choose the appropriate action:
■ 1. (Alt h e) a = Clears ALL contents of the cell (values, formulas, and format)
■ 2. (Alt h e) f = Clears the FORMAT of the cell only
■ 3. (Alt h e) c = Clears the CONTENTS of the cell only (same as hitting Delete)
4. (Alt h e) m = Clears the COMMENTS of the cell only
Ctrl R tells Excel to look at the leftmost column of a range of highlighted cells and copy and
paste the inputs and formulas in that column to all the columns to the right.
Ctrl D does the same thing for rows that Ctrl R does for columns, telling Excel to look at the
topmost row of a range of highlighted cells and to copy and paste the inputs and formulas in that
row down to all the rows below it
Inserting Comments
○ Hit ESC twice to exit the comment area.
○ To edit an existing comment, go to the relevant cell and press Shift F2.
○ To delete a comment, press Alt h e am (or alt e a m).
Inserting Rows
○ Let’s say we want to add a row below operating costs for non-operating costs. To do this,
go to any cell in the row below operating costs (row 6) and press Alt i r. Or, highlight the
●
●
●
●
●
row below operating costs by pressing Shift Spacebar, and then press Ctrl Shift + to insert
the new row. A new row will appear.
Inserting Column
○ We now add a column for 2004. To do this, go to any cell in column C and press Alt i c,
or highlight column C by pressing Ctrl Spacebar and then insert the column by pressing
Ctrl Shift +. Insert the new data as shown by copying (Ctrl C) and pasting (Ctrl V) the
formulas in rows 4 and 7, and hard-inputting blue cells as shown in the screenshot here.
Deleting rows and columns
○ Alt h d r (row); Alt h d c (column)
○ Highlight row/column and press Ctrl Copying and Pasting
○ Ctrl v pastes relative cell references
○ Ctrl v pastes ALL cell attributes: When we copied and pasted the formulas from cell D4
to C4, Excel not only copied the formulas, but also the formatting. Had we had a
comment in that cell, Excel would have automatically pasted it as well. Excel is
programmed by default to copy over all the attributes of a cell.
○ This may not always be desirable to copy all attributes. Perhaps a user wants to copy over
just comments, or just values, or just the formulas but nothing else, etc.
○ Paste Special (Ctrl c, followed by alt e s) lets the user dictate the specific attributes of a
cell or highlighted region that should be pasted.
○ Back in Sheet2, highlight the cell range B1:G7, copy it (Ctrl c), and paste only the
formulas (not the formatting) into B13:G20 by pressing Alt e s f. Now hit Ctrl Z to undo
the paste and paste only the formatting (not the formulas) into B13:G20 by pressing Alt e
s t.
Paste special – operators
○ In addition to pasting specific combinations of formulas, formats, and values, the paste
special feature allows users to operate on multiple values in exactly the same way.
■ Suppose you have a list of dollar prices (see below) quoted to you in thousands,
but you wish to see them quoted in ones (e.g., you want to convert $450 to
$450,000).
■ In another cell, enter the number 1000. Copy this cell, then highlight your list of
prices. Press Alt e s m. This will multiply each dollar price on your list by 1000.
○ You can likewise add, subtract, or divide a list of data by a single number.
■ For example, using paste special is an easy way to convert positive numbers to
negative numbers (by doing a paste special multiply by -1).
○ *** Be careful when applying an operator paste special on ranges containing both
formulas and inputs - both formulas and inputs will be impacted by the operation, so if
the formula cells are dependent on the input cells, you may introduce unintentional errors
Paste special – transpose
○ Another useful paste special feature is the “transpose” feature.
○ It allows users to convert a vertical list of data into a horizontal list of data, and vice
versa.
○ Using the same set of data as in the prior slide, highlight the vertical list of prices.
○
●
●
●
●
●
Move your cursor outside of the list range (to cell C3 in our case). Press Alt e s e. Your
list of prices should now be listed horizontally on a single row.
Ctrl X → used to cut
Naming Cells
○ When formulas get longer and more complex, it is sometimes (but not always!) useful to
name cells that are being referenced within the formulas.
○ If in Sheet 2, for example, we had named cell C2 ‘Revenues2004’ and cell C3
‘COGS2004’, our formula in cell C4 would read =Revenues2004–COGS2004.
○ Name cell C2 Revenues2004 by going to cell C2 and pressing Ctrl F3, which will open
the Name Manager. Click ‘New.’ Name cell C3 COGS2004 the same way.
■ Now any time you reference these newly named cells, they’ll show up as
‘Revenues2004’ and ‘COGS2004’.
○ Naming cells is useful in very large files where a specific cell is being referenced by
many other cells in long complicated formulas.
The downside of naming cells and ranges
○ Names duplicate when copied to a new sheet (error).
○ Harder to trace the calculations using F2.
○ Deleting names will cause errors in cells that reference the name.
Anchoring Cells (F4)
○ When you copy and paste a cell containing a formula from one cell to another, Excel
automatically shifts the cells being referenced in the formula.
○ Sometimes, this is not desirable. That is why Excel allows you to anchor cells.
○ Anchoring (or “Fixing”) cells that are being referenced in a formula tells Excel that even
if you copy the formula to another cell, the cells in the formula that are anchored should
not change.
○ You can choose whether to fix an entire cell (as we did in this drill: $C$11), or just fix the
column ($C11) or just the row (C$11) by repeatedly pressing F4 until you find your
preference.
Naming Worksheet
○ By now, we know that by default, Excel names its worksheets Sheet1, Sheet2, Sheet3,
etc.
○
●
●
●
●
Rename a worksheet you are working in by pressing Alt h o r which will highlight the
current name of the worksheet. Type in ‘Income Statement’ and press Enter.
Inserting & deleting worksheets
○ Add a new worksheet (Excel provides 3 in Excel 2010 and 1 in Excel 2013 by default) by
○ pressing Alt h i s.
○ Conversely, delete a worksheet by pressing Alt e l
Grouping columns & rows
○ There is often a need to hide rows and columns (for formatting and presentation purposes,
or simply because the data in those columns is old and need not be shown all the time).
○ To group columns
■ 1. Hit Ctrl Spacebar to select the desired column(s).
■ 2. Hit Shift Alt right arrow key to create the group.
■ 3. Hitting alt a h will hide the columns.
■ 4. Hitting alt a j will unhide the columns.
■ 5. Hitting Shift Alt left arrow key will remove the group.
○ To group rows
■ Hit Shift Spacebar to select the desired row.
■ Follow steps 2-5 outlined above.
Group – don’t hide
○ Grouping columns and rows through the steps mentioned in the previous slide allows
users to group any number of desired columns and rows, and is therefore very useful as a
way to hide data that users would still like to have, but not necessarily show to others.
○ Another way to hide data is by hitting Alt h o u r for rows and Alt h o u c for columns.
Don’t ever use this method. Why?
■ Under this method, columns and rows are hidden, but there are no indications (no
minus or plus signs as in the first method) as to their location.
■ In larger spreadsheets, you can easily forget which columns and rows you have
hidden. Just as importantly, it also makes it difficult for another person to audit
your Excel analysis, so stick with grouping
Grouping Worksheets
○ If you would like to format data in the same manner or enter the same data across
multiple sheets, Excel provides an efficient method to accomplish this goal. By grouping
multiple worksheets, any data and formatting that you would perform in one of the
grouped worksheets would automatically be reflected in all of them.
○ To group worksheets:
■ Holding down Ctrl Shift, press PageUp or PageDown to reach the worksheets
you would like to group. All of the grouped worksheets are highlighted and the
file name on top of the Excel screen should show [Group] after it.
○ To ungroup worksheets:
■ Press Ctrl PageUp or Ctrl PageDown until you reach one of the ungrouped
worksheets; this automatically ungroups all of the previously-grouped sheets.
■ If you have grouped all worksheets, pressing Ctrl PageUp or Ctrl PageDown just
once (to get to another worksheet) ungroups all of them.
○
●
●
●
●
●
●
Word of Caution: Grouping worksheets serves as an efficient way of performing data
entry and formatting across multiple sheets; however, be careful – if you do not ungroup
worksheets before starting to work in one of them, you may override information in other
worksheets.
Auditing cells
○ Good: F2
■ You have already learned one way to audit formulas: simply go to a desired cell
and hit the F2 key. Excel will highlight (in different colors) all the cell
components of an existing formula present in that cell.
○ Better: Ctrl [ and Ctrl ]
■ Hitting Ctrl [ on a cell will highlight the precedent cell(s) - keep hitting Ctrl [
and it will take you to the next precedent, and on and on.
■ Hitting Ctrl ] on a cell will do the same thing but for dependent cells.
Formula Auditor
○ When formulas become more complex, involving a number of cell references across
different worksheets and even Excel files, the formula auditing feature is helpful.
○ Trace precedents (Alt m p): Trace cells that provide data to a formula (For cell C2 in
Sheet3, precedent cells are Sheet1!C2 and Sheet2!D2). A worksheet icon indicates that
the precedent cells are in another worksheet. Double clicking anywhere (with a mouse)
on the black arrow brings up the ‘Go To’ screen; selecting either of the precedent cell
locations and hitting ‘OK’ will take you there
○ Trace dependents (Alt m d): Trace formulas that reference a particular cell. For cell C2,
a dependent cell is C4 (that cell references C2 in its formula)
○ Remove trace arrows (Alt m a a)
Cell Alignment & Center Across selection
○ Merge cells: ctrl 1, under alignment, center, alt m → merging cells not a good idea!
○ Preferable way to center across selections:
■ Highlight region, ctrl 1, select center across selection (data is centered and you
can go through each row and column without it being merged)
Go to Special
○ Highlight region, hit F5 → take you to Go Screen, hit at s for special
■ See specific things of highlighted regions (constants, numbers)
○ Common features: identify where blanks are (esp for big files), comments, status bar
Conditional Formatting - Alt O D
○ Alt h l opens conditional formatting for individual cells → can do for multiple cells
○ Custom conditions: alt o d → new rule
■ Under new formatting rule → use a formula to determine which cells to format
● Will shade what is right following formula
Create Dynamic Headers, Custom Formatting, & the TEXT function
○ Dynamic headers & TEXTS
■ Can wrap a test function
● Ex: “&TEXT(C3, “mm/dd/yy”)
○ Custom Formatting
■ Common ex: formatting multiples → 0.0x
■
●
Excel can store thee properties for each format: positive numbers, negative
numbers, how to format number 0
● Ex 1 as true and 0 as false and negative number as invalid
■ Have to add quotations for text
○ Alt Enter
■ Creates page breaks
Custom Formatting
○ Values get aligned when applying formatting
○ Custom formatting: when changing custom → alignment gets thrown off
■ How to fix alignment: underscore _ → ex: 0.0_ will move it to the left
■ If texts are left aligned → underscore on both sides will fix
○ Comma separator → don't do 0,000 because it will be 0,400
■ Thats where # comes in → #,##0.0 replaces mandatory 0 and make it optional
●
#Ref, #Div/0! & Other Excel Errors
●
●
Find and Replace
○ Ctrl F → find and replace dialogue
■ Type in what you want to find and replace (can type in cells like J2 too)
Page Layout
○ Go to page layout tab and click page setup
○ Instead of adjust, change to fit to
○ Many features → like adding date and time in header
●
Alt d l → drop down menu
Chapter Four: Date & Concatenation Functions
Introduction to Functions: SUM and Average
● Functions are pre-built combinations of operations in Excel that facilitate spreadsheet analysis. In
Excel, there are over 300 functions, which are grouped into 11 categories by the various purposes
they serve.
● Functions are useful on their own, but become even more powerful when they are combined
together.
● We are going to go over the most common functions and function combinations that you are
likely to encounter in financial analysis.
● Structure of Excel functions:
○ Every function starts with an “=“ sign, then the function name, and then the cell range
(bound within parentheses).
○ All functions follow the same syntax:
=functionname(argument1,argument2,...,argumentx).
○ Within the parentheses, functions can have 0, 1, or many arguments, separated by
commas.
■ Ex: In the SUM function =SUM(A1:A10), there is only one argument, and the
argument is telling Excel the specific cell range that needs to be summed up; we
will encounter functions where there are several arguments.
○ Arguments will become a little clearer when we actually deal with them, but for now just
remember that arguments are things inside the parentheses of a function, separated by
commas, that tell Excel certain things about the function.
■ An IF function has 3 arguments
● Drill – SUM (Math & Trig)
○ The SUM function below automatically adds all the numbers in a specified cell range.
○ Without the SUM function, you’d have to individually add each cell using the “+”
operation.
○ Using the SUM function:
■ 1.Go back to Sheet3 and insert a column heading in G1 as shown below and
move the cursor down to G2.
■
●
2. Press Alt = and you will notice that Excel will automatically insert a function
called SUM that sums all of the revenues from historical years and calculates
them in cell G2.
■ 3. You could have also manually typed this formula and used the arrow keys to
highlight the range of cells you wish to sum together.
Drill – AVERAGE (Statistical)
○ Now let’s say you want to determine what average absolute gross profit was from
2005-2008. Excel has a built-in average function that calculates the average of a range of
selected cells or numbers.
■ Calculate the average gross profit as shown below: ex- AVERAGE(C4:F4)
Simple and Nested IF Statements
● Logical functions: IF
○ The IF function is one of the most useful functions in Excel.
○ The IF function returns one value if a condition you specify evaluates to TRUE and
another value if it evaluates to FALSE.
○ Use IF to conduct conditional tests on values and formulas.
○ All IF statements follow the same structure =IF(x,y,z), where:
X
Criteria
Y
output if criteria evaluates to true
Z
output if criteria evaluates to
false
○
Ex:
Text output is designated by quotation marks around the outputs.
●
Nested Input Statement
○ Ex: Question: Are both me and siblings eligible to vote
IFS Statement (2016+)
● Ifs → logical test
IFERROR and Concatenation
●
Drill – Error-trapping function IFERROR
○ =IFERROR(value,value_if_error) returns a value you specify if a formula evaluates to an
error. If the formula does not result in an error, IFERROR returns the result of the
formula.
●
Drill – Creating dynamic headers by combining cell references with text (“&”)
○ Excel allows users to combine (or "concatenate") cells with a text string in them with
other text strings, creating one text string by using the "&" function.
Date Functions: EOMONTH & EODATE
● Drill – Date functions (EOMONTH)
○ Excel has many date functions, but Eomonth is perhaps the most useful for building
financial models or any analysis spread out over multiple periods.
○ = EOMONTH(start_date,months) allows you to create monthly date headers, by
outputting the last day of a specified month.
■ start_date represents a starting date reference.
■ months represents x number of months before or after the start_date.
■ To output a date x months before a start_date, x should be negative.
●
●
EDATE(start_date,months) is a similar function to EOMONTH
○ The difference is that EDATE returns the exact date, x months from the start date.
Dates in Excel are serial numbers: When using dates in general in Excel, understand that Excel
stores dates as serial numbers – they must be formatted as dates (use Ctrl 1) in order to look like
recognizable dates to the user
ISNUMBER, ISTEXT & Combining with IF to create Overrides
● Cell contents as criteria in IF statements, ISNUMBER, ISTEXT
○ A surprisingly useful criteria used in IF statements, is a test of whether a cell has anything
in it.
■ For example, the IF statement =IF(C1,C2,C3) would see if there is anything in
cell C1, and if there was, it would output C2, otherwise C3.
○ Two functions that do something similar are the ISNUMBER and ISTEXT function, both
typically embedded within an IF statement, and test whether there is a number or text
inside a cell, respectively.
■ In the example below, we combine an IF statement with the ISTEXT function to
create outputs that are different depending on whether there was text in the
criteria cell.
●
Override
More Date Functions: YEARFRAC, DAY, MONTH, YEAR & DATE
● YEARFRAC
○ YEARFRAC(start_date, end_date, basis) returns the proportion of the year between two
given dates, the start_date and end_date. Basis is an optional parameter – see sidebar.
○ YEARFRAC is useful in financial modeling when projecting future cash flows or
obligations for a fraction of a year. We often term the fraction of a year a “Stub Year
Fraction.”
●
DATE, DAY, MONTH, and YEAR functions
○ DATE(year,month,day) is a function that combines distinct year, month, and day
elements into a valid date function in Excel.
○ Combining this function with DAY(serial number), MONTH(serial number), and
YEAR(serial number) is sometimes useful for creating date functions out of disparate
data.
AND & OR Functions
● Drills – AND, OR functions
○ Recall the nested IF that we had to build in a prior drill to output whether both you AND
your sibling are old enough to vote. The AND function facilitates the type of analysis
where you need to evaluate multiple arguments at once.
○ =AND(logical1,logical2, ...) evaluates to true if all its arguments are true; false if one or
more arguments is false.
○ A close cousin is the OR function =OR(logical1,logical2,..) which evaluates to true if at
least one argument is true.
Chapter Five: Lookup Functions and Data Tables
HLOOKUP, VLOOKUP, CHOOSE, OFFSET & INDEX Functions
HLOOKUP and VLOOKUP
● Some of the most useful functions in Excel are functions that allow you to locate data stored in
large tables. HLOOKUP and VLOOKUP are the most popular functions for performing this type
of data extraction
○ =HLOOKUP( look up value, table range, row number) searches for a value in the top
row of a table or an array of values, and then returns a value in the same column from a
row you specify in the table or array.
■ Use HLOOKUP when your comparison values are located in a row across the top
of a table of data, and you want to look down a specified number of rows.
○ =VLOOKUP(lookup value, table range, column number) searches for a value in the
leftmost column of a table, and then returns a value in the same row from a column you
specify in the table or array.
■
●
●
Use VLOOKUP when your comparison values are located in a column to the left
of a table of data, and you want to look across (and to the right) a specified
number of columns.
Other lookup functions
○ Although less popular than HLOOKUPs and VLOOKUPs, Excel also offers several other
data extraction functions that are often a better fit for solving certain types of data
extraction problems.
○ OFFSET returns a cell value or range of cell values that is a specified number of rows
and columns from a cell or range of cells.
■ Syntax: =OFFSET(reference,rows,cols,height,width).
○ INDEX returns a value from a specified row and column from within a table or range.
■ Syntax: =INDEX(array,row_num,column_num).
○ CHOOSE returns a number from a specified list of up to 254 values.
■ Syntax: =CHOOSE(index_num,value1,value2,value3,...).
Range lookup: H/VLOOKUP have an optional fourth argument called range lookup. If range
lookup is omitted or TRUE, an approximate match to the lookup value is returned. If the range
lookup is FALSE, an exact match is returned. When lookup value is text or numbers in nonascending order, the FALSE range lookup is often preferred.
Common Errors with HLOOKUP, VLOOKUP, CHOOSE, OFFSET & INDEX Functions
● Adding a row/column or making any changes to stable will screw up the functions
MATCH Function
● Drills – MATCH function
○ The MATCH function returns the relative position (number) of an item in an array that
matches specified lookup value.
■ Syntax: =MATCH(lookup_value,lookup_array,match_type).
○ It does NOT return the value within the cell itself (as opposed to the HLOOKUP and
VLOOKUP functions).
● Better together: Combining with lookup & reference functions
● Combining with functions like HLOOKUP, VLOOKUP, OFFSET, INDEX, and CHOOSE, to
make formulas more durable and dynamic.
Combining HLOOKUP, VLOOKUP, CHOOSE, OFFSET & INDEX with MATCH
● Replace hard code with match function
● Offset and match needs to subtract 1 because it doesn't count first column/row
Combining Indirect with &
● Indirect is a very interesting function in Excel. At first blush, it seems somewhat pointless, but in
certain contexts can be very useful.
● Syntax =INDIRECT(reference text) returns the reference specified by a text string.
○ For example =INDIRECT(“B4”) will output the value of what is in cell B4.
● One of the most common ways to get value out of this function is to combine with concatenate.
●
●
●
Look at the illustration on the right. The model allows for a flexible user defined start and end
date for calculating a cumulative EBITDA result?
How would you create such a utility?
INDIRECT would really help here.
Creating Drop-Down Menu with Data Validation
● Data validation is a utility in Excel, whose most frequently used feature is its ability to create
simple and quick drop-down menus.
○ 1. To create a dropdown menu, with the cell where you want your drop down menu
active, open the data validation form (alt d l).
○ 2. Within the Settings tab, select list from the dropdown menu
○ 3. Within the ‘Source:’ field, identify a contiguous cell range containing the data you
want to include in your dropdown, and hit OK and you should see your dropdown menu
appear (note: it only appears when you are on the active cell).
Combining Indirect with Match
● Dynamic indirect function ex:
The Address Function
●
Makes working with other tabs and sheets easier
Using COLUMN and ROW Functions as Counters in Complex Formulas
=column() gives column number
=row() gives row number
○ Can reference diff row/column in parenthesis
○ If you put columns or rows, then it will give how many there are in a highlighted array
Data Tables
● Drills – Data tables
○ Data tables allow us to examine a piece of output data – such as a company’s EPS – and
how it is impacted by changes in input variables such as revenues and gross margin
assumptions.
○ Data tables output the results in a presentation-friendly matrix.
○
●
●
●
Often used for sensitivity analysis (i.e. EPS’s sensitivity to changes in gross profit
margin) and is used widely by analysts to illustrate a range of possible output values.
Drills – Building a vertical data table
○ 1. Identify the output variable:
■ The variable you are trying to sensitize is the output variable.
■ Must be referenced from your analysis into the top right corner of the data table
○ 2. Hard-code the input variable sensitivities:
■ The variables whose impact on the output variables you want to analyze are the
input variables.
■ Input variable assumptions should not be referenced from the analysis, but rather
be hard- coded and arranged in the column to the right of the output variable.
○ Run the data table
■ Hit (alt d t); the Data Table dialog will appear.
● Row input cell: Not needed for vertical data tables.
● Column input cell: Reference the input variable from the model.
■ Highlight the entire range (including the output variable) and hit OK when done
– the data table should populate.
■ You may need to hit F9 if Excel is set to “manual” or “automatic calculations
except for data tables.”
■ Important: Data tables must always be in the same worksheet as the input
variables.
Drills – Building a horizontal data table
○ From a substance standpoint, it’s the same as vertical (difference is aesthetic).
○ 1. Referenced output variable from your analysis into the bottom left corner of the data
table.
○ 2. Input the input assumptions in the row above and one cell to the right of the output
reference.
○ 3. Highlight the entire range (including the output variable) and hit (alt d t); the Data
Table dialog will appear.
■ Row input cell: Reference the input variable from the model.
■ Column input cell: Not needed.
■ Hit OK when done – the data table should populate.
Drills – Building a 2-sided data table
○ Same as vertical data table, but allows for 2 inputs instead of one.
○ Output variable must be referenced from the model into the top left corner of the data
table.
○ See illustration below:
When Data Tables Fail: Self Referencing IF Statement
● Limitation with data tables → building it away from the analysis = it wont work
●
Useful for putting it in diff sheets
XLOOKUP: Why it Rocks
● What’s wrong with old way (Vlookup)?
○ Breaks if you add column to right or left
○ It’s brittle
● =XLOOKUP(lookup_value, lookup_array, return_array)
Nested (Two-Way) XLOOKUP vs INDEX MATCH
● Nested XLOOKUP
●
In nested, you take the “Select Data” as your lookup_value, the headers as the lookup_array, and
everything in the return_array.
Using XLOOKUP to Generate Multiple Values
●
It will input everything about Armani for all the headers
Scenario Analysis Using VLOOKUP
Where XLOOKUP Loses To INDEX MATCH
● Can’t make xlookup one formula when creating a table → index match can
● Xmatch → better version of match (xmatch has less arguments)
Chapter Six: Mathematical Calculations
●
SUMPRODUCT
○ We now turn to some of the most frequently used and beneficial mathematical functions
in Excel. Like the reference and lookup functions, the usefulness of these functions really
becomes apparent when combining with other Excel functionality
○
○
○
=SUMPRODUCT(array1,array2,array3, ...) multiplies corresponding components in two
or more arrays, and returns the sum of those products.
A lesser known feature of SUMPRODUCT is the ability to embed criteria directly into
the arrays.
Before we can use that, we first need to understand how Excel really deals with
arguments that evaluate to TRUE or FALSE (Booleans).
Advanced SUMPRODUCT: Adding Criteria & Booleans in Excel
● Booleans in Excel
○ When Excel spits out a TRUE or FALSE (see below), you can convert them respectively
into 1 or 0 by applying any operator on them:
○
○
●
Interestingly, multiplying a TRUE (or FALSE) by another TRUE (or FALSE) also has the
effect of converting it into a 1 or 0, respectively.
Understanding this will have surprisingly useful implications for us.
SUMPRODUCT with embedded criteria
○ A lesser know feature of SUMPRODUCT is the ability to embed criteria directly into the
arrays.
○ For example, we can directly calculate proceeds on options that have an exercise price
less than the share price so you no longer need to calculate option proceeds for each
tranche:
■
■
■
We have 2 criteria – the options # and the exercise price per tranche, which is
multiplied against a TRUE or FALSE criteria for each exercise tranche.
Tranche 1 evaluates to TRUE, so Excel multiplies the TRUE by the Tranche 1
exercise price, and then by the # of options.
Tranche 2 & 3 evaluate to FALSE, and become 0 when multiplied by the exercise
prices.
*** if you press F9 → it'll show the specific cells within the function but press esc after
○ Good Example:
SUMIF/S & AVERAGEIF/S
●
SUMIF
○ =SUMIF(range, criteria, sum range) adds the cells specified by a given criteria.
○ Criteria can either be hardcoded which requires quotation marks as you see below, or a
direct cell reference (which would not need quotes around it).
●
●
SUMIFs
○ =SUMIF(range1, criteria1, sum range1, range2, criteria2, sum range2, etc).
○ Same as SUMIF but can handle multiple criteria and sum ranges.
AVERAGEIF and AVERAGEIFS
○ Identical to SUMIF and SUMIFS but instead of summing, this function averages the data
in the range.
CEILING, FLOOR & ABS Functions & ROUND, ROUNDUP, ROUNDDOWN & COMBIN Function
●
Functions covered in this section
○ ABS
○ CEILING
○ FLOOR
○ COMBIN
○ ROUND
○ ROUNDUP
○ ROUNDDOWN
MIN & MAX FUNCTIONS
● Drills – MIN and MAX
○ MIN and MAX functions are used frequently in financial analysis. A classic use in
financial modeling is to use a max function to prevent a revolving credit line balance
from dipping below 0 when there is a cash shortfall.
○ =MIN(number1,number2,...) returns the smallest number in a specified set of values.
○ =MAX(number1,number2,...) returns the largest number in a specified set of values.
COUNT/A & COUNTIF/S Functions
●
Drills – COUNT, COUNTA, COUNTIF
○ COUNT =COUNT(value1, value2, ... ) counts the number of cells that contain numbers
within the list of arguments. Cells with text are disregarded.
○ COUNTA - same as COUNT except cells with numbers and text are counted.
○ COUNTIF =COUNTIF(range, criteria) counts the number of items in the range that
satisfy a specific criteria - similar to the SUMIF function.
○ COUNTIFS =COUNTIF(range1, criteria1, range2, critera2) allows for multiple
criteria - similar to the SUMIFS function.
Present Value & Future Value Functions
●
Drill – PV function
○ Returns the present value of a series of future payments.
○ Syntax =PV(rate, nper, pmt, fv, type), where:
●
Bond math - PV and FV functions are useful when the payments in an annuity are constant like
with fixed coupon debt
●
Drill – FV function
○ Returns the future value of an investment based on constant payment and interest rate
○ Syntax =FV(rate, nper, pmt, pv, type), where:
Instead of FV → PV
NPV & XNPV Functions
● Drill – NPV function
○ =NPV(rate, value1, value2, ...) returns the net present value of an investment based on a
discount rate and a series of future payments (negative values) and income (positive
values).
○ Values are assumed to occur at the end of each time period and must be referenced in the
order in which they occur.
○ NPV vs. PV functions:
■ PV assumes constant payments, while NPV cash flows can vary from period to
period
■ NPV does not require user to explicitly identify number of periods and simply
assumes equal periods based on the number of values
■ NPV assumes payments occur at the end of the period (but formula can be
adjusted to simulate payments occurring at beginning of period)
●
Drill – XNPV function
○ NPV performs equal discounting on each cash flow – this is not desirable when the
timing of cash flows is uneven.
○ XNPV Syntax: =XNPV(rate, values, dates) returns the net present value for a set of cash
flows that do not necessarily occur at equal time intervals
○ Unlike NPV, the first cash flow is not discounted, while dates of subsequent cash flows
can be included in the formula in any order.
●
For NPV assuming beginning of discounting period → add first dates value and then don’t count
first when highlighting cells
IRR & XIRR Functions
● IRR (internal rate of return)
○ IRR Syntax: =IRR(values, guess) returns the IRR for a series of values.
○ IRR is the rate corresponding to an NPV of 0.
○ While values do not have to be identical each period, the periods are assumed to be
equally far apart.
○ ‘Guess’ is an optional argument. Excel needs a starting point to iterate to the right IRR. If
you choose not to input a “guess”, Excel will automatically use 10% as the guess.
●
●
XIRR
○ XIRR =XIRR(values, dates, guess) returns the IRR for a series values which may not be
periodic
○ The date of each cash flow must be referenced in the formula (the “dates”).
There must be both positive and negative value:
○ For an IRR or XIRR to be calculated, there must be both positive and negative values.
○ Since IRR represents the rate at which NPV is 0, cash inflows must be offset by some
outflows.
Chapter Seven: Text Functions
Text Functions (LEN, LEFT, RIGHT, MID, REPLACE, etc.)
● For professionals that have to work extracting data from large inconsistent and poorly formatted
data sets, text functions can be absolutely critical.
● We will cover the ones listed here:
●
●
LEN: identifies length of string
○ Ex: LEN(C2)
LEFT: requires two argument (first is actual string and second is how many characters), and it
will output X many characters from the left side
○ Ex: LEFT(C3,D3) → Hel / Hello / 3
●
●
●
●
●
●
●
●
●
●
RIGHT: same thing as left but from right side
MID: takes the string, number to start with, and number of characters to output
○ Ex: MID (C5, D5, E5) → ll / hello / 3 / 2
PROPER: converts string into correct case
○ Ex: PROPER(B6) → hello to Hello
UPPER: converts lowercase to uppercase
○ Ex: UPPER(B7) → hello to HELLO
LOWER: same as upper but now converts uppercase to lowercase
TRUNC: takes a number and carry it to number of digits you specify
○ Ex: TRUNC(C9,2) → 1234.256 converts to 1234.25
SEARCH: three arguments. First the character you are finding, second string you are using, and
third where you are starting from
○ Ex: SEARCH(D10, C10, 2) → you get 5 / hello / 0
FIND: very similar to SEARCH, but find is case sensitive while SEARCH is not
SUBSTITUTE: identify a string and substitute characters
○ SUBSTITUTE(C12, “m”, “g”) → m12 changes to g12
REPLACE: similar to substitute. Identify string, starting position, how many characters, and what
to replace with
○ Ex: REPLACE(C13, 1, 1, 9) → am123456 changes to 9m123456
○ REPLACE(C13, 2, 3, “hi!”) → am123456 changes to ahi!3456
Using Text Functions to Solve Data Extraction Challenges
Flash Fill (Excel 2013 Only)
● Excel 2013 has introduced a real improvement to working with large data sets in the form of
Flash Fill (Ctrl e or Alt A F F)
Texts to Columns
● Converting texts to columns
○ Go to data and Highlight column where data is
○ Choose texts to columns and select delimited
○ Choose which way data is broken up (spaces, columns etc.)
● Won’t work fully → sometimes extra spaces mess things up
○ How to resolve this:
○ Create a concatenate function
●
Take advantage of flash fill
Remove Duplicates
● Select remove duplicates in data
VALUE and DATEVALUE
● Value tells excel its a number
● For date value → can concatenate but need to wrap date value around it
Chapter Eight: Mathematical Calculations
Sort & Subtotal
● Drill – Sorting data
○ Excel has very powerful sorting and filtering capabilities that make working with large
data sets more manageable. We will start by covering Excel’s sort and subtotal
functionality.
○ Insert new worksheet and fill in data as shown below.
○ Highlight the entire table or have the cursor in one of the cells in the table.
○ Hit alt d s (Data Tab -> Sort) to bring up the ‘Sort’ menu.
○ You can choose to sort various columns by value, cell color, or font color, and in
ascending or descending order. In this drill, please sort by LTM revenue in ascending
order.
○ You can sort multiple levels, so if you wanted to sort by industry first and then by
revenue within each industry, you just need to click ‘add level.’
● Combining Sort & Subtotal
○ Combining Sort with Subtotal (alt a b) can add further clarity to data sets.
○ In the illustration below, we first sort by industry, and then by market cap, and create a
subtotal for each industry.
Autofilter
● Drill – Autofiltering
○ What if you wanted to filter your list of companies to only show those with an EBITDA
that is greater than the group average?
○ Auto-filter (alt a t) is a tool that enables you to filter by a wide range of criteria.
○ You should now see drop-down arrows in the column headings of your table.
○ Notice that the filtered rows have been hidden, but not deleted
○ Fortunately, if you copy and paste the filtered range to another area of the worksheet or a
different worksheet altogether, it does not copy over the hidden rows
● Once a filter is applied – you can tell which column was filtered via the funnel icon.
● To remove individual filters, click on the filter icon and ‘Clear filter.’
● To remove all filters, hit alt a t again.
Pivot Tables - Part 1
●
●
●
●
●
●
●
●
●
A Pivot Table is an efficient, visual tool for analyzing, exploring, and presenting large amounts of
data.
It is particularly useful when your data needs to be sliced and diced in a variety of ways.
Can be a huge time saver over complicated lookup & reference formulas, sorts and filters.
Here we see a large data set. With a pivot table we can quickly answer questions like:
1. Which property type is most expensive / most common in a specific region?
2. Which REIT had the greatest sales within a specific region or for a specific property
type.
The name “Pivot Table” comes from the ability to ‘Pivot,’ or quickly swap out different row and
column parameters to observe data in different ways.
Use your arrows to move to any cell inside the table of data and hit:
○ Alt n v t (Excel 2010).
○ Alt n v (Excel 2013).
Excel will automatically highlight the entire table of data. Select to open the Pivot Table in a new
worksheet.
A new worksheet will open showing the Pivot Table Field List. This shows a list of the data’s
categories (REIT, property type, etc.) and the 4 areas of the Pivot Table:
Using your mouse, you can drag any of the data categories into any of the 4 areas of the Pivot
Table. As you drag a category into one of the 4 areas of the table, the Pivot Table itself will
automatically reorganize to accommodate the newly added category.
Ex:
●
●
●
1. Drag ‘Property Type’ to COLUMNS.
2. Drag ‘REIT’ to ROWS.
3. Drag ‘Sq. Ft.’ to VALUES.
The Pivot Table should automatically show the 4 property type column headers and a Grand Total
column as illustrated.
Clicking on the drop-down arrow allows you to sort and filter the column headers in various
ways. For example, if you wanted to show data only for BRE Properties, you could unselect the
other REITs:
You can have lots of fun with the pivot table:
○ 1. Drag the ‘Region’ field below REIT in ROWS see how each REIT performs by region.
○
2. Replace the ‘Sq. Ft.’ field with ‘Property Values’ in VALUES.
●
Drill – Value Field Settings
○ To see counts of properties by REIT and Region instead of sum of all their property
values, all you need to do is change the Value Field Settings of the field in VALUES .
○ The Field Settings enables you to show outputs in a variety of different ways.
○ The Value Field Settings also has a “Show Values As” tab, which enables you to present
the VALUES in a variety of useful ways.
■ In this illustration we present property values for each REIT and Region as a %
of the total.
■ Another very useful “Show values as” output is ‘running totals’, for when the
data table is presenting tiered data.
●
New to Excel 2013 – Distinct Count
○ Prior to 2010, a challenge was capturing distinct counts of duplicate items presented in
large data sets. To illustrate, say we wanted to identify the distinct count of invoices by
manufacturer so that Toyota’s sedan invoice #234 is only counted once.
○ In Excel 2010 you could see counts (like in the prior screen) but not distinct counts.
○
In Excel 2013 distinct counts have been added, to the elation of many.
Chapter Nine: Using Excel to Solve Problems
1. Fiscal half date problem
2. Olympic Event Problem
a. Asterisks tell excel that anything before or after is fair game
*** remember “<”& or “>”& is to check signs
Chapter Ten: Using LAMBDA to Create Custom Functions
●
Use a LAMBDA function to create custom, reusable functions and call them by a friendly name
○
GRATE: grows data by a growth rate
■ =LAMBDA(base,growthrate,base*(1+growthrate))(C9,D10)
○
CAGR: calculates a CAGR
■ =(final result/ beginning result)^(1/t) - 1
■ =LAMBDA(vfinal,vbegin,t,(vfinal/vbegin)^(1/t)-1)(G20,C20,4)
● Instead of hard coding 4, you can use formula like counting columns
○
DSO: calculates Days Sales Outstanding (Using ending period AR, or Accounts
Receivable)
■ =LAMBDA(AR,Revenue,DaysinPeriod,DaysinPeriod/(Revenue/AR))(F27,F28,F
29))
■ ** has to be in right sequence
○
IMPLIED G: Calculates the implied growth rate of an annuity, given the PV of the
annuity and first period cash flows. Implied growth
■ =LAMBDA(rate,cashflow,value,(rate-cashflow/value)/(1+cashflow/value))(C42,
C43,C44)
○
EOQUARTER: Calculates the quarter-end date, x quarters from a provided date
■ =LAMBDA(date,quarters,EOMONTH(EOMONTH(date,(ROUNDUP(MONTH(
date)/3,0)*3-MONTH(date))),quarters*3))(B67,D67)
○
TSM (treasury stock method): Calculates share dilution from stock options using the
treasury stock method
■
=LAMBDA(numoptions,strikeprice,currentprice,SUMIF(strikeprice,”<”&current
price,numoptions)-SUMPRODUCT(numoptions,strikeprice*(strikeprice<current
price))/currentprice)(C75:C78,E75:E78,C73)
● Can use arrays
○
SHEETNAME: Outputs the name of an Excel worksheet
■ =LAMBDA(reference,RIGHT(CELL(“filename”),LEN(CELL(“filename”))-FIN
D(“]”,CELL(“filename”))))(D98)
●
Alt m n → invoke name manager → this is where you assign LAMBDA and paste in the
formula. Make sure to explain formulas function
●
Using LAMBDA Across Multiple Workbooks
○ Open Name manager
○ Have the option of storing in workbook or individual worksheet
■ If you open another file, you can’t use lambdas you've created. How do you solve
this?
○ Can create a clean sheet and move it to diff workbooks → can invoke lambdas
Appendix: Recording Macros & Custom Formatting
VBA & Macros in Excel
● Introduction to VBA & Recording Macros
○ Frequent Excel use almost certainly entails repeating many tasks. For example, you might
find yourself setting up print ranges in a particular way, or formatting cells in a particular
way.
○ Rather than repeatedly going through the same series of steps to do this manually, Excel
allows you to record a sequence of instructions, and assign a keyboard shortcut to invoke
them as desired. The instructions are called macros.
The sky is the limit:
● Excel also enables users with no programming knowledge to write Macros using Excel’s
intuitive macro recorder, which essentially watches what you do visually in Excel and converts
it into a programming script.
● Of course, having a computer programming background can definitely help to power charge
your macros because Excel enables you to write these Macros using programming scripts
● The goal of this brief treatment of macros is to introduce you to the macro recorder and give
you just a sliver for vast capabilities of using macros in Excel.
●
Before we begin, make sure that you see the Developer tab in the ribbon
Don’t see the Developer tab?
● Click the File tab.
● Click Options.
● Click Customize Ribbon.
● Under Customize the Ribbon and under Main Tabs, select the Developer check box.
●
Drills – Recording Macros
○ Create a macro to turn a cell’s contents blue, format it to have 1 decimal place, comma
delineated, with a yellow background.
■ 1. Select ‘Use Relative References.’
■ 2. Place the cursor in any cell.
■ 3. Alt l r brings up ‘Record Macro’ menu.
■ 4. Input a name and shortcut key (ctrl shift z). As soon as you hit ‘OK’, you are
starting to record this macro.
■ 5. Format the cell (using Ctrl 1).
■ 6. When finished, hit alt l r to stop recording.
○ Now try going to any cell or a range of cells and hitting ctrl shift z; those cells’ contents
should be formatted per your preferences.
●
Caution on using macros
○ The biggest problem with macros is that after you run your macro, you lose the ability to
undo all the prior work so be careful!
○ Custom shortcuts override pre-existing shortcuts.
○ If you want your macro to run every time you use Excel, select Personal Macro
Workbook instead of ‘This Workbook’.
○ After the macro is created, you can always delete or rename a macro or change shortcut
keys assigned to it by clicking ‘Macros’ in the Developer tab.
Download