Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
2 views

Excel

The Excel Fundamentals course focuses on essential formulas and functions specifically for financial analysis, filtering through the vast array of options available in Excel. It includes a summary sheet with helpful notes and keyboard shortcuts, organized into categories such as pricing, aggregation, lookup, and date functions, along with return analysis functions like NPV and IRR. The course aims to enhance efficiency by teaching keyboard shortcuts and best practices for using Excel effectively in finance.

Uploaded by

bekiron570
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Excel

The Excel Fundamentals course focuses on essential formulas and functions specifically for financial analysis, filtering through the vast array of options available in Excel. It includes a summary sheet with helpful notes and keyboard shortcuts, organized into categories such as pricing, aggregation, lookup, and date functions, along with return analysis functions like NPV and IRR. The course aims to enhance efficiency by teaching keyboard shortcuts and best practices for using Excel effectively in finance.

Uploaded by

bekiron570
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 55

Welcome to our course, Excel Fundamentals, Formulas for Finance.

It can be a little bit overwhelming in Excel sometimes, because there are literally hundreds,

if not thousands, formulas and functions in the software, and it's hard to know which

ones are the best ones to use within the finance profession.

So this course effectively filters and sorts through all of those formulas and functions

to focus you on the ones that are the most important for financial analysis.

One of the other things that we've included in this course, which you may find incredibly

useful, is this summary sheet that we're bringing up on the screen right now.

There's some really helpful notes about the various functions in here, as well as some

of the most common keyboard shortcuts that we find we use day in and day out.

We've also taken all of those useful formulas and functions that get used in finance and put

them together into categories or families that make sense.

So we're going to look at pricing functions, aggregation functions, lookup functions, and

a family of date functions, as well as a lot of functions which get used for return analysis,

like NPV, IRR, X NPV, and XIRR as well.

This course will not only explain the functions, but it will also show you the most common

application of these functions.

So you can understand exactly how and where people use them.

We also look at some of the nuances of these functions.

So you can understand some of the pros and cons of selecting one over another.

As we mentioned earlier, the entire library functions available in Excel can be very overwhelming.

This course will save you immense amounts of time by helping you sift through and focus

only on the functions which are the most effective within the finance industry.

There's lots to cover, so let's get in there and get started.

So let's start off by discussing some of the learning objectives for this course so you

can understand exactly what you will gain from your valuable time that you've invested

in this course.

Now we discussed in the last video that we've organized these Excel functions into groups

or families that make sense.


The first one for us to discuss is the basic functions.

So these get used typically to do statistical analysis on datasets and this is going to

be one of our foundational building blocks for the course.

We're then going to look beyond these statistical functions and look at functions that get used

to aggregate or summarize some of the results and group them in a different way using aggregation

functions.

Now a course like this would not be complete without a discussion of lookup functions.

Not only are we going to discuss some of the newest lookup functions available in Excel,

we're going to talk about some of the older ones as well.

Why?

You're going to encounter older legacy files with these functions in them and you need

to know how to audit them.

We're also going to discuss date functions.

Date functions can be really overwhelming.

There can literally be hundreds to choose from.

We're going to focus on a small group that can allow you to easily get 95% of the things

done within the finance profession.

We're also going to be discussing how to calculate various returns.

We're going to look at the MPV and XMPV function as well as the IRR and XIRR function to make

sure that you know the difference and know how to choose the one that's most appropriate

in all cases.

And finally, as we walk through various parts of this course, we're going to be discussing

some more advanced custom number formatting so you can understand how to properly format

numbers as well as dates, lots to cover in this course, and a lot of it is really fun.

Let's jump in there and get started.

Hi, my name's Duncan.

I'm happy to be sharing this course with you.

Excel can be quite overwhelming and there can literally be just too many functions and formulas

to choose from.
I've used Excel for over 20 years in my career and I've always enjoyed the time that

I've spent with Microsoft Excel.

A lot of the things that we'll be presenting in this course were things that I had to figure

out myself along the way.

One of the things I always like to do with these courses is try to teach you all the

things that I wish I knew 20 years ago when I was starting out and when there was no CFI.

So you're really going to find that this course is filled with powerful pro tips and advice

on how to use Excel quickly and efficiently to get into the spreadsheets and get what

you want out of them as quickly as possible.

One of the key things with Excel is that you want to have a large vocabulary of functions

that you know and understand.

That way you can always be selecting the right one for the particular job or circumstance

that you're encountering.

The time that you spend investing in this course will really, really help you save much

more time in the future as you're able to quickly sift through the hundreds of functions

in Excel to focus on the ones which are going to help you get the job done the quickest.

So I'm excited to share this time and some of my experience and advice with you over the

course of these lessons.

Look forward to getting into it and let's get in there and get started.

Now if you've taken one of our Excel courses before you've definitely probably heard us talk

about the advantages of using the keyboard.

In particularly, it's used extensively in the finance industry for a few reasons.

Let's discuss here some of the standard reasons why people choose the keyboard over the mouse.

First of all, it saves time, makes you more efficient.

It also makes you more agile.

You're easily available to move around the spreadsheets quickly and easily.

The other thing is that it's pretty fun because you're going to be really, really efficient

and you're going to be learning a new skill.

But for me, the keyboard is more than that.


You need to think about yourself and your computer as a team.

Your brain is fast.

The computer's brain, i.e. its processor, is also really fast.

What's the slowest part of the system?

The place where you interact with the computer.

If you're using the mouse for that interaction, then you're wasting enormous amounts of time.

The keyboard allows you to get your thoughts and commands into the computer as fast as possible

so that you can move really, really quickly through your work.

One of the things that we really want to challenge you with in this course is to not use your

mouse.

We're going to be showing you lots of keyboard use and showing you lots of shortcuts.

It's going to feel really awkward and inefficient at the beginning.

Promise you, if you invest time in it, you will thank yourself later as you will be a

very, very efficient person in Microsoft Excel if you persevere with the keyboard.

Let's jump in and get started with some shortcuts.

In this quick chapter, we're going to look at some of the most basic functions that can be

used on a dataset in Microsoft Excel.

By working on a nice small manageable dataset, we'll be able to see exactly how these different

common functions are working.

The best part is that all of these functions work equally as well and just as easily on

large datasets.

We'll be looking at really common functions that get used for statistical analysis in

Excel like minimum, maximum, average, and median.

We're also going to be looking at rounding functions and some of the subtle nuances that

are involved in those functions as well.

Finally, we'll be looking at some functions in Excel that can allow you to take out the

largest, second largest, and third largest entry in a dataset without even sorting the

underlying data.

We've got lots to cover and we're excited to jump in.


We'll see you there.

Now as you can see, by looking down here, we are on the pricing tab or the pricing worksheet.

To move between worksheets, just as a reminder, remember that you can hold down the control

key and then use page up and page down to move between those tabs.

Let's get familiar with the dataset that we're going to be working with.

As you can see right down here, we have some invoice data.

On each individual invoice, we can see the item that was sold and the price that it was

sold at.

This is a nice sized little dataset for us to work on.

All of the functions that we're going to experiment will work on this dataset and will work equally

as well on larger datasets.

Now, it'll be really nice for us to work on this dataset because we'll be able to see

all of the data here and then all of the output calculations over on this side so it'll

make for a really nice dashboard.

Now, let's begin in this area of the spreadsheet here where we simply want to calculate the

minimum, maximum, average in the median for the dataset.

So to calculate the minimum, let's pop into the cell here and put equals min and we're

going to open a bracket.

Now, we'll use the left arrow just to go over here to the top of the dataset.

Now to get all the way down really quickly, we're going to use control shift down like

this which will select to the end of the numbers and then we don't even have to close the

brackets.

At this point, we can just hit enter.

We're done.

Now to save ourselves some time, we're going to want to take this formula we've just put

in and then copy it downwards.

So let's select down using the shift key in the down arrow and then hit control D for

a fill down.

Now, if we pop into this cell and hit F2, we can obviously see there's a problem.
Since the references are moving, we need to go back to this original cell here and lock

the cells down.

So let's actually do this completely with the keyboard.

Let's go into this top cell here, tap F2 and now we can move with the left arrow a little

bit over to here.

Hold down the shift key and use the left arrow again to highlight all of these references

and now just tap the F4 key once.

You can see what it does is it puts dollar signs in front of the columns and the row references.

In fact, if you were to tap the F4 key a few times, you can see it cycles through all of

the different options that you have for locking these cells.

But what we want is we want the references locked to the columns, for instance, dollar

sign D and to the rows like dollar sign six and then we can hit enter.

So now that we have this first one locked, let's highlight from that first cell, use the shift

key to select down and now hit control D for a fill down.

Now if we go to the bottom cell and tap F2, we can see that the reference has been completely

locked and it's working as expected.

So now we have all of these cells referencing the data set perfectly.

So we just need to change the function name.

The first one is fine because we can see we have a min function in there.

But let's tap F2 for the second cell here and just use the left arrow to go over and change

this to a max and then hit enter.

For this one, we can hit F2 and we want to use the left arrow.

We want to delete out the word min and replace it with average and hit enter.

For this last one, it's going to be the median.

So let's just delete out this and put in median like that.

Hit enter, we're all done.

So it's always a good idea to double check your work.

Let's go back into the first cell and we're going to check the function name and the

cell references.
So we tap F2.

We can see a min function and the correct data set.

Second cell, max, correct data set again.

Here we have an average and it's grabbing the data set and then finally a median.

It all looks perfect.

So we've already been able to learn a little bit about the data set even from these basic

functions.

We know that the data ranges from a minimum of 90 up to a maximum of 415.

We have an average of 267 and a median of 240.

Let's jump ahead to the next video where we're going to look at some rounding functions

down here in this particular area.

We'll see you there.

So as we mentioned, we're now going to go and fill in this section of the spreadsheet

here.

But before we do, let's take a closer look at this average of 267, which is up above.

Even though this is showing up here as 267, there may be some digits after the decimal

place that we want to see.

In fact, it's pretty easy for us to increase the number of decimals.

Let's go into this cell.

We could go up here to the home menu and then we could simply click right here for increase

decimal or decrease decimal.

Now if you're with us for the previous Excel course, Excel Fundamentals Quick Start Guide,

you would have remembered that we actually added increased decimal right up here and decreased

decimal up here inside our quick access toolbar.

If you're interested in learning how to do that, definitely take a look at that course.

So with increased decimal right up here in our quick access toolbar, we can tap the Alt key

and you can see Alt 1 is going to activate that shortcut.

So we can just hit Alt 1 a few times like this until we get four digits after the decimal.

So now we're seeing the average for the data set with a little bit more precision.
Now we may not want to see all of this precision.

In fact, let's experiment with a little bit of rounding down here so we can bring the average

into these cells, but round it off a little bit.

And as you can see, we've set up a little bit of a template for you.

So we're going to round to this number of digits, two digits, one digit, zero digits,

et cetera.

And let's start in this cell right here.

So in this cell, we can tap equals and just start typing in ROU.

And as soon as we see the function names come up below, now we can use the up and down arrows

until we get to round.

Once we get on that round function, hit the tab key, it will complete the function name

and open the bracket for us.

The first thing it's asking for is the number.

So let's use the up arrow to go here to average.

We want to lock that reference.

So let's tap the F4 key and now that's locked.

Now we put in a comma.

Now it's looking for the number of digits.

For the number of digits, let's use the left arrow to get over here to get the two and

then we can hit enter.

So now that we've successfully locked down the average, which is referencing, we can copy

it downwards and save ourselves lots of time.

Let's select from here all the way down and hit Ctrl D to copy it down.

It's always a good idea to check our work.

So let's go down to this bottom cell, tap F2 and we can see this reference locked perfectly.

This red reference on the left has traveled down as we've copied it.

Wonderful.

So let's look at what this round function is doing for us.

When we ask for two digits, as you can see, we're seeing two digits after the decimal here.
For instance, it's rounding to the nearest penny.

So then in this next example, when we ask for one digit, it's rounding to the nearest multiple

of 10 cents, like 10 cents or 20 cents, for example.

And then here, when we ask for zero digits, it's rounding to the nearest whole number.

In this case, 267 or it could have rounded up to 268.

Now most people when they use the round function, they will either use a zero or a positive number.

A lot of people don't actually know that you can use negative numbers with the round function.

So in this case, when we ask for a negative one, it's rounding to the nearest 10.

And here with a negative two, it's rounding to the nearest hundred, like 300, for example.

So it's really nice to be able to do some rounding in Excel.

As we mentioned, you don't always need this kind of precision in your spreadsheets and

your financial analysis.

And down here by using the round function, we have a lot of flexibility on the number

of digits.

What we're going to do now is hop into the next video, we're going to look at some of

the highest priced items here and down below some of the lower priced items.

Let's jump into it.

We'll see you there.

So as we mentioned, we definitely want to fill in this area over here.

Look at some of the high priced items and below it, some of the lower priced items.

Before we do, let's go over here and take a look at the average.

We've left a lot of precision showing in this number.

We don't necessarily need it.

So let's decrease the decimals there.

And as you can remember from a previous lesson, let's look up here and we can use Alt-2 to

decrease the decimal in our quick access toolbar.

So Alt-2, a few times, just like this, will decrease it back down to 267.

Now if we wanted to go over here and look at the highest priced item, we already know

what the price is.


It's right here.

We've calculated the maximum as 415.

Similarly down here, the top lowest priced item would be $90 as shown over here.

But more importantly, what we're really after here is the second highest priced item or

the third highest priced item.

We need to know how to calculate those.

In fact, this is something relatively common that people really struggle with in Excel.

If you ask them for the second or third highest priced items, most people would go over to

this original data set here and start sorting it and then counting down to get to the second

or third.

We have a much better way.

As a general rule, it's always best practice to leave the original data untouched and just

extract what you want for it without manipulating it with a sort.

So the function we're actually going to use to get the first, second, third highest priced

item is the large function.

So let's just type in equals LA and already we can see it come up down here, large.

So we want to use the down arrow to get to the word large and then hit that tab key, which

will complete the function name and open a bracket for us.

It's first of all asking for the array.

So we're going to use the arrow to go over here, control shift down and that's selected

all the data.

Now we're going to put in a comma and now it's asking for K, which is not very descriptive,

but K is really the rank.

So we're going to put in here a rank of one and we're going to reach over and grab this

cell and then we can hit enter.

Now you can probably guess what we're going to do next.

We're going to pop into this cell here, tap the F2 key.

Remember, we want to lock that reference down.

So we're going to highlight across here by using the shift key, tap the F4 key once.
So we've locked the range for the data, but we've left that red cell over here unlocked

so that we can copy that one downwards.

Let's hit enter and now highlight down like this using the shift key and do a control D

for a fill down.

So let's check our work quickly down to the bottom cell.

We can tap F2.

We can see the range for the data is completely locked, but this red cell has nicely referenced

downwards as we've copied it.

It looks perfect.

Now here's what we're going to do next, save a bunch of time.

Let's copy all of these cells.

First of all, we're going to select them, control shift down.

We're going to do a copy, control C down into these cells and do a paste.

Now as we can see over here, we've selected all of these cells.

We could hit control F on the keyboard, which brings up this dialog box for find and replace.

But then we'd have to click over here to get onto the replace tab.

Let's hit escape and instead try control H, which gets us straight into the replace tab

right away.

So we want to find large and then hit tab and then replace it with small.

Now we can use the tab key to get down here to replace all and then hit enter.

And it's replaced five replacements, perfect.

So let's do a quick check.

We can see here the lowest price item is showing up with a price of 90, which is exactly aligned

with the minimum here.

Amazing.

So let's do a couple more checks.

If we go into the second item, we can see the small function is grabbing the correct data

set and it's grabbing the number two down here, correct data set, it's grabbing the number five.

So we've already been able to do some really basic quick analysis on our data with the
min, max, average and median.

We know how to do some basic rounding over here and we know how to use the large and the small

functions to grab some of the highest and the lowest priced items.

There's been a lot for us to explore in this tab.

Let's jump forward to the next lesson and we'll move over to a new tab.

See you there.

In this chapter, we're going to be looking at some of the most common aggregation functions

in Microsoft Excel.

This allows you to scan through the data set and aggregate the data up into the type

of totals organized into the way that you prefer.

We'll start off by looking at how you can put conditions into formulas like for instance

an if formula or function.

We're also going to look at a whole family of functions called SUMIF, COUNTIF and AVERAGEIF

for example.

Now this family of functions obviously only can handle one criteria but then we're going

to go on to look at a different family of functions that can handle multiple criteria like SUMIFS,

COUNTIFS and AVERAGEIFS for example.

And although these more complex aggregation functions can handle multiple criteria, they

do come with some limitations which we're going to discuss in detail.

Lots to cover here and some subtle nuances to go over so let's dive into it.

We'll see you there.

Now as you can see down here, we're still on the pricing tab.

We want to move over to the aggregate tab so we can hit Ctrl, Page Down to move over to

the aggregate tab here.

As you can see our invoice data has a little bit more information.

Instead of just showing us the item and the price, we now have the quantity as well.

So we're going to want to calculate revenue, determine whether or not each invoice was

a single item or not.

Also as the tab name aggregate would imply, we're also going to want to aggregate the
data in different ways.

Here we have a list of all the unique items sold and we'd like to know the revenue from

each unique item.

And let's also zoom out a little bit just so we can see what's below.

We're also going to want to aggregate down here again by each individual item to show the

number of invoices, quantity, price and the revenue.

And finally across down here to this bottom right quadrant, we're going to look at the

ability to pull out individual items and look at their revenue totals as well.

We've got lots to do so let's jump into it and get started.

Now to get started, let's move up to the top left quadrant here and we're going to use

control alt equals just to zoom in a little bit like this, perfect.

To start things off, we have some pretty straightforward calculations.

For example, we can easily get revenue by multiplying quantity times price.

So let's put in an equal sign here, grab quantity multiplied by price and we can just

hit enter.

And now we want to copy that down so we're going to use the shift key, the down arrow to

get down to here and then control D for a fill down.

Now if we jump down to the bottom, you can see here that we're wanting some totals.

So we can use a great keyboard shortcut right here to get the total quantity and we're going

to hit alt equals just like this on the keyboard, which puts in an auto sum and notice how it

automatically detects exactly where the numbers end and then we can just hit enter.

That's a really great shortcut and an easy one to hit as well.

So let's use it over here for revenue.

We can just hit alt equals enter and we're done.

Now what we need to do next is think really carefully about what we're going to do here

for the price.

If we were to just put an average in here, then it would be a simple average, which would

effectively ignore the quantities.

Instead what we're going to do to get a weighted average price is we'll put in a formula where
we say the revenue divided by the quantity, which will give us the weighted average price

that was paid across all of these invoices.

Let's hit enter here.

So now with that filled in, let's pop up here and investigate this column right here.

And what we want to do here is we want to determine whether or not there was a quantity

of one, in which case it was a single item, otherwise it would be a non-single item.

Now this is a perfect example right here where we can use an if statement.

So let's put in equals if like this and open the bracket for the logical test, we're going

to say if the quantity is equal to one, then it was a single item.

So we're going to put in double quotes, the word yes, close double quotes.

And then we're going to put a comma, otherwise value if false would simply be no.

And we close those double quotes and then close the brackets and we can hit enter.

So now we can simply go back into the cell, select down with our shift key and then do

a control D for a fill down.

So we always recommend that you check your work.

So we're going to go down here.

We have a quantity of one, single item, yes, quantity of one, we're showing a yes there.

Here for these two, we're also showing a yes.

So it appears as though it's working perfectly.

So great work filling out this first quadrant with the invoice data.

Let's jump ahead to the next video, or we'll start to aggregate some of these figures for

each item.

We'll see you there.

So great work filling out this top left quadrant.

Now we want to move down to the quadrant below.

So let's zoom out a little bit, control alt minus, can zoom you out in nice increments

and we want to get the zoom level so that we can see the revenue by item below.

And as we can see down below here with the revenue by item, we have a unique list of all

the item numbers and we want to know in total how many invoices were for each item
like Maxio, the quantity, the price and ultimately the revenue.

And this is where we're really going to start to aggregate some of these figures and we just

used an if function.

Now we're going to explore a family of functions that has a count if, a sum if and an average

if.

Let's look at them and see which ones are appropriate for this exercise.

Now the first one to investigate right here for the invoices is going to be a count if

function.

So let's put in equals and just start typing the word count and we can see count if on

the list here that we can access using the down arrow and then hit tab and it opens the bracket.

First thing it's looking for here is the range.

So for the range, let's select all of the items from the top control shift down to get

to the bottom and then we're going to put in a comma and for the criteria, we're going

to select what's right here in cell B26 and then we can hit enter.

Perfect.

Now we're going to want to copy this formula down.

So let's pop back into the cell, hit F2 and we're going to need to lock down that range

that's in blue.

So we're going to use the arrow key to go to the left, hold down shift so we can select

the whole range, tap F4 once that locks that reference.

Now we can hit enter.

Now to copy it down, we select downwards with the shift key and hit control D, which is a

fill down.

So what is this formula really doing for us?

Well, as the name count if would imply, it's counting only if a certain condition is met.

So here in this first row, our condition is maxio.

So it's going all the way down this list and counting how many times it sees the word

maxio, which is two.

And then in the next row here, it's counting down that same list looking for the word selfie
and it finds one of them.

So at the end of the day, we get the number of invoices that we're looking for.

Down at the bottom right here, we could put in an alt equals, which is an auto sum and

hit enter to get the total number of invoices across the bottom.

Now it's great for us to start out with the count if function, but within that family

of functions, there is also a sum if and an average if let's explore some of those other

options in the next video, we'll see you there.

So in the last video, we used the count if function, which works really well for the number

of invoices, but here in order to get the quantity, we're going to explore within that

family and use the sum if function, because what we really want to do up here for say

maxio is we want to be able to sum the quantity of four together with a quantity of three to

get a total of seven.

So let's dive into it.

If we hop into the cell right down here, we can put in equals and then just start typing

sum if like this and we can see it come up right there, sum if singular.

So we can hit tab and it's first asking for the range, which is not incredibly descriptive.

But what it's looking for is it's looking for where it can find the items, the various

items, and we're going to select all the way down this list here for the range, let's

put in a comma.

Now for the criteria, the criteria is going to be obviously over here, maxio, okay.

Now we put in a comma, the last thing it's looking for is what to aggregate.

So in this case, we what do we want to sum, well, we want to sum up all of these numbers

here, which is the quantity, and then we can close the brackets and hit enter.

We definitely want to make use of some good cell locking here so that we can copy this.

Let's pop into the cell, tap F2, okay, we're going to use a left arrow and go across this

blue reference here to range.

Let's tap F4 once.

So that's completely locked.

And the last reference here to the sum range, we're also going to tap F4 once.
So that is totally locked.

Let's think about this one carefully.

What we'd like to do here is only lock the column B, but have the 26 unlocked.

So let's tap the F4 key once, twice, and then third time is what we want.

The dollar sign in front of the B locks the B, but there's no dollar sign in front of the

26, which means it can change to 27, 28, et cetera.

So let's hit enter and we're all good there.

So now that that's all locked down, let's just hold down the shift T, control D for a

fill down.

Great idea to check our work as well.

Let's go to this bottom cell, tap F2.

As we can see, this range here, completely locked, as is the purple one, but this red

cell moved down perfectly.

And now that we're in the cell below, we can hit alt equals, which is an auto sum, and

hit enter and we get the total quantity of 29.

We can check our work quickly as well.

Let's just visually look for Maxio.

We can see it comes up there on two invoices.

We can visually see that they add to seven and we can see a quantity of seven right here.

Now, we can also use the sum if actually for the revenue.

In fact, if we look here at Maxio, what we want to do, just as we summed these to seven,

we could also sum up the revenue here, which would get to about 2,500 roughly.

So this is where that cell locking that we did very carefully on the quantity is going

to come in really handy.

Let's go down here and we're going to hold down the shift key and we might as well grab

the bottom total as well.

And we're just going to do a copy over to revenue and a paste.

Now we're going to need to make a modification to this formula.

So let's go into this first entry here, we're going to tap F2.
And what we effectively need to do is take this purple range here and move it over so

that it's summing revenue.

You could do that with the keyboard by going in here and changing the D to an F like this,

just putting in say F there and F there and that would do it.

What you can also do if you like using the mouse is grab these and then move them just

like this across over to revenue and then we can hit enter.

Now that we've made the change here, we need to copy it downwards.

So let's just select with the shift key all the way down to the last item here but not the

total and then hit control D which copies and pastes everything down with a fill down.

Let's discuss now what to do for this price column.

We have within the family of functions a count if a sum if and an average if.

We know the count if is not appropriate because we don't just want to count the prices that

are entered.

We also don't want to sum them.

For instance, we wouldn't want to take these two numbers together and sum them to 710.

That would not be appropriate.

We have an average if function.

The problem there is it's going to do a simple average of these prices which completely ignores

the deviations here in quantity.

So the correct approach in order to get the weighted average price that we're truly looking

for is to use revenue and quantity to back solve for it.

So in here in the price column we're going to say equals the total revenue that we have divided

across the quantity that was actually sold.

We hit enter.

This gives us a perfect weighted average price.

So what we want now is to be able to copy this formula all the way down to the bottom but we

don't want to mess up the different formats we have with bold on the bottom.

So we're going to do a copy, control C. Now use the shift key, highlight all the way down

including the totals and we're going to do Alt E S where you could also do control
Alt V to have this come up which is a paste special.

Then we go down to formulas so we're only pasting the formulas and we hit enter and that's done.

Now one really nice spot check that we can do here just to check our work is we can see

that we have 12 invoices and down here showing 12 invoices.

Quantity of 29 is consistent with the quantity here.

The price of 278 and the revenue of 8 0 5 0 is consistent with what we're getting down

here so everything looks great.

So great work completing that quadrant of the dashboard and now you've added a new family

of functions to your skill set.

For instance you have count if, sum if and average if as well.

The next video we'll check out yet another family of great excel functions that we can

use to aggregate.

So in the last video we looked at a family of excel functions that had count if and sum

if and average if.

We're now going to look at the plural versions of those formulas.

So for instance count ifs, sum ifs and average ifs.

Now for this demonstration let's zoom in just a little bit so we can see really clearly

what we're building just like this.

So in this case we're going to use a sum ifs function right in this cell.

There'll be two conditions.

Condition number one we want the item to be maxio.

Condition number two we want it to be a single item or a single item yes.

So let's start off in this cell by putting in equals sum and then we can use the arrow

key to get down to the plural version sum ifs hit the tab key.

Now the first thing it's asking for this time is the sum range.

Before the sum range was the last thing it asked for so watch out for that.

So the sum range is the thing that we want to sum.

And what we want to sum up here in this case is the revenue.

So we've selected all of the revenue numbers.


Let's put in a comma criteria range one will be all of these item numbers over here or

these item names I should say and then put in a comma the criteria one itself will be this

item right here which is maxio and so I seven then we put in a comma.

Now it wants criteria range two which will be over here it's all these yeses and nos

and now we put in a comma and it wants criteria two which is just up above here where it says

yes.

Now we close the bracket and hit enter.

Now let's do some really careful cell locking pop into the cell.

Tap F2 we want these ranges to be completely locked so the first one that's in blue here

I'm going to tap F4 once okay the one that's in red here I'm going to tap F4 for that one

as well and then the third one which is green we're also going to tap F4 once to completely

lock them.

Now let's put some careful thought into these cells cell I7 we only want the eye locked but

not the seven.

So let's tap F4 one two three times so that that is accomplished with only the eye locked.

Now over here we want the opposite we don't want the J locked so it can move across to K

but we want the number six locked so let's tap F4 once twice and that'll do it so the

six is locked let's hit enter.

Now let's test whether or not those cells are locked correctly from this cell let's use

the shift key and highlight all the way down and then one over to the right and we're going

to hit control D for a fill down now control R for a fill right.

Now you may want to be thorough and check every one of these cells but in fact you only need

to check one of the diagonal cells what do we mean by that well we started in this cell

right here so if we go down and then to the right we get to this cell which is diagonal

from the original cell if we tap F2 and do a test we're checking whether or not it responds

correctly when it goes up and down and left and right what do we see we see these three

ranges here all perfectly locked with no movement this cell here moved downwards perfectly

but it always stayed in column I and then this cell here moved across perfectly but it always

stayed in row six so everything's working perfectly so we can hit enter and now we know that in
fact everything's working for all of these cells in this range so what's next we're going

to use one of our absolute favorite excel shortcuts I'm going to go into this cell here

and tap Alt equals which is a auto sum and as you can see it works horizontally as well

as vertically so we hit enter now and now we're going to highlight down with the shift key

control D to fill down now what we can do is go to the bottom here and also do an auto

sum Alt equals hit enter and now we can highlight across in a control R which is a fill right

so we could spot check our work a little bit too right here we have this total revenue

number which is perfectly matching the revenue that's right down here eight zero five zero

let's take a quick look at these two maxio items for example we know that the revenue here

is adding to two four eight zero and that's the revenue that we're seeing over here and

that's also derived completely from non single items so it looks like it's working really

well so let's jump ahead to the next video there are some nuances and limitations in

this family of functions we just discussed we'll walk you through them in the next lesson

we'll see you there so as we mentioned in the last video there's some slight nuances when

using the plural version of these formulas like some ifs for example let's just look down

in this bottom right quadrant this is where we're going to go through some calculations

just to illustrate to you exactly what some of these limitations are so let's start

off down in this cell right here and we're just going to use a simple some if function to

grab the revenue for soloist okay so in this cell we're going to put in equals some if just

like this for the range we're going to grab all of these items that are up here we're

going to put in a comma the criteria is going to be here soloist and then a final comma and

we want to grab the sum range which will be all of these revenue numbers that are right

here we can close the bracket and hit enter now let's pop back into the cell make sure

things are locked down properly here so we want to lock down this first range here with

an F4 and the second range over here with also an F4 and we're going to leave that other

cell unlocked now we can highlight down and do a control D to get these copied into the

next cell now down here if we were looking for the total we would probably put in an

autosum function quickly like this alt equals and then hit enter that would give us the total

of 2400 but what we're going to try to do is we're going to delete it out we're going to
try to build this up using some ifs since we have two conditions one condition here and

a second condition right here so let's go down into the cell here where the totals are

put in equals some ifs plural and we're going to hit tab and first we want the sum range so

that's going to be all of these revenue numbers that are right here let's put in a comma criteria

one will be up over here all of these items comma criteria one will be soloist and then we're going

to put in a comma criteria range two will be the same as criteria range one it will be all of these

items that are right here and then we put in a comma now criteria two will be different it will

be right here the word extreme and then we're going to close the bracket and hit enter so the

result here is very peculiar because we know the correct result is 2400 yet we're getting a zero

let's check our work if we tap f2 we can see that we've correctly selected here the sum range

and then we have criteria range one criteria one which is soloist criteria range two

and criteria two everything looks perfect so the reason here that some ifs is not working

is because some ifs can work for and logic but it can't work for or logic for example up here

when we asked for the number of items that were sold under maxio and that were not single items

that is an and condition we need both those conditions to be true for the formula to sum

but then when we built the formula down here we were actually looking for it to use or logic

we were saying we would like the revenue for soloist or extreme and the sum ifs function

cannot perform or logic it can only perform and logic so what we're going to do down here is

drop a couple of footnotes in place and we're going to ask you to pause the video if you could

and put these notes in we want you to understand that some ifs only works for and logic and it does

not work for or logic so it's great to know that limitation of the sum ifs function in that it can

only use and logic many people don't know that about the function so you want to select few

who totally understands it now the other thing to keep in mind is you can put as many conditions

in there as you want so there's really no limit it's quite a powerful aggregation

function now let's look ahead to the next video where we're going to look at some look up functions

we'll see you there so as you probably guessed by the name of this chapter we're going to be

discussing look up functions here really important to understand how they work and the pros and cons

of them because they're so common in Microsoft excel so one of the things that you're going to see

from this discussion is that over here we definitely prefer the newer xlookup function
to its predecessors which were hlookup and vlookup so you may be wondering why are we looking at
hlookup

and vlookup at all if there's a newer function and you actually prefer it the reason that you

need to understand these older functions like hlookup and vlookup is so that you could audit them in

older legacy files also you then know how to replace them with the newer xlookup functions

it's also great for you to know the limitations of the hlookup and vlookup functions

and also where they are very very prone to causing errors in financial spreadsheets

so it's great to know all of this so that you can convince people on your team to swap out the

older functions for the newer xlookup functions we're going to discuss all of those pros and cons

vanages and disadvantages in this chapter so as you can see down at the bottom of the excel file

we're on the lookups tab we're going to be looking at lookup functions in this chapter here

now let's get familiar with the data that we're going to be working with we can see here the title

commission rates and what we have here is we have all of the items listed from one to five

and the associated commission rates now this set of data here is in horizontal format

but we also supply the same identical data down below here in a vertical format with the item

numbers down this column and then the commission rates here you wouldn't normally see the data in

horizontal and vertical format but we wanted to show you in both formats here so you can get

familiar with using lookup functions in both of these formats now let's take a look down further on

the excel file here where we have commission calculations what we're going to be doing in these

chapters is looking at how to pull in information using an hlookup vlookup and then the two ways to

pull it in with an xlookup depending on the orientation so really we're going to have commission

rates across here and down to the bottom which are all identical and then we're going to use those

commission rates with the revenue here in order to calculate the commission down this side now as

we mentioned in the previous video we definitely prefer the xlookup function to its predecessors the

hlookup and the vlookup as we'll see in these videos the hlookup and vlookup functions can

introduce a lot of errors into financial spreadsheets now the xlookup function came out in 2019

so if you're using a version of excel like microsoft office 365 that's come out since 2019 you're

going to be good to go now even though we definitely recommend the xlookup function in all cases it's

so important for you to understand the hlookup and vlookup since you're likely going to encounter
some legacy files that have these lookup functions in them also if they're people on your team that

really don't believe in the new function xlookup then you'll be able to show them after these videos

where the shortcomings are with hlookup and vlookup and how prone they can be to producing errors
in

your financial spreadsheets lots to cover so let's dive in and get started so let's get started by

looking at the hlookup function right down here what we're going to do actually is zoom in using

control alt equals just like this and we're going to build across a number of lookup functions

right across here and then we'll copy them downwards afterwards now you've probably already guessed
what

the h and the v stand for they stand for horizontal and vertical so if we're looking at the hlookup

we're going to be looking at this lookup function that looks horizontally so we're going to use

for the hlookup this horizontal data here and it's going to have the ability to look horizontally

across just like this so the first step is let's hop into the cell right down here underneath hlookup

and type in equals hl and instantly the hlookup comes up we know that we can hit now the tab key

which completes the function name and opens up the first bracket the first thing it's looking for as

we can see down here is the lookup value the lookup value is essentially what we want it to look for

we want it to look for this item number item number four and then we're going to put in a comma

now the table array is essentially where we want the function to look so let's use the cursor and go

up here and we want the cursor to look across here to get the item number but we also need to

select the row below as well in the table array now we're going to put in a comma it's asking for

row index number so effectively it is asking for which one of these two rows should it return

when it finds the correct item number so obviously we want it to return row two which is the
commission

so we're going to hardcode a two in there like this and then we're going to put in a comma we have

one more optional argument now and it's asking if we want to do an approximate match here as you can

see down below or an exact match we're going to select exact match and we can hit tab key like

this to put the word false in there then we close the bracket and hit enter so let's just make sure

that we understand what this function is doing in this cell it's effectively looking for item number

four where is it looking it's looking horizontally across here and as soon as it finds item number four

right there it moves down to the second row here and returns two percent as you can see down here
into this cell now if we're going to copy this function down we're obviously going to need to

lock some cells so let's pop into the cell using an f2 and we're going to go across here now we don't

need this reference c21 to be locked at all but this red one here we want it to be completely

locked down so let's tap f4 so it's totally locked and then we can hit enter now if we pop back into

the cell here and tap f2 we can see that we've programmed in four parts to this formula in fact

each part is called an argument so there are four arguments in this formula in the next video we're

going to discuss one of these arguments in particular that causes an enormous number of errors in

Microsoft Excel think ahead to that next video about which argument that you think causes the most

errors and we'll see you there so we can discuss it so we hope you had some time to think about exactly

which of the four arguments in the hlookup causes the most errors we're going to show you exactly

which one it is and we're also going to show you a way to fix it and improve it so that you don't get

those errors in the hlookup if you happen to be using it in some files so let's pop into this cell

here and hit f2 so we can take a look at the function it usually isn't the first or second

argument which are causing errors in Microsoft Excel now sometimes it's the fourth argument if

we look at the fourth argument closely and in fact if we were to delete out the fourth argument you
would

see that the fourth argument here has square brackets around it that means that it's optional

so some people skip the optional argument which can cause some errors the issue here is that the

fourth argument if you skip it it actually defaults to an approximate match so it's always

our recommendation to put in that optional fourth argument and if you're looking for an exact match

you want to have the word false there to make sure that you're getting an exact match so as we

noted it can be this fourth argument which causes issues but most likely it is generally this third

argument here which causes an enormous number of issues the problem here is this too is what we

would call a hard code it is static and it's not dynamic in any way so what can happen is if a person

were to insert a row right here for instance we're going to go to this cell b6 and insert a row by

tapping alt i r for insert row so there's a new row here now and look what's happened to our hlookup

function down below it's now not working now let's make sure that we understand why it isn't working

if we pop back into the formula here we can see that now the computer would need the index row
number
to be a 3 but it's hard coded here as a 2 so it's actually returning the results from this blank row

this is how errors often happen in microsoft excel let's first of all make sure that we know how to

fix our spreadsheet before we go forward now many people in order to delete a row would use their

mouse and they'd hover over the row number like this and they'd right click and then they'd say delete

which would take out that row we're going to do it with the keyboard first of all we want to

select the row to select a row you do shift spacebar like this and then what you do is you hit control

minus which deletes out the row and by the way if you wanted to select a column you would do

control spacebar like this but we used shift spacebar which selected the row so everything's working

with our spreadsheet again down here we can see we're getting the correct commission at 2 percent

but what we need to do is we need to know how to automate this third argument so that we don't

run into any issues in the future let's jump ahead to the next video and we'll show you how to do just
that

So really what we need to do here, if we look inside of this function, is we need to figure

out a way to automate this two here. So the computer always measures the correct number

that's needed for the row index number. So what we're going to do here is pop into the

cell by tapping F2. And we're going to effectively replace this two, which is static with a dynamic

function called the rows function. So let's type in rows r o w s. And then we open up a bracket.

Now, if we try to move around in the spreadsheet, we're still actually stuck inside of this cell. So

we can tap the F2 key again once. And now we can move around in the spreadsheet. So what we want
to

do is actually select this area here for our rows function. And then we can close the bracket and

hit enter. So let's make sure that we understand how this function is working now. If we pop in here,

we can see that what's happening is that the computer is measuring this array here. And it's

determining that it has two rows. So it's returning a two into the h lookup. Now this rows function

could be anywhere. We could have placed it over here, but we decided to put it off to the side so

it was really clear and easy to see. One thing that we can do while we're in here is go over to

that rose function, select it and tap F4. So it's completely locked down and it won't move. And now

we can hit enter. Now here comes the ultimate test and a great opportunity for you to practice

some new keyboard shortcuts. Let's go up here and insert a row alt IR. As you can see down below,
right down here, our h lookup is working perfectly, since that rose function is now putting a three

into the h lookup. Remember how to delete a row? Well, first we select it. So we're going to go shift

spacebar to select a row and then control minus, which deletes it out. As you can see, everything's

back to normal down here. So I hope that was helpful. Now you know exactly what causes a lot of errors

in hlookups. It's usually due to the fact that people don't know how to automate this third argument.

So when an h lookup function, if you're going to use it, you want to make sure that you absolutely

have a rose function in that third argument, so that it will adapt if people insert or delete

rose into spreadsheets. Let's jump forward to the next video and we'll look at its cousin,

the V lookup. So let's jump in here and get our V lookup function built. It works in almost

the same way as the h lookup. So it's going to feel really familiar and should go pretty fast.

So let's start down in this cell right here, and we're going to put in equals V L and V

lookup comes up right away so we can hit the tab key. And first of all, the lookup value is going to be

similar to the h lookup lookup value is here. Item number four, let's put in a comma. Now the table

array, we're going to use this vertical data here, and we're going to use the shift key to

select all the way down, and then all the way across to get the commission as well. One little

pro tip here is that we can look at this tool tip right there that comes up. We can see that the

tool tip is showing us that this particular array is five rows by two columns. We're most

interested in the fact that it's two columns wide. It's really helpful because if you're

selecting a really wide array like this, it will measure for you that you have six columns,

and that can be really helpful when you're dealing with larger data sets. Let's select what we want

here. And now we're going to put in a comma. For now, we're just going to hard code the column index

number in as a two, because we want the second column here, which is commission, and then we'll

put in a comma, and we want to put in a false using the tab key like this, close the bracket,

and hit enter. Now we've started by building the vlookup here with a too hard coded, but we know

from the previous example that this is going to cause an issue. The issue here would be if a user

was to go in between these two columns and insert an extra column between them. So we're going to

automate that third argument here, but instead of a rose function, we're going to use a columns

function. So let's pop into the cell here and hit F2. We want to replace the hard coded to this

time with a columns function. So let's delete it out and type in columns like this, we're going to
open a bracket. And now remember, in order to get out of the cell so that we can move in the
spreadsheet,

we tap the F2 key once more. Now we can use the up arrow to go over here. And we're going to select

from here across to here for our columns function. Then we can put in a close bracket and hit enter.

Now let's not forget to lock things down. Let's pop back into that cell, hit F2. We're going to go

over here and select the columns function array and hit F4, which locks down those cells, and then we

can hit enter. So let's make sure we understand how this formula is working here. We can see that

we're getting a 2%, which is the correct commission. So it's really looking for item number four,

where is it looking? It's looking vertically down here. Once it gets to item number four,

then it goes across to the second column and returns this commission here of 2%.

Now we want to test things to make sure that they're working by inserting a column. Now remember

that Alt-IR was the keyboard shortcut for inserting a row. Well, it's really easy to remember how to

insert a column. It's just Alt-IC. So let's go to this cell right here and go Alt-IC,

and we've inserted a new column right here. And we can see that our VLOOKUP is working perfectly

down below. So let's just go in here and tap F2. And we can see that what is happening now

is this columns function is measuring this purple array. And it's determining that there are

three columns in the array. It's feeding that three into our VLOOKUP, which is the correct column

index number. So things are working really well. Now before we forget, let's clean up our spreadsheet

and practice some keyboard shortcuts. So we want to go to column C here. We select the column,

remember, by going control spacebar like this, and then we can use control minus to delete that

column out. Perfect. So now that we've built up here, the HLOOKUP and the VLOOKUP and correctly

automated that third argument in both of those functions, we've really gotten through the hard

part. You're going to find in the next videos that the XLOOKUP is so much easier, and it's not

prone to errors like the HLOOKUP and the VLOOKUP. Really, it's better in every way. Let's jump

forward to those videos and take a look at our favorite lookup function, the XLOOKUP.

So in this video, we're going to take a look at the XLOOKUP function, and it's really better

than the HLOOKUP and VLOOKUP in every way. First of all, the single XLOOKUP function replaces both

of those functions, and also it's not prone to errors that can get caused by users inserting rows

or columns. Overall, it's a better function, and you're going to see it's much more simple.
Let's jump in and take a look at how it works. So in this area where it says XLOOKUP1,

we're going to look at how the XLOOKUP function can work in a horizontal fashion.

So let's pop into this cell and type equals XL. Right away, the function name comes up.

We can hit the tab key. Now the lookup value, which is the first argument, is going to be the same.

We're just going to select item number four, put in a comma. Well, now it's looking specifically for

the look up array. So where should it look for item number four? Well, we're going to select right

here, all the way across, just to include these item numbers. Now we put in a comma,

and now it's asking for the return array. And we're going to select one row right here,

where all the commissions can be found. What we can do now is just close the bracket and hit enter.

So now let's perform a test. Recall that when we were looking horizontally with the HLOOKUP,

inserting rows caused a serious issue. So let's go up here and insert a row. Alt I R inserts

the row. And as we can see down below, the XLOOKUP function is working correctly. If we pop into

that function, we can see just why it's working, because each one of these arrays is just one row.

So it doesn't matter if we insert a row in between them. It works just fine. Now we can go up here

and clean up this row or delete it by hitting shift spacebar and then control minus to take it out.

So now let's build up an XLOOKUP function down here in a vertical fashion. So we're going to hit

equals XL. The function name comes up, hit the tab key. The lookup value is going to be here.

Item number four, let's put in a comma. For the lookup array, we're going to select all the way

down here vertically. And then we're going to put in a comma. And for the return array,

we're going to select these commissions that are from here all the way down to here. And then we

can close the bracket and hit enter. Now it's always a good idea to test things. And recall

that when we were looking vertically with the VLOOKUP, it was inserting columns which caused an issue.

So let's pop over here into this cell and hit Alt I C for insert column. So there's a new column

there. And as we can see over here, our XLOOKUP is working just fine. So we can go back over here

and delete this column out, control spacebar to select it, and then control minus deletes it.

So just to finish things up, we want to make sure that the cells are correctly locked down so that

we can copy these XLOOKUP functions. Let's pop into this first function here. We're going to select

all the way across these two arrays, tap F4 to lock them down. Similarly here on this XLOOKUP,

tap F2, and then highlight across with the shift key, tap F4 to lock them down and hit enter.
Now I hope you can appreciate from this video just why we like the XLOOKUP function so much.

First of all, it's replacing both the HLOOKUP and the VLOOKUP. So it means that we only have to know

one function from this point forward. The other thing is that there's really no issues with users

inserting rows and columns with the XLOOKUP function. And we don't have to automate any third

argument with a complicated rows function or a column function. So we're seeing here that it's

really better in every way. And in the next video, we're going to show you some added features of

the XLOOKUP, which we really like as well. We'll see you there. So now that we have these

lookup functions all built up, we're going to introduce an error into the lookup functions

by putting in an item number that isn't found on the list. And we're going to investigate in

those functions how we can program it to return something back to us indicating that it's not

finding the item number on the list. Let's dive in and take a look. So if you could please make

the following modification in your spreadsheet as well. Right in here for the first invoice,

we're going to change the item number from four to 12. Now 12 is not found on the list up above.

So it should cause an error. So let's just punch in right here 12 and hit enter. And as we can see,

we're getting error messages across here in all four of these lookup functions.

Now it's not the worst thing in the world to have these error messages pop up. But we may want

something a little more descriptive. For instance, if it's not finding this item number 12 on the list,

maybe we want it to return the text not found. So the way that you would do this in an h lookup

function is to wrap the entire function in an if error function. Let's pop into the cell and take

a look. We're going to tap F2. We're going to go all the way to the beginning just after the

equal sign here. And we're going to start typing in if error. And we can see the function name come

up there, if error, we're going to hit tab. And that's going to also open the bracket. So what

we're going to do is we're going to say, if there's an error inside this whole h lookup function here,

then after the h lookup, we put in a comma, and we're, it's now asking for the value if error,

this is where we're going to put double quotes. And we're going to type in a message, we're

going to say, not found like this, close the double quotes, close the bracket for the if error,

and now we can hit enter. Now to be consistent, we can do the same thing for the V lookup. So let's

pop into the cell with an F2. Let's use the left arrow to go all the way over here, just after the

equal sign, and we're going to start typing in if error, I F E, and we can see the function name
come up right there down below. So now we tap the tab key, it opens the bracket for us. Now we go

all the way to the end here, and we're going to put in a comma. And now the value if error, again,

is going to be not found, just like this, close the double quotes, close the bracket, and we can hit enter.

So what we have now is a much better solution. It's telling us that the items not found, which

is much more descriptive and indeed an improvement. The problem with the H lookup and the V lookup
is

that if we look in there, we now have a really complex function, or functions, we should say,

if error, H lookup, and rows, it's in fact requiring three functions to get all of this stuff done.

In the next video, let's look at how we do this with the X lookup, which is much more simple.

We'll see you there. So what we saw in the last video is that if we want the computer to return a

descriptive message back to us, telling us it can't find a certain item, then we need to add an if error

to either an H lookup or a V lookup. What you're going to see here is that this functionality is

built right into the X lookup. So it's going to make it so much easier. Let's take a peek.

So let's pop over here into this first cell for the X lookup one. We're going to tap F two. And as

you can see here, we filled out the first one, two, and three required arguments for this function.

But we can see here, there's a first optional argument right here. It says if not found. So let's

put in a comma. And what we're going to do here is in brackets, double quotes, in fact, we're going

to put in the value not found just like this. And then we can close those double quotes,

and then we can hit enter. Let's do that same modification now to the vertical X lookup. We'll

tap F two, we'll go to the end here, put in a comma, double quotes, type in not found like this,

close the double quotes, and hit enter as well. So we were just able to demonstrate one of the

great optional arguments that's in the X lookup. But there's more than one fact if we look in the

function here, we can see that if we were to put a comma at the end right here, we're going to see

that we have match mode as well. So we could do an exact match, or all these other different types

of matches below. Let's suppose that we just put in a zero, which it's defaulting to anyways. And then

we put a comma, we have a last optional argument as well for search mode. So by default, it's searching

first to last, but we could go last to first, or we could do one of these binary searches as well.

So let's just escape out of here without making any changes, just so we can see that there's other

optional arguments that we can benefit from with the X lookup as well. Now looking at all of the
options that are available for the match mode and the search mode is beyond the scope of this

particular course. But one thing that we hope you've been able to see here through our demonstrations

is that the X lookup is so much better and more superior to the H lookup and the V lookup,

we can get a ton of functionality just with the X lookup, either horizontally or vertically,

without adding in a lot of extra functions that over complicate things. Let's jump ahead to the

next video, where we're going to finish up all of the work that's required on this particular tab.

We'll see you there. So what we want to do here is finish up everything on this lookups tab.

Want to take that error out that we introduced and also complete all the formulas all the way

down to the bottom. Let's get started. So first things first over here, we change this item number

from four to 12. Let's hit four and put enter so we can correct that right away. And we can see

that now we're getting the correct commissions again. Perfect. Now be a great idea to zoom out so

we can see everything that we have to complete. So we're going to use control alt minus a few

times just to zoom out to a nice level so that we can see down to the bottom. Now over on the

right hand side here, we can calculate the commission. And we really could use any one of these four

columns to do it. But we'll use the X lookup to column to do this one. So let's go equals and

we're going to say 2%. And then multiply through by the revenue. And that's going to get us the

commission. We'll just hit enter to get that done. So now we want to copy things down. So we can

use the shift key to highlight a cross. Hold down the shift key and also highlight down. And now we

can hit a control D for a fill down. As we can see, we're getting some error messages in here,

which is a little peculiar. Since all of these item numbers are present on the original list up

here, there must be an issue with one of our formulas that we're going to have to investigate.

In fact, just a little pro tip. Now that we've copied everything from here downwards,

it's easiest to actually check right at the bottom, where we've had the most movement from top

all the way to bottom. So we're going to go down here and check across this row to see if the formulas

are correct or not. So let's pop into the first one here, which is the H lookup. Everything looks

fine. We can see this is locked. And this is locked as well. Let's hit enter, move across here,

tap F two, aha. Right here, we can see a problem. This array should have been locked up here in this

area. But it was obviously not locked when we copied it down. So we're going to hit enter and go

up and fix that. So let's scoot up to the top here and tap F two. And we can see right away the
issue is over here with these red cells. They're not locked at all. So let's highlight them with

the shift key and tap the F four key like this to lock them down. We're going to hit enter. And

then we're going to select down by going control shift down like this, and then control D, which

is a fill down. Now things look like they're working, but it's always a good idea to check

our work. Let's go to the bottom here, top F two, we can see that these are locked correctly,

but this blue one was moving down. Looks good. Let's pop into the next one here for the first X lookup.

These are both locked. This one's moving down. That's lovely. Let's go to the last one here,

top F two. Again, we can see that these are locked in place. This cell has moved down

really nicely from top to bottom. Everything looks like it's working really well. The only

thing left for us to do right down here is add in total. Remember, alt equals can put in an auto

sum really quickly. And then we hit enter and we're all done. Looks perfect. Now it was probably

very obvious to you that we have a strong preference for the X lookup function for its functionality

and its simplicity. But it's great if you understand also the H lookup and the V lookup,

because we can almost promise that you're going to encounter these lookup functions

in other older Excel files. It's also great to know the advantages and disadvantages of upgrading

to the X lookup function so that you can convince others in your organization to replace these

older H lookups and V lookups with X lookups. Let's jump ahead to the next video where we're

going to start talking about all the date functions and the date functions which you'll need to get

things done when you're doing financial analysis. We'll see you there.

So in this chapter, we're going to be talking about date functions in Excel and how they get used in

financial analysis. Date functions for some people can be really overwhelming because there's literally

hundreds of different date functions in Excel. But what we find is that if you use a small list of

hand picked date functions, you can get most of the things done that you need to get accomplished

inside of Microsoft Excel. We'll also be discussing periodicity a little bit.

So with periodicity, you need to consider the periods of a financial model. For example,

the most common financial models are annual models, but sometimes there's a need to break

out quarterly estimates as well in a financial model or even go down to the granularity of monthly

models, which is done in financial planning and analysis or FP&A. Each one of these different

types of financial models introduces its own set of challenges. So we need to understand the best
date functions and how to use them in order to accomplish what we need. We also need to understand

the custom formats that are commonly used for dates to get them to display exactly the way that we

want them. We're also going to look at some date functions which can be really helpful for

modeling debt. Since debt payments may happen regularly on the first day of the month or perhaps

on the 15th day of the month, we'll need to investigate the date functions which are appropriate to get

those dates indexing forward through time. And finally, it's relatively common in financial

analysis to need to calculate a stub period. For example, if the company has a December 31st year

but we're taking control of the company on March 31st, then we would need to calculate

a stub period for the company, which is effectively a portion of a full fiscal year.

As we mentioned earlier, all of the date functions in Microsoft Excel can be a little bit overwhelming.

What we aim to do in this chapter is point you towards the best date functions that are really,

really helpful for getting your financial analysis done in Microsoft Excel. Let's jump into it and

get started. So as we mentioned in the previous video, one of the things that we always need to

consider with financial modeling is periodicity. And by that we mean the periods that are across the

top in the financial model. For example, we can have annual models, quarterly models, or monthly

models. In fact, we're going to start here right at the top with an example of a monthly model.

Go through some of the date functions that we might use to construct a monthly model.

So let's jump into it and get started. Now the first function that we want to show you in this

cell right here where it says current date is a function called the today function. We can just

type in equals today like this. And then we actually open the bracket and close the bracket. So we're

leaving the brackets empty and we can hit enter. And what happens is today's date comes into the cell.

Now you may be seeing something slightly different in the cell. For example, if you're watching this

video at a later date, then you will see a later date in the cell. The today function is an example

of a volatile function. So a volatile function is a function which is constantly changing.

And this particular function will constantly be trying to update. So if I open it tomorrow,

it will show November 3, 2023 as the date. It's also possible that this date may look slightly

different on your computer, depending on how you have the date settings configured. So keep that

in mind as you're working through this particular chapter that your dates may appear slightly different

than our dates on this example. So this is an example of a date that will change. But underneath,
we want to hard code a start date in for the model. For example, in here, if you go into the cell and

put in 2024 dash 01 dash 01 and hit enter. So the model start date is intended to be January 1st

of 2024. And we want you to understand how dates work in Excel. So let's go over into this cell

right here. So e seven, we're going to put in an equal sign, and we're simply going to link it

to this date. Now let's hit enter. As you can see, it's linked directly to the cell, yet it's showing

that what is actually in that cell is a number 45,232. So what's happening with Microsoft Excel

is each day it counts as a new serial number. So we're obviously at a large number right now,

which makes you wonder what exactly was day one? Well, in fact, day one in terms of Microsoft Excel

was January 1st, 1900. Now the reason that Excel convert states to serial numbers is so that you

can perform counting operations with them. For example, let's go back into the cell. And suppose

we wanted to calculate the number of days between this date here and this date here,

we could simply go into the cell and say equals this future date, minus this date here. And when

we hit enter, we can see that there's 60 days between them, which is really helpful. So it's really

helpful to know that behind the scenes dates are really serial numbers. And the reason that they

are serial numbers is so that we can perform addition and subtraction on the various dates,

which is really helpful. Let's pop into this cell for now and just delete this out. Then in the

next video, we're going to start to populate these cells right across here using some of the date

functions that are available in Microsoft Excel. We'll see you there. So now that we have the model

start date configured, we're in a position where we can get the headings working across the top

of the model. One thing that we'll say here is it's really common to use the last day of each

period. And the reason for this is when you see a financial statement, like the balance sheet,

the figures are always posted as of the last day of the period. So right here is going to be the

first month of our financial model. And we want that first month to be January, since the model

starting here January 1st, we wanted to show the last day of January. So there's a perfect

function that we're going to use in here called EO month stands for end of month. So we're going to

put in equals EO. And then we see it come up. So we hit the tab key like this wants to know two

things. It's really simple. The start date, which is right here, and then we put in a comma,

the number of months we want to go forward is actually zero, because we still want January.

So let's put in a zero there, close the bracket and hit enter. So as you can see,
the EO month or end of month function is perfect here. We're still in January, but it's gone to the

31st day, which is the last day. Now what we can do in this cell is build in another one,

equals EO month like this, hit the tab key. We're going to set the start date as January 31st,

and then put in a comma and see we want to go one month forward, and then we can hit enter,

just like this. And now we have the last day of February. Now that we have this built index

forward by one month, it's perfect. So we can copy it forward through the rest of the forecast

period. So let's go into the cell and do a copy, control C, we use the shift key to highlight all

the way across here. Now we don't want to paste everything, or we'll mess up these nice borders.

So we're going to use a pay special alt es or control alt v if you prefer. And now we go down

to formulas and hit enter, and we've pasted the formulas perfectly through the forecast period.

Now notice how careful we were that when we copied this formula forward through the forecast

period, we only pasted the formulas. The reason that we did this was we wanted the formats to stay

in place. If you look closely, you'll notice that we've put some effort into these borders. For example,

we have a border here around Q1, and then another border for Q2, Q3, Q4, etc. This helps the reader

visually see where each of the quarters are, and makes the model look a little bit more professional.

So I think you might agree that the EO month or end of month function is really efficient,

and just a perfect function for this purpose here, where we want to index forward through a number

of months. Now in the next video, we're going to look at how to change the format of these cells,

just to make the labels look a little bit cleaner and a little bit more professional. We'll see you

there. So what we're going to talk about in this short video is how to change the formats of these

cells. We're not going to change anything about the content that's inside the cells,

we're just going to get them to display a little bit differently. And this is referred to as

custom number formatting. It's something that you're going to want to learn for sure,

because it's going to come up in so many places in Microsoft Excel when you're doing financial analysis.

So let's think carefully about the format for these cells. We definitely want the month and

the year to show, but it's not absolutely imperative that we have the day showing.

It might be nice to have this first one just show up as January 2024, for example,

or maybe January 24 to make it even cleaner. So here's what we're going to ask you to do.

Let's go into this first cell and then hold down Ctrl Shift and the right arrow to select all the
way across. Now if we were using the mouse, we would now right click and go down here and click on

Format Cells. It brings up this dialog box right here. But in fact, there's a much quicker way to

get into this dialog box. Let's tap Escape. In fact, the keyboard shortcut that we're going to use

here is Ctrl 1, which gets us into that dialog box right away. Now that we're into this dialog

box, we're going to tap the tab key once. And that's going to get us into this area here where

we can go up and down. We're going to go all the way down to Custom. Once we get there, we hit the

tab key again, which gets us into this type box. Now we can hit the Backspace key to delete out

what's in the type box. And what we want to put here is M, M, M for a month. And then we can put

a dash. And then we can put two whys for a year. And as you can see up here in the sample pane,

it's showing that the first cell is going to display as January 24, which is really nice.

Once we have that configured, we could hit Enter and the format's been changed.

So you can see already how this looks much cleaner across the top here and much more organized.

Now let's look really, really closely at what's happened. As you can see, March 24

is really, really close to the edge of the cell. For example, the 24 is right near the boundary

there. Whereas down here with these numbers, we have a little gap. Now we're going to investigate

why those are different. So for a moment here, don't do this on your model, just watch what we're

going to do. We're going to copy this number here, copy and paste it above. But we're going to change

this number to a negative number, we're going to put a minus sign in front of it just like that.

As you can see, these numbers are perfectly aligned. Now the way that we've been able to perfectly

line up these commas is because the top number has a right bracket on the right. But the positive

number here has an invisible right bracket. If you want to see how we've done the invisible

right bracket, let's just hit control one from this cell. You can see right over here,

there's an underscore and then a right bracket. The underscore tells Excel that the next character

is going to be invisible. So what we're going to do after deleting this, we're going to go up here

and add that invisible right bracket just to get things aligned. So let's take a look at how we do

this. It's really quick. We're going to select across all of these numbers, hit control one,

which is our new favorite shortcut. And we're going to hit the tab key twice to get into this

type box right here. And all we're going to do is put an underscore and then a right bracket,

which is inserting an invisible right bracket at the end of that date format. And then we hit enter.
As you can see, it moves things over nicely so that they're aligned with these numbers below.

So obviously it's not imperative that you put that invisible right bracket there, but it makes

things look really nice because everything's perfectly aligned like this. And if you ever see

underscore right bracket in number formats, you'll know that people are doing that to get the positive

and negative numbers to line up to the right hand side really, really nicely. Let's jump ahead to

the next video now. And we'll talk about quarterly modeling and some of the date functions that

we might use for quarterly modeling. We'll see you there. Now, one of the things that we've

just finished doing is taking a legitimate date from this cell and doing some work with it to get

the headings. What we want to do in this video is make sure that we understand how dates work.

We want to be able to take a date, break it apart into its component pieces like year, month and day.

We also want to be able to take those component pieces and assemble them back together to get

a legitimate date. Let's jump in and take a look. Now, with this previous example up here for monthly

modeling, we started the model by inputting a legitimate date. But another way that you could

start up a model would be to input the component pieces like year, month and day. So let's do just

that right here. Let's input 2024, enter one for January and a one for the day. Now, we want to

adjust these formats. We don't need a comma separator here for thousands and we'd also like to get
the

month and day to show two digits. So let's hop into this cell first, hit control one like this.

And we want to hit the tab key and go all the way down to custom and then hit tab again to get into

the type box. Now we can hit backspace to delete it. What we want to do in here is type in four

zeros just like this. And that'll show up here as 2024. Let's hit enter to make that adjustment.

Now, as you can see in this cell here, we've eliminated that comma for a thousand separator,

which is perfect. Down here, we'd like these to show as zero one. So let's highlight both of them

and hit control one to pop into the same place down to custom. We hit the tab key and delete

what's in the type box. And here we'd like to put zero zero. So it shows up here in the sample pane

as zero one. Let's hit enter. And we've made that change as well. Now it's our intention to leave

these dates here hard coded just like this. But we're going to take a little diversion here because

we want to teach you exactly how to take a legitimate date like this one and extract the

component parts like the year month and day. In fact, it's really easy. Let's pop into this cell
here. And we're going to put in a year function, open the bracket, and then go up and connect to

this date. As soon as you hit enter, you can see that year function pulls out the year.

As you may have guessed, here for the month, all we're going to do is type equals month

like this, open the bracket and go back up to the same date. It extracts the month.

Similarly, here, we can say equals day, open the bracket, go up to this date, and we get the day.

So as you can see in here, the year month and day functions make it really easy to extract those

components individually from a date. Now you may already be wondering, how might we be able to

reassemble the year month day into a date? Well, it's really easy as well. We're going to go in here

and use a function called the date function just like this, which is built exactly for that purpose.

And then we just direct it to the year, comma, then the month, comma, and then the day. As soon as we

hit enter, we get a legitimate date back just like this. Now we're really glad we were able to show

you how to use the year month and day function to extract the components from a date, because you

may encounter situations where you need to do that. But for our purposes here, we essentially want

these three items to be hard coded so that they can feed into the model start. So we're going to hard

code them back again now, 2024, enter, and then one enter one enter. So these are now the inputs

and they're feeding into the date function right here. So now you can see how easy it is to take

apart the components of a date and just how easy it is also to put them back together. So you can go

either way if you ever run into those situations with your financial analysis. Now that we have the

start date here for the model, let's jump ahead to the next video, and we'll start populating some

of the headings across the top for quarterly modeling. We'll see you there. Now that we have

the start date set using the component pieces of year month and date, in this short video what we

want to do is use those to generate some headings that we can use for quarterly modeling. Let's

dive in and take a look. Now up above here, we had set up our dates for monthly modeling like this,

and we haven't grouped into quarters. So we can see at the end of the first quarter, we have the date

here of March 2024. And over here, we have the end of the next quarter, June 2024. So what we want

is we want to have March 2024 appear right here, then June, then September, then December, just like

this. And as you can see, we've set up these nice borders above so that we can group those into

the first year. Now for this example, the EO month function is going to be perfect for our purposes

here. We're going to go into the first cell and just type in EO, and it comes up, we can hit the
tab key, we want to grab the start date, which is right down here, like this, and then we put a comma.

Now the start date is in January, and we want to go forward two months to get to March. So we're

going to put a two in here and then hit enter, and you can see March 2024 come up like that.

Now that we have that first date set at the end of March, we want to go forward in increments of

three months to get a quarter. So we're going to go into the next cell and also do an EO month,

hit the tab key, and the start date is going to be right here. But then we're going to index forward

by three months and hit enter. Perfect June 2024. Now that we have that set, let's copy and paste it

throughout the forecast period. But remember, we can copy everything, but we only want to paste

special the formulas. So we're going to go into the cell to copy, control C, we can see the cell

blinking. So we know it's been copied. Now we use the shift key to highlight all the way across to

the end of the forecast period. And now we can go alt es or control alt v to get a paste special.

And now we top the down arrow to get the formulas and hit enter. And that's done.

So let's look through our work here. We have March 2024 June, September, December. So we have

quarter one, two, three, four, and then it repeats again, one, two, three, four into this year.

And as you can see, just above, we have these really nicely grouped into years. So we can see

three years of forecast grouped by quarters. And we're showing those groupings with those borders,

which is a really nice feature. So as you can see in this example, the EO month function came in

really handy once again, let's jump ahead to the next video. Now we're going to take a look at

annual modeling, and you're going to see one of the reasons why it's so much more simple to get the

headings working for annual models. We'll see you there. As you can see here, we're down in the

annual modeling section of this particular worksheet. And as we mentioned earlier, annual models are

incredibly simple. And thus for this reason, often preferred for financial analysis. One of the things

that also makes them simple is the headings. In fact, we're not even going to use real dates

here. We're just going to use numbers. Let's jump in and take a look at just how simple it is.

So as you can see here, we have a starting place for the year, and we can just input

2000 and 24 like this. And now that's going to set us up nicely to start these headings up here.

In fact, since the first year of the forecast is going to be 2024, let's just link this cell

over to the start year, just like this. Now as you can see in here, we have that comma separator

popping up for thousands, which we don't need. And we're going to change. The other thing that we
want to do is if we look closely at the alignment, we can see here, there's a nice little space

with a right hand bracket. And we want to put a similar space into here so that everything's

aligned really nicely. Let's highlight all the way across here, like this and hit control one,

so we can get into format cells using the tab key in the down arrow, we can get to custom

and the tab key once more, we can get into here. Now what we want here is four zeros in a row like

this. And then we put an underscore in, which tells Excel to make the next character invisible

for that invisible character. Now we're going to put a right bracket just like this. And then we can hit

enter. Now this is clean things up really nicely for us, no more comma separator. And as we can see,

we have nice alignment to the right hand side with a little space in there. Now as we mentioned

earlier, we're not even using dates. Remember, this is just a number. So all we're going to do to get

the next year is just pop into here and say equals this one plus one, we hit enter, and we get

2025. Now we're just going to do a copy and highlight all the way across using the shift key.

And we want to do a paste special. So alt es or control alt v brings us up down arrow to formulas

and then we hit enter. And that's all done really nice. So as we can see, we have a nice forecast

period that goes forward in terms of the years, we're just using numbers, these aren't even dates.

In fact, this is one of things that makes annual models so simple. Many other things that make

annual models really, really simple. And in fact, this is the reason why when you're doing

financial analysis, you should always default to an annual model. Unless there's a very compelling

reason why you would need a quarterly model, or even the granularity of a monthly model,

you're going to find that the annual models are so much more simple, can allow you to focus on the

financial analysis that you're doing. Let's jump ahead to the next video. We're going to look at

some debt payments and introduce another date function, which is really handy for those payments.

We'll see you there. As you can see here, we're down in the section for debt payments.

And the unique thing about debt payments is they often occur always on the same day of the month.

So the functions that we've used up until now, in fact, won't work for us. We're going to introduce

a new date function to you. So you have another one in your skill set to be able to use if you

encounter the situation with debt payments, like mortgages or corporate debt. Let's take a look.

So the first thing that we want to do in here is set up our first payment date. We're going to set

that up as 2024 dash 0101. So it's going to be January 1st, 2024. Now we want to think about the
frequency of these debt payments. And if we're thinking about the example like mortgage payments,

for example, we would be paying those every month. So let's put in a frequency here of one month.

And later on, we're going to fix the formatting of this particular cell. But for now, let's just leave

it as is. Now just to get us started, we can put the first payment right into this particular cell

here for the heading. We just want to link this down to this first payment date right here and hit

enter. Now let's pop over into this cell here where the second heading is going to go and just type

in eDate like this. And I know what you're probably thinking. Finally, a place where I can set up an

online dating profile and meet some other Excel enthusiasts. Fortunately, it's not that. But it's

almost as exciting. What we're going to do with the eDate function here is we're going to put in the

start date right here. And then we're going to say comma for the number of months, instead of hard

coding a one like this, what we want to do is use the cursor to go down and select the frequency here.

We're going to top the F4 key to lock that cell down. And then we can hit enter. Now the great thing

about the eDate function is that what it's done is it's indexed one month forward, but it's kept

the same day of the month, which is perfect for this application. So let's pop in here, do a copy,

control C, highlight across with the shift key to the end, and Alt T S or control Alt V for a pay

special down to formulas and hit enter. And that's all done. So as you can see, this particular date

function has been perfect for this application. It can index forward by a certain number of months,

and always keep you into that first day. Sometimes corporate debt payments are on the 15th day of

the month, and you can index them forward to always be on the 15th day. Really handy. Let's jump

ahead to the next video and clean up some of the custom number formats that we see here so we can

get those looking really professional. We'll see you there. Now in this quick video, we're not going

to make any changes to formulas. We just want to tweak the custom number formats a little bit

and give you some extra skills so that you'll know how to get great formats in your financial

models. Let's take a look. Now the first thing for us to tackle is down here. It says frequency one,

not very descriptive. What we want to do is we want to leave the one in there, but we want to

custom number format it a little bit. So it would display as say one months, that would be perfect.

Let's pop into that cell, hit control one, and we're going to use the tab key down to custom,

hit the tab key again, and we're going to use the backspace key here to wipe that out. What we're

going to put in is a zero, okay, and then we're going to put a space double quotes, and then we
want to type in months, just like this, and then double quotes again, and we can see up in the sample

pane that that's going to display as one months, which is perfect. Now we can hit okay or enter,

and we've changed the format of that cell. So the neat thing about this is if we hit F two,

we can see that there's just a one in the cell, but we have it displaying so it's a little bit more

descriptive now. Now let's get up here and take a look at these formats here. We want to make some

changes there to make them look a little bit more professional. Now the thing about the way that these

dates are formatted is it kind of looks like a lot of numbers all the way across, and it's not

really evident that the payments are always happening on the first day. So to make it a little

bit more obvious, we might want this first one to display as January 1, 2024, and then this one could

be February 1, 2024. Let's take a look at how we could do that. And the great thing about custom

number formats, which is what we're really discussing here, is that we've complete control

over the formatting. Let's highlight all the way across these cells and hit control one.

We're going to use the tab key to get down to custom tab key again. We're going to use backspace

to wipe out that format. And we're going to start typing and as we do, let's watch the sample

pane really closely up here, we're going to put in three M's for month. And we see that's going to appear

as Jan, which is perfect. Let's put in a space now and put in a D for the day. So now we have January

1. Now we're going to put a comma space and then we'll put Y Y Y Y for the year. That looks perfect.

Now before we forget, we want to put in a visible right bracket for spacing. So we're going to put

an underscore and then we're going to put in the right bracket here and hit enter.

Now as you can see here, we had total control over how these dates were formatted. And now it's

looking really clean because it's easy when we look across to see that these payments are always

happening on the first day. It's really important to know these tricks for custom number formatting.

So you can use this in some of your models that you're building. Now, obviously, these changes that

we're making are all individually fairly minor, but collectively they all add up and make a big,

big difference in your work and can be the difference between a good model and a great model.

Now let's jump ahead to the next video. We're going to look at stub periods. They often come

up when you're doing financial analysis whenever you're dealing with an acquisition or sometimes

when you're dealing with valuation work. Let's jump ahead to that next video. We'll see you there.

Stub periods come up all the time when we're doing financial analysis. Stub periods essentially
are synonymous with a partial period. For example, if a company's reporting every 12 months,

then if we needed to look at a nine month period, we would refer to that as a partial

period or a stub period. They're very, very common when it comes to valuation work.

And also when you're looking at acquisitions, let's jump in and take a look at how they work

and also a particular date function, which is perfect for calculating stub periods.

So let's start off by looking over here at the fiscal years. And as you can see, we've labeled

them really clearly and they're going to be in year month day format. Now, let's assume that the

company will report its next fiscal year at the end of 2024. So in here, we're going to input 2024

and then 1231 and hit enter, just like this. Now, the company will usually do its next fiscal

year and exactly 12 months into the future. So this next date here would be 2025, 1231.

So to get that date, we could use either EO month or E date. In this case, let's try the E date

function. So we pop into this cell and say equals E date, hit the tab key. So asking for the start

date, which is right here, put in a comma, how many months forward, we're going to go 12 to get a

year. And then we hit enter. And now what we can do is copy that, control C, highlight all the way

across here, we're going to do pay special alt es or control alt v. And then we go down to formulas

and hit enter. And that's been completed. Now, let's look at our valuation date right here.

Let's suppose that we were going to value this company as 2023, 1231. If we were going to look

at the value at that date, then there would be exactly one year between that valuation date.

And when the company reports its next fiscal year end, if we recorded the dates like this,

we would have a full financial year between the valuation date and the next fiscal year end,

which would mean we would not have a stub period. Because our spacing would be exactly

one year here, and then two years, three years, four years, etc. And we would have perfect one

year spacing and no stub period. In fact, it's relatively common to not have perfect one year

spacing between the valuation and the next fiscal year end. So we often have stub periods deal with.

Let's look at an example where we're going to put 2024 dash 03 dash 31. And this is going to be

our valuation date at the end of March 2024. Now, if we were valuing the company as of this date,

and then the next fiscal year end was as of this date, it would mean that we would have the benefit

of nine months of that fiscal year in our valuation. And nine months out of 12 months of the year

would be having the benefit of 75% of that first fiscal year. But how can we get Excel to calculate
this for us? Well, in Excel, there's a function that's designed exactly for this purpose. It's called

year frack. So it calculates the fraction of the year that we're dealing with, which is perfect in

this situation. Let's take a look down here in this cell, we're going to put in equals, we're going to

type in year and we can see it here year frack, to use the tab key to open that up. It's asking for

the start date, which is right over here, it's the valuation date, put in a comma, the end date is

going to be this date right here. And then we just hit enter. And as you can see, it's calculated

that fraction of the year perfectly. Nine months out of 12 is 75% of the year. Now, we can easily

just select from here, all the way across and do a control R, which is a fill right. And as we can

see, after the stub period right here, we get perfect 100% all the way across, indicating that

there's a full year between every one of those fiscal year end dates. Now, it may be obvious to you

what we're going to do next. Effectively, what we're going to do is take this cashflow profile here,

multiply it through by these percentages. So we go into this cell and say equals this,

multiply through by the cashflow. And then we're going to highlight across just like this and do

a control R, which is a fill right. So what does this really mean for our valuation date? Well,

if we've set the valuation date right here, the end of March 2024, it means we get 100%

of all of these cash flows here. But this particular cashflow here of 16 million,

we only get the benefit of 12 million of that 16 million. The other 4 million has already passed

and it's passed behind us. So it doesn't enter into the valuation of the company.

So whenever you're doing financial analysis, keep in mind that stub periods are relatively

common. They generally come up with valuation work, or when there's an acquisition. When there's

an acquisition, you can set the acquisition date here, where you may be acquiring the company.

And then you only get the benefit of the cash flows, which occur after that acquisition date.

And whenever you see the need pop up for a stub period, you generally want to always revert to

that year frack function, which comes in really handy for calculating the percentage of the year

or the partial year. I hope you've really enjoyed this chapter on dates. It's important to understand

how they work. We want to be able to deconstruct a date into year month day and reassemble it using

the date function. We also want to be familiar with functions like EO month and E date in year

frack, for example, so we can use these whenever the situations present themselves.

So let's jump ahead to the next chapter. We're going to take a look at returns and also
calculating rates of return net present value, really interesting stuff and also very, very common

when you're doing any kind of financial analysis. Let's jump ahead to that next chapter and we'll meet

you there. Now, this final chapter of the course is particularly interesting and important at the same

time. We're going to be looking at some of the output calculations that are really, really common

when you do financial analysis. It's very common in financial analysis to either look at a net present

value or an internal rate of return. So we want to understand exactly which functions we can use to

do that, but also be aware of some of the pitfalls of using some of these functions and some of the

errors and inconsistencies which can occur so that we can carefully avoid them. The other thing that

we want to be very mindful of is the cash flow profile that we're trying to evaluate. In particular,

we want to look at that cash flow profile and determine whether or not it's occurring at regular

dates or irregular dates. The other thing to keep in mind when we're calculating the net present value

is that it can be very dependent on the discount rate. In particular, we often calculate the weighted

average cost of capital as the discount rate. We want to introduce to you a really nice function

that you can use to easily calculate the weighted average cost of capital or the WAC. As we mentioned,

there's lots of important information in this chapter and there's also lots of interesting material

in this chapter. We can't wait to share it with you. Let's jump ahead and get started in the next video.

As you can see here, we're on the last worksheet or tab of this particular file. The one called

Returns, and we want to start by discussing the weighted average cost of capital or WAC,

W-A-C-C. It's frequently used as the discount rate when doing financial analysis. We want to look

at a really easy way to calculate it using a particular function in Microsoft Excel. Now,

as we look down here, we can see that this is referred to as the weighted average cost of capital.

If we wanted to do a simple average of the cost of capital, we would be averaging the cost of the

debt and the cost of the equity. If we did a simple average across these two figures,

we would get 9.5%. Now, we're going to be doing a weighted average cost of capital,

so the debt capital is going to have a 15% weight in the average and the equity capital is going to

have an 85% weight in the average. Knowing that the equity capital is carrying such a heavy weight,

means that the answer should come out closer to the 11.5 than it is to the 7.5.

So let's take a look at how we could do this. First of all, manually and mathematically,

we could put an equal sign in here and we could take this cost multiplied through by
that weight, and then we could add in this cost and multiply through by this weight. And if we hit

enter, that will in fact give us the correct answer. And as we can see, it is in fact closer

to the 11.5 than it is to the 7.5, which makes sense since this is carrying a heavier weight.

Now what we've done in here is correct, but it's not as efficient as it could be. If we tap F2,

we can see that this formula is already a little bit complex, but imagine how much more complicated

it would get. If we had more line items, we'd have to manually enter a lot of cells in.

Let's look at a different solution. So in fact, the sum product function is absolutely perfect for

an application like this. Let's pop into the cell and put equals su m p, and then we can see

the function name come up, we hit the tab key, and we're ready to go. So array one is going to be up

here, we hold down the shift key to select these two weightings. And then what we do is we put in

a comma, and then it's asking for a ray two, for a ray two, we select this one here again using the

shift key, and then we can hit enter. And as we can see, we get the same result. Now if we look inside

here, we're obviously using the sum product function, but the name is a little misleading.

In fact, every time you see it, you should think of product sum, because in fact, what it's doing

is it's taking the product first, and then it's calculating the sum. So what do we mean by product

sum? Well, the function is actually calculating the product of these two numbers, meaning it's

multiplying them together. And then it's calculating the product of these two numbers by multiplying

them together. Once it's calculated, those two products, then it's summing together the results.

So it's actually working in the sense, like product sum, but the name is obviously some product.

So whenever you're calculating a weighted average cost of capital and financial work,

definitely try using the sum product function. It's going to simplify things a little bit for you.

So let's jump ahead into the next video, and we're going to use this result for the WAC

and some of our analysis to calculate the MPV for the company. We'll see you there.

So one of the first things that we want to make sure that we do when we're performing

valuation work is we want to set the valuation date. We also want to communicate that valuation

date really clearly to anyone that's reading the model. We can think of the valuation date as

like our goal line. We effectively need to discount every cash flow back to that exact date. That

date is very important. That's why we want to make it really clear for all the readers of the financial

model. Now in the last video, we calculated the weighted average cost of capital for the company.
We're going to obviously use this in the valuation. So let's connect this weighted average cost of

capital here down into the next section. Here where it says WAC. Let's pop in here with an equal sign

and connect up to this cell. And let's tap F4 and hit enter. So we can pull the weighted average

cost of capital down there. And then we can do a copy and move across and also put it over here.

We're going to use it in two places. Now that we've copied the weighted average cost of capital down,

let's bring everything down into focus. So we can focus on this area of the model here.

In particular, we want to put a message right into this cell here. Now our valuation date in this

case is right down here. It's December 31st, 2023. We want to communicate that really clearly to the

reader right in this cell with a nice little note. So what we want to do in here is use a concatenate

function. We're going to type in equals c o n c. And we can see concatenate come up. Let's

hit the tab key and then open up that function name. Now we want to put in double quotes. And we

want to put in here, we have assumed a valuation date of and then put a space close the double

quotes, put a comma in and then go and grab the date down below. Now we're going to put another

comma. We're going to open the bracket and then say for both examples below and then put a period,

finish the quotes and then close the bracket. Now we can hit enter.

Now what's happened here is Excel has put that date into a generic number format. So we're

just seeing right here the serial number that's associated with that date. So we need to get into

that function now. And we're actually going to use a text function to change that format. So it

displays as we would like it to display. So let's pop into the cell and make a modification. We're

going to tap F two. We're going to go over here and right in front of this reference, we're going to

put in text and open the bracket. So we're inserting a text function here. We go after this reference

for B 21. And we're going to put in a comma and then open double quotes. And now we're going to
define

the format that we want. We want to see mm mm for month. That'll be a full month name. And then

one D for the day, comma space and then Y Y Y for year. Now what we can do is we can close the

double quotes and close the bracket for that text function. Now we're going to hit enter.

So as you can see, this gives us a really nice label to clearly communicate this important

information about the valuation date. And what makes it even better, it's completely dynamic.

Anytime we change this date here, this label will also change. We were able to pull in the number,
but then we used the text function to put it into the exact format that we wanted to see

with the full month, day, comma, and then the year. And an important takeaway from this discussion

is that we always want to communicate information really clearly with those reading the model,

since it will instill a lot of confidence in them. But what we also want to do is invest a

little bit of time to make all of our labels and notes dynamic. So anytime we update the model,

all of those notes and labels are going to update automatically. We'll see you in the next video.

So what we have here is a situation where we have a cash flow profile. And there's all these

cash flows that we expect to receive in the future. But what we need to do is we need to figure out

what they are worth today as of our valuation date. And we're going to call that value the net

present value or the NPV. Let's jump in and start calculating the NPV. Now we've already

communicated really clearly that our valuation date is December 31, 2023. And that is coincidentally

the date of our first cash flow. So we could calculate for starters, the NPV could be equal

to that cash flow. For example, if this was the only cash flow occurring in our profile,

then this would be the NPV. But there's obviously more to the story than that. So this is obviously

the amount of capital that we need to invest at the valuation date. But now what we need to do is we

need to figure out the net present value of all of these future expected cash flows here. We can do

that with the NPV function. So let's pop in and add an NPV function now to the equation. So let's

tap the F2 key. And what we're going to do here is now add in NPV. And we're going to open a bracket.

The first thing that it's looking for now is the rate. Now if we try to move, we're only moving

in the cell. We need to tap the F2 key once more. And now we can go up and grab this rate

of 10.9%. Now we put in a comma. Now it's asking where all of the values are value 123, etc. We can

select from this first cash flow here, use the shift key to get all the way down to the last one,

and then close the bracket and hit enter. So this is showing us our NPV here. And we can also calculate

the NPV using the X NPV function. Let's give it a try. Let's type in equals X NPV, X NPV,

just like this. We're going to open the bracket. It's asking for the rate. That's the weighted

average cost of capital. Put in a comma. Now it's asking for the values. Well here are all the values

here. Let's put a comma in. And now it's asking for the dates. And all the dates are over here.

Let's close the bracket now and hit enter. See what we get. What we have here is a situation

where we have two results that aren't matching. One of them must be incorrect. In fact, one of the
things that we're going to see, and we'll discuss it in the next video, is that this calculation

using the NPV function is incorrect. We're going to put this into strike through font. We're going

to recommend that you do this as well. So pop into the cell and hit control five, which gives you

a strike through font, just to indicate that this is incorrect. Now in the next video, we're

going to jump ahead and we're going to talk about why this NPV function is incorrect in this case

and why the X NPV is correct. We'll see you there. So in this video, we want to discuss why the NPV

function is incorrect in this case. It's not always incorrect. In fact, there are a lot of legitimate

cases where it's absolutely fine to use the NPV function. We just want to make sure that you

understand it so you can use it in the correct places and always make sure that you get a correct

result. Let's jump in and talk about it. So let's start by looking at the X NPV function.

And let's tap F2. The X NPV function asked us about three things. It asked us about the rate or

the discount rate. It asked us about the values and it asked us about the dates. So it understood

the timing. Well, the NPV function, let's see what it asked us about. It asked us about the rate

and it asked us about the values, but it didn't ask us anything about the dates or the timing.

So let's take a look at what the NPV function was doing. We're going to tap F2. Since it didn't

ask us about the dates, it must have made an assumption about the dates. Well, the assumption

that it made was that it was going to discount this first cash flow here back exactly one year.

The second one gets discounted two years, three years, four years, etc. The problem is that doesn't

exactly match the timing that we've indicated with the dates. So let's look closely at these dates.

From the valuation date to the first cash flow is not exactly one year. And from the valuation

date to the second cash flow here is not exactly two years. So the assumption that the NPV function

made is actually incorrect. So let's make sure we know exactly how the X NPV function is working

if we tap F2. Well, what it's doing is it's discounting all of these cash flows back to this first date

right here. So we need to make sure that this first date is in fact our valuation date,

which it is. So it's working perfectly in this case. So the main takeaway from this discussion

is that whenever we have irregular dates, like these ones here, we must use the X NPV function.

The only time the NPV function will give us a correct result is if we have regular dates,

which we're going to investigate later. For now, let's jump ahead to the next video and do a

comparison of IRR versus XIRR and see how they compare in this instance. We'll see you there.
In this quick video, we're going to compare the results from an IRR function to an XIRR function.

And we're going to see in this case where we have irregular cash flows that the IRR function

is once again incorrect and the XIRR function is correct. Let's jump in and take a quick look at

that comparison. Let's jump in here and first start off by calculating the IRR right in here,

equals IRR, and we're going to open the bracket. It's just looking for the values. Really simple.

Let's just grab all of these values like this, close the bracket and hit enter.

And now for the XIRR function, we're going to put in equals XIRR like this, hit the tab key,

and it's asking for two things. The values number one, which are right here,

we'll select all the way to the bottom like this, and then a comma. It's also asking us about the

dates. Perfect. We're going to go from here all the way down to there and then put in a close bracket

and hit enter. Now you may have noticed that the XIRR function asked us about the values

and the dates, which is perfect. But the IRR function only asked us about the values.

That means that it's making an assumption about the dates. And again, the assumption that it's making

is that each one of these cash flows is one year apart, which is incorrect. So in this case,

once again, the IRR function here is incorrect. We're going to put it in strike through font.

Another way to get to that strike through font here is if we hit control one, and then we could go

across here to font, and then we would find strike through right there, and we could hit okay. That

would be one way to do it. But we prefer the shortcut control five, which is just like this,

and we can toggle that on and off. So we want to leave that in strike through font,

so we can see that that's incorrect. So really, the main takeaway here is you want to really watch

out when you have irregular timing to your cash flows, in which case you have to use the XMPV

or XIRR function. Let's jump ahead to the next video. We're going to show you how to put a couple

of footnotes into this model so that we can be sure that we're understanding and communicating

the results correctly. We'll see you there. What we want to do here is just take a minute and put

a couple of proper footnotes down at the bottom of this section so we can communicate to the reader

exactly why the MPV function and the IRR function are not working in this case. Let's jump in and

take a quick look. And what we're going to do is go down to these gray cells here.

The first one, we're just going to paste in a couple of footnotes, and we want to encourage

you just to pause the video for a second. Make sure that you get these notes in here
so they communicate good information over to the reader of the financial model.

Hopefully you are able to load or type those footnotes in. Let's just walk through them.

It's saying that the MPV result is incorrect in this case, but the XMPV result is correct.

The reason being is because the MPV function always assumes even spacing for the cash flows.

You can see this footnote is coming up as footnote 1, which pertains up here to the XMPV function.

Now as you can see here, footnote 1, we're going to have a similar note here for footnote 2 for the

XIRR function, but let's save some time. We're going to pop down here. We wouldn't mind if you could

please highlight these two cells, do a copy, then go down to these gray cells here and we're going

to do a paste special, so Alt-T-S or Ctrl-Alt-V, and then please go down to Values and hit Enter,

and you should get the same footnote here, but it should come up as footnote 2.

Now the difference with these second footnotes here is they should pertain to the IRR,

so if you could please select these two footnotes and hit Ctrl-H, which is a Find and Replace.

What we're going to do in this case is we're going to replace NPV and then hit the Tab key and replace

it with IRR. We're going to go down here and hit the Replace All button right there,

and it should have made three replacements for you. Perfect.

One thing to note is that we really like this format for footnotes. We don't want to clutter up

the model, so we just have these super scripts up here with a 1 and 2, and then down below we have

more space to spell out exactly what we're trying to communicate to the reader. Perfect.

So great job at looking through at this cashflow profile with irregular timing.

Let's jump ahead to the next video now, because we're going to look at a cashflow profile that has

regular timing, and we're going to see and compare the results from NPV, XMPV, and IRR, and also XIRR.

We'll see you there. In this example, we're going to look at a cashflow profile that has regular

or evenly spaced timing. You're probably expecting that the NPV and the XMPV function

are going to match up perfectly. They're going to be close, but they're not going to exactly match

up. One of the things we're going to do is discuss the reason why there's a slight difference

between them. Let's jump in and look through it. So first things first. What we want to do,

first of all, is connect these cash flows over so that we're using the identical cashflow profile

all the way down like this, and then do a control D for a fail down. Next up over here,

we're going to put in an equals sign, and then connect across to our valuation date.
So the valuation dates are exactly identical, but now we're going to project forward with even

timing. So we're going to say equals, and we're going to use an eDate function in here. You can

see it pop up like that, eDate. It wants this start date right here, put in a comma, and then

we're going to hard code 12 months ahead, and we can hit enter. And now we can select down with

the shift key and do a control D to fill down. So what we have in this case are exactly the same

cash flows, but the timing is different for these dates. In fact, we can see this is perfectly

even or regular cashflow timing in this case. Now let's save ourselves a lot of time. Let's go

across here. We're going to use the shift key to highlight all the way down. We're going to copy

all of these formulas, pop over here and hit paste, and we've saved ourselves a lot of work.

Now some of these are in strike through font. We're going to highlight all of them and hit control

five to put all of them so they're not in strike through font anymore. So what we're seeing here

in the results is a very small difference between the MPV and the XMPV, and also a very small

difference down here. In fact, those small differences are due to timing, but it's a little

different than the timing that we discussed earlier. What we have in the case of the MPV or

IRR function is we have perfect even spacing from one year to the next, but with the XMPV,

it's taking into account leap years, which are occurring every four years. Same thing would go

for the IRR function, assuming even timing between every cash flow, but the XIRR is correctly

incorporating the leap years. So what we're going to do again here is pop down into these cells

and paste in a couple of footnotes and encourage you again, if you could please pause the video

and put these footnotes in place. As you can see, this first footnote, footnote number three,

is explaining the difference between the XMPV and the MPV. So what we're going to do, it's similar

to what we did before, we're going to ask you to go in here, highlight these two cells,

let's do a copy and then go down into these cells and we're going to do a paste special,

which is Alt-T-S or Ctrl-Alt-V, then we're going to go down here to values and we've pasted this

result into here. Now what you can do while you still have these two cells selected is hit Ctrl-H,

which is the find and replace. Notice how it's correctly remembered that we want to replace MPV

with IRR in this case, which we want to do again. So let's click replace all right here,

and it's made two replacements, which is perfect. So just to summarize the key findings from this

little investigation here, if you're working with a model that has even or regular spacing to the
cash flows, you could either use MPV or XMPV. Similarly, you could either use IRR or XIRR.

The results are going to be very, very close with the only slight difference coming from the treatment

of leap years. Now you may think from these discussions that you're going to always use the

XMPV or XIRR just to avoid potential issues. But one of the things you're going to find

is that the regular MPV and IRR functions are actually pretty common. The reason is because annual

models are very, very common in finance and with annual models, they usually have consistent and

regular spacing to the cash flow timing. So those functions work just fine. But another

way that you can do it is you could use the XMPV and XIRR all the time just to make sure that there

aren't any issues. So I hope you enjoyed this Excel course as much as we enjoyed teaching it and

sharing it with you. Also, understand that it's great to organize Excel functions into groups or

families as we've done in this course for you. And we really started off in the course with a

group of basic Excel functions, but we expanded that to include the large and small function,

which a lot of people don't actually know about. We also know now how to use the round function and

we know that we can use it not only with positive numbers, but also negative numbers to round

exactly the way that we need. Now some of the aggregation functions that we also looked at are

particularly useful. You want to think about these in families. Remember, we have COUNTIF,

AVERGIF and SUMIF as a family. And then we have the plural versions of these, like SUMIFs, AVERGIFs

and COUNTIFs. And hopefully we understand the differences and the nuances between those now

in that they don't always work with ORLogic and ANDLogic as well. And they do have some limitations.

We had a really thorough discussion of lookup functions. And you may have been surprised by

the amount of time which we spent on the HLOOKUP and VLOOKUP. But remember, you're definitely
going to

encounter those in older legacy files. You may also encounter people that are opposed to you

changing them out for XLOOKUP functions. So it's good now that you know the differences between

those older functions and the newer ones. So you can show them the advantage of switching up

to the XLOOKUP functions. We also hope that you appreciated all the discussions on date functions.

We looked closely at annual, quarterly and monthly models and included lots of date

functions in there that can help you save some time with the dates that you're trying to get.

We also looked at some really neat custom formatting that gets used for dates so you can
have them presenting exactly the way that you want them to appear. We also did a very thorough

comparison between MPV and XMPV and IRR and XIRR. And you'll know now when it's appropriate to
use

one versus another. And you'll also know that even when you're dealing with regular cash flow

timing, you're still going to get some small differences between these functions due to their

treatment of leap years. One other thing which was a common thread throughout the course was the

attention on custom number formatting. It's critical to be able to format numbers properly

and dates properly so that you can get all of your work looking really professional and clean.

As we mentioned at the beginning, we really hope that you enjoyed this course as much as we did.

And we hope to see you soon in the next one. We'll see you there.

You might also like