You are on page 1of 225

Microsoft Excel 2021

Advanced Training
Microsoft Excel 2021 Advanced Training

Table of Contents
Section 1 – Course Introduction ................................................................................................................................................... - 6 -

Course Introduction ..................................................................................................................................................................... - 6 -

Exercise 01 ....................................................................................................................................................................................... - 7 -

Section 02 – What are Dynamic Arrays ..................................................................................................................................... - 8 -

What are Dynamic Arrays .......................................................................................................................................................... - 8 -

Introduction to Spills and Arrays ............................................................................................................................................ - 9 -

Extract and Count Unique Entries ....................................................................................................................................... - 13 -

Unique vs Distinct....................................................................................................................................................................... - 15 -

Unique with Multiple Criteria ................................................................................................................................................ - 17 -

Unique by Column ...................................................................................................................................................................... - 18 -

The SORT Function .................................................................................................................................................................... - 20 -

Horizontal SORT.......................................................................................................................................................................... - 23 -

SORTBY ........................................................................................................................................................................................... - 25 -

Horizontal SORTBY .................................................................................................................................................................... - 27 -

Sequence and Unstacking........................................................................................................................................................ - 28 -

The FILTER Function ................................................................................................................................................................ - 31 -

Using Filter with Logic Plus .................................................................................................................................................... - 33 -

Using Filter with Logic Asterix .............................................................................................................................................. - 35 -

Using Filter with Logic Equals ............................................................................................................................................... - 37 -

Using Filter with Logic Minus ................................................................................................................................................ - 39 -

RANDARRAY and RANDBETWEEN..................................................................................................................................... - 41 -

XLOOKUP ....................................................................................................................................................................................... - 44 -

XMATCH ......................................................................................................................................................................................... - 48 -

Exercise 02 .................................................................................................................................................................................... - 50 -

Section 03 – Two-Way-Lookups................................................................................................................................................ - 54 -

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Two-Way-Lookups ..................................................................................................................................................................... - 54 -

Using the CHOOSE Function ................................................................................................................................................... - 57 -

Using the SWITCH Function ................................................................................................................................................... - 60 -

Exercise 03 .................................................................................................................................................................................... - 62 -

Section 04 – Median and Mode .................................................................................................................................................. - 65 -

Median and Mode ....................................................................................................................................................................... - 65 -

Large and Small ........................................................................................................................................................................... - 67 -

Ranking Data Rank RANK.EQ and RANK.AVG ................................................................................................................ - 69 -

The COUNTBANK Function .................................................................................................................................................... - 72 -

Exercise 04 .................................................................................................................................................................................... - 74 -

Section 05 – Rounding Values .................................................................................................................................................... - 77 -

Rounding Values ......................................................................................................................................................................... - 77 -

Specialized Rounding ................................................................................................................................................................ - 80 -

Using the AGGREGATE Function .......................................................................................................................................... - 82 -

Exercise 05 .................................................................................................................................................................................... - 84 -

Section 06 – The LET Function .................................................................................................................................................. - 86 -

The LET Function ....................................................................................................................................................................... - 86 -

The LAMBDA Function ............................................................................................................................................................. - 91 -

Exercise 06 .................................................................................................................................................................................... - 95 -

Section 07 – Creating your own PivotTable Style .............................................................................................................. - 99 -

Creating your own PivotTable Style ................................................................................................................................... - 99 -

Custom Number Formatting ................................................................................................................................................ - 103 -

Sorting using Custom Lists ................................................................................................................................................... - 107 -

Applying Multiple Filters to Data ....................................................................................................................................... - 109 -

Adjusting Slicer Settings ........................................................................................................................................................ - 111 -

Locking Workbooks but not Slicers .................................................................................................................................. - 115 -

Creating a Calculated Field ................................................................................................................................................... - 117 -

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Creating a Calculated Item .................................................................................................................................................... - 120 -

Solve Order .................................................................................................................................................................................. - 123 -

GETPIVOTDATA ........................................................................................................................................................................ - 126 -

GETPIVOTDATA Dependent Data Validation Lists ..................................................................................................... - 130 -

Creating a Dynamic PivotChart Title ................................................................................................................................ - 133 -

Add Dynamic Series ................................................................................................................................................................. - 137 -

Adding Totals to Stacked Column ...................................................................................................................................... - 141 -

Exercise 07 .................................................................................................................................................................................. - 143 -

Section 08 – Introduction to Form Controls....................................................................................................................... - 146 -

Introduction to Form Controls ............................................................................................................................................ - 146 -

Using a Combo Box................................................................................................................................................................... - 148 -

Using a Check Box..................................................................................................................................................................... - 151 -

Using an Option Button .......................................................................................................................................................... - 153 -

Using a Spin Button.................................................................................................................................................................. - 155 -

Using a List Box ......................................................................................................................................................................... - 157 -

Using a Scroll Bar ...................................................................................................................................................................... - 159 -

Exercise 08 .................................................................................................................................................................................. - 161 -

Section 09 – Power Query Overview ..................................................................................................................................... - 163 -

Power Query Overview .......................................................................................................................................................... - 163 -

Importing Data Using Get and Transform ...................................................................................................................... - 164 -

The Power Query Editor ........................................................................................................................................................ - 167 -

Combining Files ......................................................................................................................................................................... - 169 -

Transforming Files ................................................................................................................................................................... - 171 -

Loading Files into Excel ......................................................................................................................................................... - 174 -

Exercise 09 .................................................................................................................................................................................. - 176 -

Section 10 – Getting Data with FRED .................................................................................................................................... - 178 -

Getting Data with FRED ......................................................................................................................................................... - 178 -

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Creating a Linear Sales Forecast ........................................................................................................................................ - 180 -

Creating a Sales Forecast with Seasonality .................................................................................................................... - 183 -

Adding Confidence Levels ..................................................................................................................................................... - 185 -

Using Forecast Sheets ............................................................................................................................................................. - 187 -

Exercise 10 .................................................................................................................................................................................. - 190 -

Section 11 – Using a Macro to Automate Tasks ................................................................................................................ - 191 -

Using a Macro to Automate Tasks ..................................................................................................................................... - 191 -

Recording, Saving, Running Macros.................................................................................................................................. - 194 -

Recording a Macro with Relative Referencing ............................................................................................................. - 198 -

Multi-step Macros..................................................................................................................................................................... - 201 -

The VBA Editor .......................................................................................................................................................................... - 204 -

Assigning Macros to Buttons ............................................................................................................................................... - 207 -

Creating a Custom Macro ribbon ....................................................................................................................................... - 209 -

Exercise 11 .................................................................................................................................................................................. - 212 -

Section 12 – Finding the Last Occurrence of a Value ...................................................................................................... - 214 -

Finding the Last Occurrence of a Value ........................................................................................................................... - 214 -

Finding the Closest Value ...................................................................................................................................................... - 217 -

Extract Data from the Middle of a String ........................................................................................................................ - 219 -

Exercise 12 .................................................................................................................................................................................. - 222 -

Section 13 – Course Close .......................................................................................................................................................... - 224 -

Course Close................................................................................................................................................................................ - 224 -

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Section 1 – Course Introduction


Video: Course Introduction

Deb: Hello everyone, and a very warm welcome to this course on Excel 2021 Advanced. My name is
Deborah Ashby and I'm an IT trainer and Microsoft subject matter expert with over 25 years’ experience
of using and training Excel to students, customers, and delegates all over the world. And, I am very
much looking forward to hosting this course for you. And what a course we have for you.

If you're looking to up-skill and move out of the ‘catch all’ intermediate Excel user category and become
an absolute guru, then this is the course for you. And we're going to dive straight in to the good stuff
first. We're going to start out by taking a look at the new Dynamic Array functions available in Excel
2021. So things like UNIQUE, FILTER, SORT, SORTBY, XLOOKUP, and so many more. We'll see
how to combine functions together and create complex lookups.

We'll delve into the world of Statistical and Math functions and explore functions like ROUND,
AGGREGATE, RANK, and COUNTBLANK. And, if your thirst for formulas is not quenched by that
stage, I'm going to show you two brand new game changing Excel functions; LET and LAMBDA. The
latter lets you create your own functions without the need for any programming knowledge. It's truly
brilliant.

Now, of course, no advanced course would be complete without at least taking a minor tour through
some of the more advanced features of Pivot Tables and PivotChart techniques. And I'm going to show
you how you can add more interaction into your worksheets by using things like Form Controls.

And we'll finish out this course by taking a look at importing data from external sources, transforming it
in Power Query, and we'll also predict the future with Forecasting and learn the basics of automating our
tedious tasks using Macros and VBA. So, there is so much for us to cover.

Now, all of the files that I use in the videos are available for you to download from the Course Files
folder. So, if you want to follow along with me, then you can. Also, at the end of each section there is an
exercise so you can practice the skills that you've learned. So, with all that said, and without further ado,
grab yourself a drink and I will see you in the first lesson.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Exercise 01

Deb: The first exercise in this course is less of an exercise and more of a way to set ourselves up for
success throughout this course. So, I just want you to check a few prerequisites before we begin.

Now the first thing you need to make sure you do is that you download the Course and the Exercise
Files to your PC. You'll find them in a folder within this course. Just make sure that you save them off to
a folder on your PC that's easily accessible.

The second thing you need to check is the skill level of this course. This course is very much designed
for Advanced Excel users. So, we won't be covering a lot of the basic things. So, basic formulas, things
like customizing the Quick Access Toolbar, and using basic functionality like Cut, Copy, and Paste.

So, make sure that you do at least have an Intermediate level knowledge of Excel before attempting to
run through this course. And if you need to, we do have an Excel 2021 for Beginners, and an Excel 2021
Intermediate course for you to review if required.

And finally, ensure that you're using the correct version. There are so many different versions of Excel
out there. This course is very much designed for Excel 2021, which is the latest standalone version from
Microsoft. I will say that if you've come to this course and you have a Microsoft 365 account, then the
course is pretty much the same.

Because, the standalone version of Excel 2021 was really designed to bring it in line with the features
and functionality in the Microsoft 365 version of Excel. So, once you've checked all of those things, you
are pretty much good to go.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Section 02 – What are Dynamic Arrays


Video: What are Dynamic Arrays

Deb: In 2018, Microsoft rolled out a version of Excel with 6 new Dynamic Array functions and a new
calculation engine that allows us to write one formula and get multiple results. And it really is a game
changer. Because, it eliminates the need for the CSE method to calculate array formulas. And CSE
stands for Ctrl + Shift + Enter.

Being able to write a single formula and getting an array of dynamic results means writing fewer
formulas, and that also means fewer errors. And what it generally leads to is more trustworthy
spreadsheets. So, Dynamic Arrays make formulas much easier to write, and they solve some really hard
problems in Excel.

Now, it is worth noting that Dynamic Arrays and all of the new functions are only available in Excel for
Microsoft 365. So, if you have a Microsoft 365 subscription, you should have access to these new
Dynamic Arrays. And also in this version of Excel, Excel 2021. And as part of the Dynamic Array
update, Excel now includes 6 new functions which leverage the power of Dynamic Arrays. And you can
see the 6 new Dynamic Array functions listed out on the slide just here.

So, we have SEQUENCE which will generate an array of sequential numbers, RANDARRAY, which
will generate an array of random numbers, UNIQUE, which is one of my favorite new Dynamic Arrays,
which will extract unique values from a list or range, we have a SORT Function, which will sort
arranged by column, SORTBY, which is going to sort a range by another range or another array. And
finally, we have the FILTER Function which will filter data and return matching records.

So, what we're going to focus on in this section is just going through each of these new Dynamic Arrays
so you understand how they work and how they can be helpful to you.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Introduction to Spills and Arrays

Deb: Before we begin, it's important to understand Spills and Arrays, because this is probably going to
be new terminology for you. In Excel, formulas that return multiple values will spill these values
directly onto the worksheet.

Now, that might not make too much sense to you at the moment, so let's take a look at a couple of
examples. So, I'm going to show you an example of just a regular formula, first of all, or a standard
formula. So, in this first little table, we have some employee names. And what I want to do is I'm just
going to return their department from the cell table that we have over on the right-hand side.

So, what I could do here is just a very simple VLOOKUP. So we're going to type =VLOOKUP, our
Lookup value is going to be the employee name, we're going to look up that value in this table over
here. And you can see that because I've named my table Employee Location, that's what I'm getting in
the formula, as opposed to the cell references, I need to provide the column index number. So what
information do I want to return?

Well, I want to return the department, which is column number 2, and am I doing an Approximate or an
Exact Match of the lookup value, the employee name? Well, I'm doing an Exact Match. So, I can put 0
or FALSE on the end here. So, I'm just gonna go with 0, let's close the bracket and hit Enter, and it pulls
back IT as the department. And what I can do here is just drag this down to fill out those other
departments for the rest of the employees.

Now, this is what we call a standard Excel formula. When we construct it, the answer just appears in one
cell. And if we want to copy that to other cells, we have to use our Fill Handle or other methods in Excel
in order to do that. Dynamic Array formulas work in a very different way, which you're going to see in a
moment. Before we get on to that, let's just take a look at one other type of formula, and that is a CSE
Array. And this might be something that you're already aware of, the CSE part stands for Ctrl + Shift +
Enter.

Because it's always been in Excel, if we want to perform multiple calculations within one formula, we
need to press Ctrl + Shift + Enter to make that into an array formula. And this is something that
historically, many people have found quite confusing. So let's have a look at a CSE Array, so you can
understand exactly what they do if you're not sure.

Now in this little table, we just have, again, some basic products, we have the quantity that's been sold,
and we have the price of each of those products. So, if I want to find out what the overall total is of all of
the products, this would involve two different calculations, because I need to multiply the quantity by
the price for the first product, and I need to do that for all of these different products. And then, I need to
do a Sum calculation to add up all of those totals.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Now we could do this calculation all in one go using a CSE Array. So what I'm going to do here is we're
going to say =SUM. And all I would need to do is select all of the quantities multiplied by all of the
prices. Now, in order to get this to work, and to calculate correctly, we will need to make this a CSE
Array, which means we need to press Ctrl + Shift + Enter, and not just Enter. So let's do that Ctrl + Shift
+ Enter, and we get our total. So CSE, Ctrl + Shift + Enter, allows us to combine multiple calculations in
one formula.

And another thing with the CSE Array is you can always tell if you do have a CSE formula, because if
you look at the Formula Bar, you'll notice that your formula is encased in these curly brackets. So, that
tells you that it's an array formula. Now bear in mind, both of these examples that we've looked at, this is
going to give you a better understanding of how Spills work with Dynamic Arrays. And what I'm going
to show you is a very basic example of a Filter Dynamic Array.

Now I'm going to move through this section fairly quickly. But don't worry if you're not really
understanding what I'm doing, because we do have an entire lesson dedicated to this FILTER Function a
bit later on. And we'll go through it slowly and we'll break it down. Really what I'm trying to get you to
understand in this lesson is just the concept of how Spills work.

So, what we're going to do is we're going to return the employee, the department and the block from this
table, depending on what we have selected in Column K. So, we're going to use one of the new Dynamic
Array formulas, and that is FILTER. So, let's type it in. We need to select our array, which is going to be
everything in this table. And then I need to tell Excel what I want to include. So I'm just going to filter
for all of the employees in the marketing department.

So, we're going to select the department array, and that has to equal what we have in cell K4. And that's
all I'm going to do. There are lots of other things we can do with FILTER and lots of other arguments
we can use. But just for this basic example, let's close off our bracket and hit Enter, notice the results
spill into multiple cells. So, I don't just have one formula in one cell like I did when I was doing the
VLOOKUP.

And this is effectively a CSE Array, because I'm performing multiple calculations in one formula. And
the results have spilled down into multiple cells. If I was to change this department to let's say, sales and
hit Enter, those results will update. So, everything is fully dynamic. And if we click in our results, notice
that we get this Blue border around the outside.

This is effectively showing us what our Spill range is, that is the terminology. And this Spill range will
expand and contract when necessary when new values are added or removed. So, if I was to add another
name to the bottom of this table, everything should update. So, let's do that. I'm going to go down to the
bottom here. Let's just add Adam Lacey, and we're going to put him in sales. And what we should see is

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

that this employees table will update. And there we go, he's added on to the end. Let's put him in the
East Block, like so. Let's take a look at a couple of other examples of Spills.

I'm going to jump across to the Spills worksheet, and notice that we have a little table just here. And
that's just listing out some first names and some last names of different employees. Now notice that the
first names are in lowercase, and the last names are in what we call proper case. Now I want everything
in this first name column to be in proper case. And I also want to sort this list of names into alphabetical
order, A to Z.

So, the first thing I'm going to do here is put this data into a table, Ctrl + T. Let's click on Ok. And I'm
going to change the colors because those aren't particularly nice, let's just change those to a Purple color.
Now I'm not going to name my table for this example, we'll just leave it on Table 2, and let's tidy up this
data. So, we're going to combine two things here, we're going to use another new Dynamic Array called
SORTBY. And we're also going to make that first name column proper text. So, let's type in PROPER as
well.

And we're going to select everything that we have in here. Close off our PROPER. I'm now back into
my SORTBY formula. So, I can choose which column I want to sort by. So I want to sort by the last
name, comma. And do I want to sort in ascending or descending order? Well I want to sort in ascending,
close off SORTBY, hit Enter, and now take a look at those results. It's converted that first name into
proper case, the results have spilled across both columns, and it's also sorted the list by the last name A
to Z.

Now, one other thing to notice is if you wanted to go in and edit this formula, if I click in a cell down
here within the Spill range, note the formula is kind of grayed out in the Formula Bar. You always must
go to the first cell that contains the formula in order to edit it, then you can double-click, and you can
make your changes.

Now one other thing to note here is if I then wanted to do something like maybe a count on these names,
let's type in COUNTA, I'm going to select everything in this table. Notice what Excel does take a look at
that notation. It's put a pound or a hash symbol in there. And what that basically tells us is that we're
referencing a Dynamic Array. Now, if I was to press Enter here, I'm going to get a result of 22 because
it's counting each of these individual items.

Now that wouldn't be what I would want in this case, I just want to know how many members of staff
we have. So, I could go in here and I can do a divided by 2, and that's going to give me the correct result
of 11.

Now, what about if I was to add more names to this table? And you'll notice at the bottom here, I just
have a little list. So, let's drag this up. And because our original data is in a table, that table is going to

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

auto expand to accommodate those new names. But take a look at what's happened just here, we now
have a Spill Error in column D. Now, why do we have that?

If we click on it, take a look at the range. If you look at the Blue lines around the outside, you can see
that because I have another table underneath, there isn't enough room for these results to spill down. So,
this can easily be fixed simply by moving this table out of the way. So, if we pick this up, and let's just
drag it over here, now I get my spill results.

Also notice that my count has updated as well. So, everything here is completely dynamic. So, that's
kind of how Spills work. Hopefully, you can now understand that and see the difference between just a
standard formula CSE Arrays and Dynamic Arrays.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Extract and Count Unique Entries

Deb: In this lesson and the next few lessons, we're going to be taking a closer look at the UNIQUE
Function. Because, this is such an amazing formula for extracting unique values from a range of cells.
And this is something which I've always thought should be a lot simpler than it is in Excel.

Previous to the release of this new UNIQUE Dynamic Function, it can be quite tricky to get a unique list
of values from a range. Now with the introduction of UNIQUE, the process is so much simpler. So, let's
start out in this lesson by taking a look at a couple of basic examples of how UNIQUE works. So, in
Column A, I have a list of countries. And one thing you'll notice about this list of countries is that those
entries are not unique.

So, we have the UK repeated a few times, we have the USA repeated a few times, so on and so forth.
So, if I just want to extract a unique list of all of the values from the range in Column A, I can use the
UNIQUE Dynamic Function. So, let's click in cell C3, we're going to type in =, and then use UNIQUE.
So, let's start to type this in. Notice it comes up in the list, we can press the Tab key to select it, and we
have three arguments for this particular function.

Now notice that the last two are optional, because they are in square brackets. And in this first basic
example, we're not going to use those optional arguments, we're just going to go for the first one, which
is array. So, all this basically means is select the range that you want to extract the unique values from.
So, we're going to select range A3:A19. Let's close off our UNIQUE Function, hit Enter, and like magic,
we now have a unique list that is a lot shorter than our original list. Because, we're just seeing the 9
unique country names.

Notice that this is a Dynamic Function so we have this Blue area around the outside showing me my
Dynamic Array range. Now notice here that I don't have my list of country names in a table. And if we
take a look at the UNIQUE Formula, you can see it's just referencing a standard cell range, A3:A19.
Now there are so many advantages to putting your data into a table.

For example, if this country list update, so let's add another country on to the end, we're going to add
Brazil, and hit Enter. Notice that my unique list doesn't update. However, if I put this into a table, then it
means that when I change anything in Column A or I add new countries to the bottom, this unique list
will also update. So, let's put this data into a table Ctrl + T, ‘Yes, my table has headers’, let's click on
Ok. I'm gonna leave the formatting as it is, that's absolutely fine.

Now notice this unique list hasn't automatically updated with that new entry for Brazil, as I'm still
referencing just the cell range as opposed to the table. So, let's construct our UNIQUE again, I'm going
to delete the formula out let's go for =UNIQUE. This time, when I select my range, notice it's going to
give me the table name. Now I didn't rename my table, so it's just called Table 1. And then we have the

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

column heading in those square brackets. So country, I now have Brazil on the bottom. But if I add
another country, let's go for Argentina, hit Enter, notice that that now updates.

So, if you really want to make everything completely dynamic, it's always worth putting your data into a
table, just one of the many advantages of using tables in Excel. Definitely one of my favorite things.
Now another little tip here, this range of cells is essentially a Dynamic Array. And it might be that you
want to use this data in other calculations. Or maybe you just don't want to have a formula underneath
this list of values. What we can do is we can throw away the underlying formula. So we just have a
unique list as plain text effectively. So how do we do that?

Well, we do it using Paste Special. So I'm going to select my unique list Ctrl + C to copy. And if we go
up to the Home tab, click the lower half of the Paste button, I'm going to choose to Paste Values Only.
So when I click this, let's press Escape to deselect, I now just have this as a plain text list. If we take a
look in cell C3, I no longer have the UNIQUE Formula listed there.

Now of course, this means that it's not linked to this table anymore. So, if I add any other country names
onto the buttons, let's add Thailand, it's not going to update. But there are many situations where you just
might want to use the UNIQUE Formula to extract the list, but you actually just want to have those plain
values. So, don't forget about that little Paste Special trick.

Now the final thing I want to show you in this first lesson is how we can use UNIQUE and COUNT
together. So, maybe I want to count the list of unique entries. So, we can combine both functions. So
we're going to start out with a COUNTA, because we're going to be counting text, and then we want to
go straight into our UNIQUE Formula.

Now, I could select this unique list, but I'm gonna select this one over here in the table. Let's close off
UNIQUE, close off our COUNT, hit Enter, and it's telling me that I have 12 entries, which would be
correct because this unique list contains 11 entries, you can see that information down in the Status Bar.
We also added Thailand which would make it 12. So, we can combine UNIQUE with many other
functions in Excel to make it more useful and get the results that we want.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Unique vs Distinct

Deb: The UNIQUE Function can essentially do two things. It can extract unique values, or it can extract
distinct values. So, what is the difference between these two? Well distinct means I want all entries in
the source data one time.

So, for example, if the UK is listed out three times in a range, I only want to show it once. So we're
getting a list of unique values. Whereas unique means show everything in the source data that appears
only one time.

So, a good example of that in our data would be South Africa, that appears only once in this list. And so
that would be included in the results of the UNIQUE Formula. Now you might be thinking to yourself,
well, didn't we just use the UNIQUE Formula to extract a distinct list of values? We extracted all entries
from our range of data, regardless of how many times they're listed in the range.

Well, yes, we did. But in these examples, we're going to be using more of the unique arguments. So
we're going to start with distinct, but first of all, we're going to put our data into a table, Ctrl + T, ‘Yes,
my table has headers’, let's click on Ok. And I'm going to choose a different Table Style. Because I don't
particularly like this one. Let's go for a dark one this time. And I'm going to give my table a name. So,
let's call it Country_Population, and hit Enter.

So now, let's extract a distinct list first, and then compare it to what we get when we extract a unique
list. So, we're still using the UNIQUE Function, we're going to select our array, so we're going to stick
with extracting the country names. And notice now because I've named that table, I have the table name,
and then the column name, comma. Let's move on to the next argument, which is by column. So, do we
want to return unique columns or unique rows?

Well, I want to return unique rows. So, we're going to have FALSE in there, comma. Now this is where
we can choose if we're doing distinct or unique. So, a TRUE argument will return the items that appear
exactly once.

Whereas a FALSE argument will return every distinct item. So we're doing distinct, so let's type in
FALSE, close the bracket, hit Enter, and now we get a list of all of those distinct values. Let's compare
this list what happens when we use a different argument.

So, we're going to do UNIQUE again, we're going to select the same range, we want to return unique
rows. So, we still want a FALSE just here. But this time, we want to return items that appear exactly
once in the range. So, we're going to use TRUE instead, and let's hit Enter.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

So, this list is much shorter because it's only returning countries that appear exactly once in the selected
range. Whereas distinct will show all of the countries regardless of how many times they appear.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Unique with Multiple Criteria

Deb: In the examples that we've looked at so far, we've been using the UNIQUE Function to extract just
one list of values. So we've been extracting a unique list of countries. But in this lesson, I just want to
show you how simple it is to extract multiple pieces of criteria using UNIQUE. And once again, we can
either extract distinct values or unique values.

So, if we take a look at our table, we have our list of countries. But this time, we have some additional
information, we have the population of each of those countries in Column B, and then the region or the
continent that those countries belong to in Column C. And what I want to do is I want to extract all three
of these columns or all three of these pieces of information into the table on the right-hand side.

So, once again, the first thing I would probably do here is put this data in a table, Ctrl + T. Let's click on
Ok. And once again, I'm going to change this Table Style, let's just change this to something fairly plain.
In fact, I don't think I'm going to have any Table Style this time. Let's name our table, we're going to call
this Country_Population_Region, and let's hit Enter.

So now if we use UNIQUE, we need to select our array. Now because I want to extract multiple pieces
of criteria, I want to extract all three columns, my array is going to be all three columns. So effectively
the entire table. If I only wanted to extract two columns, I would just select two columns, comma. Do I
want to return unique columns or unique rows?

Well, I want to return unique rows, we need a FALSE in here. And this time, I want to extract every
distinct item. So, once again, we're going to add a FALSE, close the bracket, hit enter, and those results
spill down. And it's going to pull through the other pieces of criteria. And of course, because we put our
information into a table, I could add additional countries on to the bottom. So let's add Spain, and it's
going to update. So, everything is still completely dynamic.

Now let's just undo just to get rid of Spain. And once again, you can see that that disappears. Now if we
change this, I'm going to edit the formula. Remember, you can only edit the formula in that first cell. If I
click somewhere else, the formula is grayed out. Let's double-click and we're going to change this last
argument from FALSE to TRUE.

Press Enter, and now we get that much shorter list again because it's only pulling out of this data
countries that appear once. And once again, if I was to add Spain on to the bottom because that does
appear only once, it’s going to populate in this table. So, super simple to use UNIQUE and extract
multiple pieces of criteria. It doesn't just apply to one column.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Unique by Column

Deb: So far in this section, we've been using the UNIQUE Function to extract values by row. So, in this
lesson, I just like to show you a couple of examples of how we can extract information by column. So,
let's take a look at that information first of all.

So, at the top here, I have a small table, and this table represents some crayon packs. And each crayon
pack contains a number of different colored crayons. And we can see here for pack one, all of the
different crayons, and there are 6 in each pack all of the different colors of those crayons. And we have
eight different packs with different color combinations.

And notice the difference here is that our information is running horizontally across the page. So, when
we're using UNIQUE, we want to extract out information by column as opposed to by row. And this
pretty much works in exactly the same way as the examples we've seen in the previous lessons, we're
just using a different argument. So, let's extract the distinct crayon packs first of all.

So, we're going to type in =, and then we're going to go with UNIQUE, press our Tab key, our array is
going to be all of the crayons. And notice I haven't put this in a table so I'm getting the cell range here
instead of a table name, let's press comma. Now this is where the difference lies. In previous examples,
we've been using that FALSE argument to return unique rows.

But this time, we want to look down the columns, we wanted to check each color in the pack to see if
that is unique or not. So, we want to use the TRUE argument just here, comma, and we want a distinct
list. So, we're going to do a FALSE argument just here. Close off the bracket, hit Enter, and here are our
results.

Now I'm going to select all of this dynamic range. And let's just move this along, just so it's a bit easier
to compare with the table above. So, the results that we have here are basically packs that are distinct.
Now notice it's only brought back effectively 6 packs. So, that means that I have two packs that are the
same in my data. I can see here that yes, I do. So Pack 2 contains these crayons; black, Purple, green,
Yellow, red, and Blue. And I also have the same combination of colored crayons in Pack 8.

So, instead of returning this twice, it's just returned it once in my formula results. So, that accounts for
one of the missing results for. But what about the other one? Well, I can see here that Pack 1 has this
color combination, and Pack 4 has exactly the same color combination. So again, that is why we only
have 6 results, as opposed to 8. So, let's take a look at the final option here.

This time, we're going to return all of the unique crayon packs. So again, this works in a fairly similar
way, =UNIQUE, our array is going to be our different colored crayons. This time, we're going to return
the unique columns. So we want a TRUE argument in here. Now remember, when you're adding these

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

TRUE or FALSE arguments, you can represent TRUE with a 1 and FALSE with a 0. So, if I put a 1 in
there, it's going to work exactly the same.

Now this time, I want to return the unique list. So, I want to return items that appear exactly once. So,
this is a TRUE argument as well, and I'm going to use a 1 for that also. Let's close off our bracket, hit
Enter, and now I get an even smaller list. So, these are the crayon packs that appear exactly once in this
table. So, it's basically omitted anything that is a repeat pack.

So, it's brought back 4 packs of crayons. We have a total of 8, so 4 packs are essentially duplicates. And
that would be correct because again, Pack 1 and Pack 4 are duplicated, as are Pack 2 and Pack 8. So,
extremely simple to search with that by column argument as opposed to by row.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: The SORT Function

Deb: It's time now to move on to talking about another Dynamic Array function, and that is SORT. So,
most Excel users are used to sorting lists of data. We can simply click anywhere in our data. And then
on the Data Tab, we have various different Sort options. We can sort A to Z, we can sort Z to A, or if we
want to do a more complex or we can sort by multiple columns. So, bearing that in mind, why is it
useful to have a specific function that allows us to sort our data?

Well, with a SORT Function, it means that we're not restricted to keeping our data in one location, we
can basically sort it and place that data anywhere on the worksheet. We can also use the SORT Function
with other functions. So, maybe we want to extract a unique list of values from a range, and then sort
that list of values. We can combine them both together, because we're using functions. So, let's take a
look at how a basic SORT works.

Now, what I have here is a small table of data. And this is very much inspired by the Winter Olympics
that are currently on TV. Now, I will say that these are not actual athletes, big numbers, or medals that
they achieved, this is just some dummy data. But, that is where my inspiration for this example is
coming from.

So, we have in Column A listed out some athletes, we have the country that they're participating for, we
have their bib number, and then we have the medal that they achieved. And what I'm going to do first is
just a very basic SORT. I want to output this information in the table on the right-hand side, but I want
to sort the results A to Z by the country. So, let’s click in cell F4, and type in =SORT. Now, notice with
the SORT Function, we have four arguments, and three of those arguments are optional, because we
have those square brackets.

So, let's take a look at this in its most basic form, we're just going to use the one mandatory argument
first of all, and that is the array. So, if I just wanted to do a simple SORT on the athlete name, I could
select the range, close off the bracket, hit Enter, and it's just going to sort those names by the default
sort, which is A to Z.

Now, we want to do something a little bit more complex than this. So let's delete it out. We're going to
go back into SORT, and we're going to use all of the arguments. Now I want to sort all of the data. So,
my array is going to be everything that we have in this table. I can then choose the column that I want to
sort this data by. And this is kind of similar to VLOOKUP in a way in that the columns in the table are
numbered from left to right.

So, the athlete column is column number 1, country is column number 2, bib number is 3, and medal is
4. So, depending on which column you want to sort by, that is the sort index that you would use. So, I
want to sort this list by country. So, my sort index is column number 2. My next argument is the sort

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

order. So if I want to sort in ascending or descending order, now I want to sort in ascending order, so
that is a 1 comma. And our final argument is just do we want to sort by the column or by the row?

Well, I want to sort by the row, so we're going to type in false, just here, close off the bracket. Let's hit
Enter, and now I get those results sorted in ascending order by country. So, we have Australia at the top
going all the way down to USA at the bottom. So, really nice and simple.

And if at this stage, I decided that I wanted to maybe sort by a completely different column, maybe I
want to sort in descending order by the bib number, I can simply edit the formula. So, we're gonna click
on this first cell, let's edit it up in the Formula Bar.

The first argument here is fine, that is just the array, the sort index, well, column number 2, that needs to
be changed, because we now want to sort by the bib number, so that's going to be column number 3.
Now the sort order, if we want to sort in descending order, that is -1. And then we still want the FALSE
argument on the end because we're sorting by row.

So now, if I press Enter, all of those are going to update and you can see that it's now sorted by bib
number in descending order. So, we have the highest number bib number at the top, all the way down to
the lowest. So, pretty straightforward. Now let's just go down to this second table. But we need to
complete.

Now notice here, it just says Sort By Country (Descending Order), nice and easy, we've already done
this. So, let's do this and see what we get. Our array, again is going to be everything in this table. Sort
index, well we want to sort by the country so that is column number 2. Our sort order, well we want to
sort them in descending order, so -1. And we want to sort by row. So, we have a FALSE or a 0 argument
on the end. Now what happens when I press Enter? I'm getting a Spill Error.

And if you remember back to one of our earlier lessons, in general, we get this if there isn't enough room
for those results to spill down. And I can see that if I click on cell A22, take a look at that Blue border.
It’s kind of overlapping the table that I have underneath. So, what I really need to do here to get these to
spill properly, is move this data out of the way. So, let's just grab this and move it. And now all of my
results update. And you can see that they're sorted in descending order by country.

Now the final example I want to show you here is how we can sort by multiple different columns. So, so
far, we've simply been sorting by one column or another. So, the first example we sorted by bib number,
the second one we sorted by country. But what if I now want to sort the list by country in ascending
order and then by bib number in descending order? How do we add in multiple pieces of sort criteria?

Well, this is actually pretty straightforward. So, let's go back into our SORT Function, our array is still
going to be the same thing. So, we're going to select everything. Now we need to provide as sought

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

index. And because we want to sort by two different columns, you want to sort by country, and we want
to sort by bib number, we need to put these in curly brackets. So, we want our first curly bracket, and
then we specify all of the columns that we want to sort by.

So, the country column is column number 2. But we also want to sort by the bib number column, which
is column number 3. Let's close our curly bracket, and then we can specify the sort order for both of
these columns. So again, we need a curly bracket. We want to sort by the country column in ascending
order.

So ascending is 1. And we want to sort by the bib number in descending order, which is -1. Let's close
off that curly bracket, comma. Do we want to sort by column or by row? We want to sort by row, so we
need a FALSE argument on the end, and we can close off our SORT.

So, let's just review that formula. We’re selecting the range that we want to sort, we're then putting
inside the first pair of curly brackets, the columns that we want to sort by, and then in the second pair of
curly brackets, we're specifying the sort order for each of those columns. Let's press Enter and take a
look at our results. So, we're sorting by country in ascending, so I should have A to Z, which is correct.
And then we're sorting by bid number, and that is in descending order.

So, if we take a look at Canada's bib numbers, for example, we should find that they go from the highest
to the lowest. And of course, with this formula again, if we take a look at it in the Formula Bar, if you
wanted to sort by 3 or 4 different columns, you could simply add more column numbers and more sort
orders in between these curly brackets. So, pretty nice and simple to be able to use the SORT Function
and sort by multiple columns.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Horizontal SORT

Deb: In this example, we're going to use the SORT Function to sort data horizontally. And in this lesson
in the process of doing this, we're going to be utilizing a couple of other functions that we haven't yet
spoken about. So, before we begin, let's start out by understanding the data.

So here I have a small table, we have some movie names listed in Column A, and then we have actors
that have been in each of these movies. And I've just listed out 4 actors to keep this data set manageable.
Now, what am I aiming to do with this data? Well, what I want to do is effectively find out which actors
have been in the same movie together more than once.

Now, if I have a list of data that looks like this, it's quite difficult to be able to determine that simply by
using our eyes. So, we're going to need to use a formula or a couple of different formulas and techniques
in Excel to help us out with this. And because there are a few steps, I've listed those out at the bottom.
So, the first thing I want to do is I want to take this first movie, La La Land, and I can see the 4 actors
that we have for that particular movie.

I want to take this range of actors, and I want to sort the data horizontally in ascending order. So
effectively, I should have Emma Stone listed first. So over in this little table, we're going to type in
=SORT, we're going to open our bracket. And this time, the only thing we want to sort is this first row;
B4:E4. Now do I need to provide a sort index here? Am I sorting on any particular column? No, I'm not.
So, I don't have to add anything in for my sort index, I can just press another comma to move on to the
next argument.

Do I want to sort these horizontally in ascending or descending order? Well, I want to sort them in
ascending order. So, we need a 1 just here, comma. Am I sorting by row or am I sorting by column?
Well this time, I'm sorting by column. So, this needs to be a TRUE argument on the end. Let's close off
our bracket, hit Enter and see what we get. So now, I basically have those four actors sorted A to Z.

Now, what I can do is just select all of these and use my Fill Handle and drag down. And it's going to
apply that same sort to all of the actors in the rest of the movies. And notice that it's sorting by the actor's
first name as opposed to their last name. This still isn't the solution to what I'm trying to find out, which
is which actors have been in the same movie together more than once. So, we need to do a few more
things here to achieve our goal.

Now the next thing I'm going to do, I'm going to take this horizontally sorted list of actors, and I'm going
to basically join the text in each row together. And for this, I'm going to use the TEXTJOIN function.
And TEXTJOIN is kind of similar in many ways to something like CONCATENATE, or CONCAT as
it's now known, it will join pieces of text in different cells together, but we have a few different

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

arguments that we can use. Now, a way that I can do this is to join all the text together, so it's in one cell,
I can then sort that data and highlight the duplicate cells. So, quite a few different steps there.

So, what I'm going to do is I'm going to edit the SORT Formula. And we're going to join all of these
actors’ names together so they're effectively all in one cell. And we're going to do that by adding in the
TEXTJOIN Function. Now, the first argument of TEXTJOIN is to specify a delimiter. So, do we want
our actors separated with a space or a comma or a dash? Well, I don't want them separated with
anything, I just want them in a horizontal list next to each other. So, I'm just going to press comma to
move on to the next argument.

Do I want to ignore empty cells? Well, I don't have any empty cells in my data set, but it's not going to
hurt to do a TRUE argument just there. Comma. Now the next argument is text1. Now text1 is going to
be generated by the SORT. So, I can click right at the end here, and I just need to close off my
TEXTJOIN. Let's hit Enter. And now all I need to do is double-click to copy this down. And would you
take a look at that, I now essentially have all of the actors together in one cell.

So now that I have all this text joined together, I'm going to select all, Ctrl + C and I'm just going to
paste in and I'm going to use that Paste Special technique to paste just the values over the top. So now,
I've essentially thrown away the underlying TEXTJOIN and SORT formula. Now that I have my data
like this, I can use my regular sorting options on the Data Tab, and I'm going to sort it A to Z.

Now, this makes it quite a bit easier for me to see all of the actors that have been in the same movie.
And because we have a fairly short list, I can see that right at the bottom here, those names are all the
same, and the same for this one just here. Now if you wanted to make this really obvious, you could
apply some Conditional Formatting, which will highlight duplicate values.

So, let's select our data, up to Conditional Formatting, and we're going to select Duplicate Values. I'm
happy with this fill of light red fill with dark red text, click on Ok. And now I can see the actors that
have been in the same movies. So, these four actors have all been in the movies, The Interview, and
Superbad and these four actors have all been in Burn After Reading and Insurgent.

So, quite a few steps to get to this place. But this is something that can come in very useful when you're
working with real life data.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: SORTBY

Deb: In last few lessons, we've been taking a look at how we can use the SORT Function to sort data in
Excel. And now, it's time to move on to taking a look at another new Dynamic Function, which is very
similar to SORT, and that is the SORTBY Function. So, what exactly is the difference between SORT
and SORTBY?

Well, if you recall, in the sorts that we've done using the SORT Function, we can either choose to sort in
ascending or descending order. Now, SORTBY differs from this because instead of selecting ascending
or descending, we can choose another range or another array to sort by instead. So, let's take a look at an
example.

Now the day set I'm using in this example is basically some very well-known books. We have the book
title in Column A, we have the author of the book in Column B, we have the genre that the book falls
into and Column C, we have when it was first published in Column D, and then in Columns E to I, we
have the number of one to 5-Star ratings that the book has received.

So, we're going to use the SORTBY Function to sort this data. So let's take a look at SORTBY, let's
explore the arguments. And let's take a look at a few different examples.

So let's type in =SORTBY. Now for this one, we have three arguments. Now there are actually more
arguments than three. If you take a look at the end there, we have those three little dots, which basically
tells us that there are more. Now the last argument, and all of the ones that we can't see are all optional
arguments. The only two mandatory arguments are array and by array1.

So, array is the data that we want to sort. If you take a look just above, I have two column headings,
book and author. So, that is the only information I'm interested in seeing. So, my array is simply going
to be the book and the author columns, comma. Now I can choose a column to sort this by. So, instead
of ascending or descending, like we provide when we're doing just a regular sort, this time, we can sort
by column. So, maybe I want to sort this data by the number of 5-Star reviews. So I'm going to choose
the 5-Star column, comma. And now I can choose how I want to sort this column.

So, do I want to have the most 5-Star reviews at the top, or the least 5-Star reviews at the top? Well, I'm
going to sort this in descending order, so we have a -1. Now, if I was to press comma here, notice that it
goes on to by_array2. So, we can sort or we can use this function to sort our range on multiple different
columns.

Now we're going to do that in a moment. For the time being, let's just keep it simple, and just sort by the
5-Star column. Let's close off our SORTBY, hit Enter, and now you can see what we get. So at the top

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

here, we have Harry Potter and the Prisoner of Azkaban. And if I take a look in my data set, let's take a
look at the 5-Star reviews.

Well, I can see that this one has a thousand 5-star reviews, and a quick look down through the rest of the
numbers, that is definitely the highest. So, I don't necessarily have to have the value, the number of 5-
Star reviews, and output into this table in order to sort the data by this column. So, this makes it very
simple for me to see, for example, the top five books based on 5-Star reviews. Let's do another sort.

I'm going to delete this out, I'm going to go into SORTBY again, again, the array is just the book and the
author, because that's the only information that I'm interested in. We can choose what we want to sort
by. So, maybe this time, I want to sort by genre and I want to sort in ascending order of the genre,
comma, and now I want to sort by something else. So maybe I want to see, which is the worst
performing genre? So, which one has the most 1-Star reviews.

So, my second sort is going to be by the 1-Star review array, comma, and I'm going to sort this in
descending order. Let's close the bracket, hit Enter and see what we get. So the first sort we did here was
A to Z by genre. So, if we take a look at She: A History of Adventure, let's find that in the table. I can
see the genre is adventure. Because that begins with A, it's at the top of the list. The next one is The
Catcher in the Rye. And if we find that in the table it's right at the bottom that is the Coming of age
genre which is C.

So I can see that these are going down in A to Z order, but we're then sorting them by 1-Star reviews as
well. And if we take a look at She: A History of adventure, I can see that yes, this has by far the most 1-
Star reviews. If we take a look at some books that are all by the same author, so for example, Harry
Potter, I can see that the Harry Potter book that's received the most 1-Star reviews is Harry Potter and
the Deathly Hallows.

And if we take a look at that it is this one it just here. I can see that yes, this number is greater than all of
the other 1-Star reviews for the Harry Potter series. So, just remember, SORTBY differs from SORT
because you're using a column to specify the SORT as opposed to just selecting ascending or
descending.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Horizontal SORTBY

Deb: Much like the SORT Function, we can also do a Horizontal SORTBY. And we're going to use this
method to tidy up this small data set. So, if you take a look at this data, notice that these column
headings aren't particularly in the correct order.

For example, we have the first name in Column A, and then we have the title in Column B, and their last
name in Column D. Ideally, we want the title in Column A, the first name in Column B, and the last
name in Column C. I then don't really mind if I have department or salary in Columns D, or E.

Now in order to tidy up this data, and sort it so that everything is in the correct order, we need to assign
a sort order to each of the columns. And you can simply do this underneath your data set. So, what we're
going to do here is simply mark the order that we want the columns to appear in. So, I want the title
column to be first.

So, we're going to put a number 1 underneath there. I then want the first name, so let's put number 2 just
there. That's going to be followed by the last name, so that's a number 3. We're then going to have the
department which is going to be column number 4. And then finally, the salary is going to be column
number 5. And we can now use this sort order in our Horizontal SORTBY. So, let's click somewhere up
here, and we're going to do SORTBY. Press the Tab key, what do I want to sort?

Well, I want to sort everything in this table. So, I'm going to select the entire data set; A3:E16.
Remember, if you want to put this in a table that is absolutely fine, comma. What do I want to sort it by?
Well, I want to sort it by this array just here, comma. How do I want to sort it?

Well, I want to sort it in ascending order. Let's close the bracket, hit Enter. And now you can see like
magic, we have all of our columns organized. So now, we can go in and add the titles back in. So I'm
going to grab title, let's Ctrl + C and just paste this across. We want first name, last name, department,
and salary.

Now notice here in the salary column, we're probably going to want to apply some Number Formatting.
I'm also going to widen out these columns by selecting them all, double-clicking, so that we can see
everything in each of these cells.

The final thing to do is to select the salary column. Let's go up to Number and we're going to give this
some Currency Formatting. And we're going to take those decimal places down. So very, very simple to
do a Horizontal SORTBY where you're specifying the order of the columns.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Sequence and Unstacking

Deb: It's time now to move on and take a look at our next Dynamic Array function. And that is the
SEQUENCE Function. Now what SEQUENCE does in its most basic form is it outputs a list of
sequential numbers. And you can specify how many rows and how many columns and also what the step
value is of those numbers.

Now before we get into a couple of practical examples of the use of SEQUENCE, let's just take a look at
it in its most basic, simple form. So if we type in =SEQUENCE, let's take a look at the arguments. So,
we have four arguments, and three of them are optional. Now we are going to use all of them in this first
example. So, what we want to specify first of all, is how many rows of numbers do we want?

So let's say that we want 4 rows of numbers, we can then specify how many columns of numbers we
want. So let's say 4 again. I can then specify my starting number. So, for argument's sake, let's start at
number 1. And then I can provide the step value. So, do we want it to step by 1, 2, 3, so on and so forth?
Let's start out with 1, so you can understand how this works. Let's close off the function, hit Enter, and
take a look at what we've got.

So, we have 4 rows and 4 columns of numbers. The numbers start at 1, and they increase or step by 1
each time. Now if we double-click to edit this formula, let's change some of these numbers. So, this
time, I'm going to say I want 10 rows, we're going to have 8 columns, the starting number is going to be
5, and we're going to step by 10 each time. Let's now hit Enter and see what we get. So, take a look at
this, we're stepping by 10. So, 5, 15, 25, so on and so forth. And we have 10 rows and 8 columns.

So, that's all well and good. But how is this useful when we're working in Excel? Well, let's take a look
at a couple of practical examples. So, let's delete this out and move to cell D4. So, what we have here is
a list of training courses in Column A. And maybe it's my New Year's resolution that I'm going to
complete a different training course, every Friday starting on 2/11/2022.

So, what I basically want to list out are all of the training dates, so that is every Friday, from this start
date. And then I can start assigning what courses I want to attend on those specific training dates. So, we
can use SEQUENCE to help us with this.

So let's type in =SEQUENCE. How many rows of numbers do I want? Well, the number of rows is
going to be the number of training courses I have in this list. Now, I don't particularly want to go
through and count all of these, particularly if my data set was a lot larger than it is. So, we're going to get
COUNT to do all the hard work for us.

Now remember, we need to use COUNTA because we're counting text and not numbers. So, let's select
all of the training courses, A4:A17, close off COUNTA, and now we're back into our SEQUENCE

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Formula. We can now specify the number of columns that we want. Now I'm just filling training dates
down, so I only want one column. I can then choose my starting value. Well, my start date is going to be
2/11. And because I have that in a cell, I can simply select this cell. What is my step value going to be?

Well, I want to complete a different training course every Friday, so that is effectively every 7 days. So,
my step value is going to be 7. If I was going to complete training course, every two weeks, my step
value would be 14. So let's stick with 7, close the bracket, hit Enter, and now I get a whole bunch of
dates. Now, this column isn’t formatted as a Date column, which is why we're getting these strange
numbers.

So, if we select them, and just jump up to Number Formatting and apply the Short Date format, you
should see that the first date there is 2/11, but then the next one is 2/18, which is 7 days after the start
date. So, you can use SEQUENCE not only to produce some numbers, but also to do things like create a
date schedule. And there are so many other ways that you can use this SEQUENCE Function. What I
can now do is go through and simply assign which courses I want to attend. So, maybe Word is going to
be my first course, I can just copy and paste that over.

We can also use SEQUENCE to unstack records. And this is something that previous to this
SEQUENCE command was actually quite difficult to do in Excel. Now, what do we mean by unstacking
records? Well, again, notice in Column A, we have some training courses listed out, and I have these
listed vertically. So we have the name of the training course first, then we have the level, we have the
location of that training course, followed by the date, and it just repeats round.

So again, training course, level, location, date, so on and so forth. And effectively, because I don't really
like the way that this is laid out, I want to lay them out in this order. So course level, location and date.
And I want this to be dynamic, so that when new training courses are added, everything updates. So, in
order to do that, we need to put our data into a table Ctrl + T. ‘Yes, my table has headers’, let's click on
OK. And I'm just going to turn off Banded Rows.

So, let's click in cell C4, and we're going to jump straight into our SEQUENCE Function. The first thing
we need to specify is how many rows do we want? Well, again, I don't want to be counting down this
list. So I'm going to get COUNTA to do all the hard work for me. Let's select everything in this column.
Let's close off COUNTA, and now we're back into our SEQUENCE Formula. The next thing we need to
specify are the number of columns.

Well, I have 4 columns that I need to populate; course, level, location, and date. So, we want 4 columns.
Now for what we're trying to do here, that is all we need, we don't need a start or a step value. So let's
close off our formula and see what we get. Let's hit Enter, and we get a whole bunch of numbers. Now
each one of these numbers relates to an item in Column A.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

For example, this number 1 relates to the first thing that we have in this list. So, this is basically Excel.
Number 2 is beginner, number 3 is the location, and number 4 is the date. So effectively, in this column,
we have all of the courses, then we have all of the levels, all of the locations, and all of the dates.

Now I don't have 24 courses, because that is how many cells I have highlighted just here. And you can
see that down in the Status Bar, if you're not sure, the count is 24. I only have 6 courses in Column A.
So, what we need to do here is edit our formula. And I'm just going to click at the end of the COUNTA,
and we need to divide it by 4.

So effectively, we're dividing by the number of columns. So divided by 4, hit Enter. And now we have 6
courses, 6 levels, 6 locations, and 6 dates. Now, this still isn't giving us exactly what we want. We don't
really want to see these numbers, we want to see the name of the course the level, the location and the
date. So, we can use INDEX to find this out for us. So, we're going to type in =INDEX. So, what are we
indexing? What's our array?

Well remember, with INDEX, the array is always the information that you want to return. So, my array
is going to be my list of training courses. Comma, what is the row number? Well, the SEQUENCE
Function has provided the row number for us. So, I'm going to select cell C4. Now if I was to close my
bracket, just here and hit Enter, it’s just going to return the first one, Excel. Can you remember what
symbol we need to add to reference an entire Dynamic Array?

Well, if you said the pound or the hash symbol, you would be correct. So let's click on the end of C4,
add a pound symbol. Notice it's selected the entire Dynamic Array. And now when I hit Enter, I get
exactly what I'm looking for. The only thing left to do here is change these dates, we need to apply some
Short Date formatting. And we've now unstacked those records and they're looking a lot easier to read.

And of course, if we change anything here, so maybe this second course changes to a PowerPoint
Intermediate course, it's going to also update in our results. And if I add more data on to the bottom, so I
have some additional data down here. Let's just drag it up. It becomes part of this table, and our results
also update. You can see we now have those additional items added on to the bottom. And once again, I
just need to apply some Short Date formatting. So, you can use the SEQUENCE command in many
different useful scenarios.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: The FILTER Function

Deb: The FILTER Function is another brand new Dynamic Array in Excel 2021 that allows us to filter
data based on criteria that we specify. And we're going to be taking a look at the FILTER Function over
the next few lessons, because there's lots of different ways that you can use this function. So, let's start
out in this lesson by understanding simply what the FILTER Function does, and how it might be useful.

So on the left-hand side, I have a reasonably large table. And this table just shows a list of students, it
shows the exam that they took, the grade that they achieved, and also the date of their exam. And what I
want to do here is create a few different filters so that I can get a list of the students that match that
criteria.

So, maybe I want to filter for all students that sat a specific exam, so maybe the French exam, maybe I
want to see what exams occurred on a very specific date. Or maybe I want to see all of the students who
failed the exam so I can send out letters inviting them to reset the test. I can do all of this using the
FILTER Function.

Now, before we get into the actual FILTER Function, we're going to do a couple of things to make our
life easier. The first thing we're going to do is you've probably guessed it, we're going to put our dataset
into a table Ctrl + T, ‘Yes, my data has headers’, let's click on Ok, and let's immediately change that
Table Style because it really is not very nice. And I think I'm just going to choose No Table Style. I'm
also going to give my table a name. So we're going to call this Exam Results, and hit Enter.

Now the next thing I'm going to do just to make my life a lot easier is I'm going to create a Data
Validation drop down list, so I can easily select the exam from a list as opposed to having to type it into
cell F4 each time. So, we're going to utilize our UNIQUE Function to get a unique list of all of the
exams, and then we're going to use that list in our Data Validation.

So, let's click on a cell that's kind of out of the way, we're going to say =UNIQUE. Let's select our list of
exams, Ctrl + Shift + Down Arrow, close off the UNIQUE Function, hit Enter, and now we have a
unique list. Now, I don't want these to have the UNIQUE Formula underneath. So let's do Ctrl + C, and
our little Paste Special trick. Let's paste the values directly over the top. So now I have this list, I'm
going to create a Data Validation drop down, so I can simply select them from a list.

So up to Data, we're going to go into Data Validation, we're going to create ourselves a drop down list,
and the source is going to be this range just here, and click on Ok. So now, that makes it a lot easier for
me to switch between the different exams. Now I'm going to do exactly the same for the dates, and also
the grades. The process is exactly the same so I'm going to do that off camera. Join me back here in a
couple of seconds and we'll continue on with the FILTER Function.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

So now, I have my three Data Validation drop down lists. Now one thing I did when I was creating a
unique list of the grades to get them to display A, B, C, D, E, and then Fail, I combined UNIQUE with
SORT. So, I'm gonna get you to have a go at that. We've seen how SORT works, and we've seen how
UNIQUE works. So, see if you can get these to list out in exactly the same way that I have.

Now I'm going to leave date and grade blank at the moment and just focus on the exam. So, I want to
use the FILTER Function to first of all show me all of the students that sat the Maths exam. So, we're
going to type in =FILTER. Now, FILTER has three arguments, and the last one is optional. Now the
array, again, the array is the information that we want to return. Now we want to return student exam,
grade, and date.

So, we need to select all of our data; Ctrl + Shift + Down Arrow to select that entire range, comma. Now
this is where we specify our criteria, so what we want to include. What is our filter? Well, our filter is
the exam column, Maths. So, what do we want to include? Well, we want to include the exam column
Ctrl + Shift + Down Arrow, and that needs to equal whatever we have in cell F4. So at the moment that
is Maths, comma.

The final argument, which is the optional argument is if we want to specify some text or something, if it
doesn't return any results. So in general, I tend to put in quotation marks, ‘No Records’, if it can't find
anything. Close the bracket, hit Enter, and like magic, we now have a list of all of the students who took
the Maths exam.

Now, once again, Column K doesn't have any formatting applied. So let's change this to Short Date
format. So now, if I was to change this to French, that list is also going to change. So, it makes it very
simple for me to filter those results. Now currently, we're just filtering by one piece of criteria. And that
is the exam that the students sat. But it might be that we want to filter by two pieces of criteria. So
maybe the exam and the date, or maybe three pieces of criteria, the exam, the date, and the grade.

It might be that we want to see a list of all of the students that sat the Science exam, or achieved a grade
of A. And this is where we start to build in logic to our FILTER Function. And that's exactly what we're
going to explore over the next four lessons. We're going to build in logic, and I'm going to show you all
of the different operators you can use to really refine your FILTER results. But in its most basic form,
that is how the FILTER Function works, pretty straightforward.

Now if you're wondering about these columns over here, which have the data that we used to create our
Data Validation drop down, if you want to hide those, that's perfectly fine. We can right-click, select
Hide, and that just removes them from view.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Using Filter with Logic Plus

Deb: In the previous lesson, we saw how to use the FILTER Function to filter for one piece of criteria.
And if you recall, we used the FILTER Function to filter for all students that sat the Maths exam.

Now, in this lesson, we're going to move that concept on a little bit, and we're going to add in some logic
to our filter. And there are many different types of logic that you can add to your filters. And we're
going to start out with the plus logic. And all that means is that we're going to be using a plus operator
(+).

Now when we use the FILTER Function with the plus operator, we're basically doing an OR Formula.
So what does that exactly mean? Well, it might be that I want to filter for all students that sat the Maths
exam or achieved a grade of C. Or, maybe I want to filter for all students that sat the French exam, or sat
a test on a specific date. So, we use the plus operator to separate our criteria. And we're effectively
applying OR logic. So let's see how that works.

Now, I'm just going to switch this filter back to Maths for this first example. And we're going to type in
=FILTER. Now the array argument, as we've already seen, is what we want to return. Now we want to
return the student, the exam, the grade, and the date. So our array is pretty much everything that we have
in this table. I'm going to highlight that first row and use my Shortcut keys; Ctrl + Shift + Down Arrow
to select everything.

Now, we get to specify what to include. Now, in the previous example when we were just filtering for
students that sat the Maths exam, we simply selected the exam column, and checked that it was equal to
Maths. But now we want to add two pieces of criteria, because I'm going to filter for all of the students
that sat the Maths exam, or achieved a grade of C.

Now when you have multiple pieces of criteria, you need to encase each piece of criteria in brackets. So,
let's open a bracket and select what we want to include first. So, I want to include all students that sat the
Maths exam, so we're going to select the exam range, Ctrl + Shift + Down Arrow, and that has to equal
whatever we have in cell F4. So, that is the first piece of criteria. Let's close the bracket.

Now if we want to do an OR we then need to add the plus operator. And then we can specify our second
piece of criteria. So, I'm filtering for all students that sat the Maths exam or achieved a grade of C. So
my second piece of criteria is going to be the grade range Ctrl + Shift + Down Arrow. And that needs to
equal what we have in cell F12, close the bracket.

Now if I had more pieces of criteria that I wanted to add to my OR logical formula, I could carry on
going. I could add another plus, and then specify my next piece of criteria. Now for this example, we're

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

just going to leave it at two pieces of criteria. The only thing left to do here is finish off this FILTER
Formula.

Now, the last argument here is an optional argument because it's in square brackets. And all we're
specifying here is what we want it to return if it doesn't find any results. So in quote marks, we're just
going to say ‘No Records’, and then we're going to close off the FILTER Function. Let's hit Enter.

Now the first thing to know here is the Column K doesn't have any formatting applied. So, let's click the
drop down and change this to Short Date format. So now, what we're getting here are all students that sat
the Maths exam, or achieved a grade of C. So, we can see here for Ming Sia, he sat the Maths exam, this
girl sat the Maths exam, these two so on and so forth.

But we also have in here any students that achieved a grade C. And of course, if we have these as Data
Validation drop down lists, we can simply select different pieces of criteria. So now, I'm filtering for all
the students that sat the French exam or achieved a grade of D. So, that is how that plus operator works.
You're essentially applying OR logic to the FILTER Function.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Using Filter with Logic Asterix

Deb: In the previous lesson, we saw how we could use the FILTER Function to filter data based on
logic. And we use the plus operator to do an OR logical filter. So, we were filtering for all students that
sat the Maths exam or achieved a grade of C. So now, let's take a look at using the Asterix operator (*).
Because effectively when we use that, we're doing an AND logical formula.

So for example, I might want to filter for all students that set the French exam and achieved a grade of
D. And this works pretty much in exactly the same way, we're just changing the operator. So, let's jump
into cell H4 and type in =FILTER. The first thing we need to choose is the array. So, we want to return
everything; the student, the exam, the grade, and the date. So we need to select all of the information in
the table. Remember, Ctrl + Shift + Down Arrow to select everything, comma.

What do we want to include? Well, we're going to include two pieces of criteria again, and each piece of
criteria needs to go in brackets. So the first thing that we're filtering for are all students that sat the
French exam. So we need to select the exam range Ctrl + Shift + Down Arrow, that needs to equal
whatever we have in cell F4, let's close the bracket.

Now we want to apply an Asterix operator, because we want to say, AND, and then we can specify our
second piece of criteria. So, our second piece of criteria is the grade. So we want to select the grade
range Ctrl + Shift + Down Arrow, and that needs to equal what we have in cell F12. We can then close
the bracket.

Now the final thing to specify here is what we want it to display if it doesn't find any records. So again,
we're going to say ‘No Records’ and put that in quote marks. We're going to close off our FILTER, hit
Enter, and take a look at that. Immediately, I know that we have no students that sat the French exam
and achieved a grade of D. So, what about if we start changing some of these things? So, let's go for
grade E.

Now I can see 3 students who sat the French exam who achieved the grade of E. What about if I change
the exam to Maths? We have 1 student who got an E. Now remember, if you want this table to
dynamically update, you need to make sure that your original data is in a table itself. Now currently, my
data isn't in a table. How can I tell that?

Well, when I click inside the data, if we take a look at the ribbons at the top, I don't get my Table
Contextual ribbons. When you're clicked inside a table, you will see a Table Design ribbon at the top.
So, let's press Ctrl + T and put this data in a table. ‘Yes, my table has headers’, let's click on Ok. And
once again, I'm going to change this to No Specific Format.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Now if I was to go and add a name onto the end, here, my filter isn't going to update, because I'm
currently using a very specific cell range; A4:D41. So, I would need to really redefine my arguments for
this particular formula. So, let's delete it out, and I'm going to give my table a name. So on the Table
Design Tab, we'll just call it Students.

Now if we then do our FILTER again, our array is the entire table. And notice now it's picked up the
name of the table as opposed to the cell range, then we specify what we want to include. So, let's open
our bracket, we're going to select the exam range, and that needs to equal what we have in cell f4. Close
the bracket, we're doing an AND so we want an Asterix in here. And then we can specify our second
piece of criteria.

So, that is going to be the grade; Ctrl + Shift + Down Arrow. And that needs to equal whatever we have
in cell F12. Let's close off our criteria, let's specify what we want it to say if it doesn't find any records,
and then close off our FILTER. And if we hit Enter, we get the same result.

Now the difference here is that if I go and add another student to the end of this table, I should find that
my FILTER Formula updates. So, I'm going to add another student that sat the Maths exam and
achieved a grade of E. Currently, we only have 1 result. I would expect this to change as soon as we add
somebody else.

So, I'm just going to add my name to the bottom here. And Maths, we want a grade E and let's just say
8/2022. So, if we scroll back up now, you can see that that's automatically added that to my results. So,
once again, I hope you're taking note of the importance of putting your data into an Excel table if you
want everything to dynamically update.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Using Filter with Logic Equals

Deb: In this next example, we're going to take a look at using the FILTER Formula with the Equals
operator (=). Now, equals is a little bit different, as it will produce a result that contains either both
criteria or neither criteria. So, we're going to use a different example here.

Now in the table on the left, I have a small little table that I've named Venues, and we have a list of 10 or
so different venues. So, this might be that we're looking to book a venue for an event or maybe a
wedding reception or something like that. We can then see the capacity of each venue in Column B, and
if they provide a DJ in Column C.

And what I want to do here is I want to use the FILTER Function to get a list of venues that have a
capacity of greater than or equal to 400, and a DJ, or they have a capacity of less than 400, and no DJ.
So let's take a look at how we would construct this. So we're gonna type in =FILTER. The first argument
is our array. So again, this is what do we want to return?

Now I want to return the venues, the capacity, and the DJ. So, I need to select all of the information.
And because I've named this table, you can see the table name as opposed to the cell references, comma.
What do we want to include? Well, we have two pieces of criteria. So, let's put the first one in brackets.
And our first piece of criteria is that the capacity is greater than or equal to 400.

So, we want to select the capacity column, and that needs to be greater than or equal to 400. Let's close
off our first piece of criteria. Now we need to use the Equals operator, and then enter our second piece of
criteria. So let's open a bracket. The second piece of criteria is that we have a DJ.

So, we need to select the DJ column. And this needs to equal ‘Yes’. And we need to put that in quote
marks because it's text. Let's close off our bracket and specify what we want it to say if it returns no
records. So this time, we're going to say ‘No Venues’ and close off our filter formula. Let's hit Enter and
see what we get.

So, what I should be seeing here in my results are all of the venues that have a capacity of greater than
or equal to 400 and a DJ. So, I can see here Grand Ballroom that fits. And these two here are both
greater than 400 and they also have a DJ. But what I'm also seeing in this list are all of the venues that
have a capacity of less than 400, and no DJ. So that is basically these 3 just here.

So, it might be that if we have a very large venue, I want them to provide a DJ. But if we have a smaller
venue, maybe it's in a small pub or something like that, we don't require a DJ. So, this is where that
Equals operator comes in really useful.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

And of course, if we put this in a table, if I add another venue on to the end, maybe I'm still scoping out
different venues, then our results are going to update. So, let's add The Magic Room onto the bottom,
and we're going to say that this has a capacity of 500. And Yes, it has a DJ. And now you can see that
because that meets our criteria of being over 400 and having a DJ, it's adding it to my list of results. So
that is the Equals operator. It's basically that both criteria are true, or neither criteria are true.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Using Filter with Logic Minus

Deb: In the final example of using logic with the FILTER Function, we're going to take a look at the
Minus operator. And the Minus operator works in a similar way, but what we're going to do here is we're
going to produce a list of venues that have a capacity of greater than or equal to 400, or a DJ, but not
both.

And as you would expect, this works in a fairly similar way to all of the other operators that we've been
looking at. So, we're going to construct our FILTER Function. So let's type in =FILTER, our array, as
always, is going to be everything that we want to return. And because I have that in a table, it's coming
up with the table name. And then we specify what we want to include.

Now with this example, I'm hard coding greater than or equal to 400 into the formula. Now, that in
general isn't the best way to put together your worksheets. So, maybe once I've put together the invite
list, I find that I have more guests than I was expecting. If I want to change this to greater than or equal
to 500 or 600, it means I'm going to have to come in and change the formula where I've hardcoded that
value.

So, let's lay this out in a different way that kind of adheres more to the rules of good spreadsheet design.
So let's delete out FILTER. And what I'm going to do over here is we're just going to add a heading that
says Capacity. And we're going to add into here 400. Let's also add another column for the DJ, and I'm
gonna put in here, Yes.

So now, instead of hardcoding these values into the actual FILTER Formula, I can just reference the
cell. So if any of this information changes, maybe I change my mind on the capacity or decide that I
don't want to DJ, I can simply change it in one cell and everything else is going to update. That's a much
better way of working with your spreadsheets. So now, let's construct our FILTER Formula.

So =FILTER, our array is going to be what we want to return, which is everything, comma. What do we
want to include? Let's open a bracket for our first piece of criteria. So, our first piece of criteria is that
the capacity is greater than or equal to, and now we can choose our cell reference, I4. Let's close the
bracket to close off our first piece of criteria.

Now we're going to use the Minus operator. And then we're going to put in our second piece of criteria.
And that is that the DJ is equal to Yes. So, we can select cell J4. Let's close off the bracket, let's specify
what we want it to say if it finds no records. So, we're going to say ‘No Venues’, close off our FILTER
and hit Enter. And would you take a look at that. So this one is a little bit harder to understand this
Minus operator.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

What it's showing us are all of the venues that have a capacity of greater than or equal to 400 or a DJ,
but never both. So this first one here, Ritzys, that has a capacity under 400 but it does have a DJ. So, it's
appearing in our results. The same for this one, and the same for this one. Now, when we get to these 3
just here, these venues have a capacity of greater than or equal to 400, but they don't have a DJ. So, one
of these is true. That's basically what will appear in the Search results. One of those conditions needs to
be true.

But one thing that we don't see is when both conditions are true. So, what we won't see in here are any
venues that have a capacity of greater than or equal to 400, and a DJ. So, that is the difference with this
operator. And as I said if at any point our details change, for example, if I change the capacity to greater
than 600 and hit Enter, you can see that automatically, my results update and I haven't had to go in and
start messing around with this FILTER Formula.

If I change the DJ to No, again, I'm going to get a different set of results. So, outputting your criteria into
separate cells and using the cell reference is a much better method than hardcoding it into the actual
formula.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: RANDARRAY and RANDBETWEEN

Deb: Another new Dynamic Array available in Excel 2021 is the RANDARRAY Function. And
RANDARRAY allows us to generate or randomize data. So, let's take a look at it in its basic form, and
then we're going to see how we can apply this in a real world scenario.

So, I'm going to click just somewhere on this worksheet, and we're going to type in RANDARRAY.
Now, notice here that we have five different arguments, and all of them are optional. But we're going to
use all of these five arguments, so you understand what each one does.

Now, as I said, RANDARRAY will generate a random list of numbers. So, the first thing we need to do
here is specify how many rows of numbers we want. So, I'm going to say that I want 4 rows of random
numbers, I can then choose how many columns, so let's go for 4 again. And then if I want to, I can
specify a minimum and a maximum value. Now, I don't have to utilize minimum and maximum because
none of these arguments are mandatory.

If I don't specify a min or a max, then Excel is just going to generate some random numbers of its
choosing. But maybe I do want to be a little bit more granular about the numbers that I'm generating. So,
I'm going to say that I want to generate numbers between 5 and let's say 1000. And the final argument is
if I want those numbers to be decimals, or integers. So, let's take a look at decimals first of all, we're
going to use the FALSE argument. Let's close the bracket and hit Enter, and that is exactly what I get.

Now, of course, if you want to, you can take these decimal places down just by using your Number
Formatting. And there you have your list of random numbers. And this is particularly good if you're just
trying to generate some dummy data to use in maybe training videos like this one. Or maybe if you just
want to practice your Excel skills, it's good to know a few techniques just to get some random or dummy
test data into your worksheet.

And of course, because this is a RANDARRAY formula, you could throw away the underlying formula
and just have the values in the cells by doing Ctrl + C to copy, Paste Special and paste those values. So,
really nice and straightforward. Let's take a look at RANDARRAY again. But this time, we're going to
use the integer argument.

So, let's choose RANDARRAY. This time, let's do 10 rows, and we're going to do 5 columns. The
minimum value is going to be 1 and the maximum value is going to be 900. And this time, we're going
to use the TRUE argument so that we get integers instead. Let's hit Enter, and there we go.

So that final argument really just specifies if you want decimal numbers, or if you want integers. So
really nice and straightforward. Now, that's all well and good, but how can this be useful in practical
examples? Well, let's take a look at this first set of data. Now we're going to pretend that we work for a

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

company called Big Drop Bungee. And we have the list of all of the people who are going to be doing a
bungee jump today. And we want to assign them to a jump order. So, who's going to go first?

Because if we were to ask all of these people, they're probably going to look towards everybody else to
do the first bungee jump. So, we want to assign a random order for these jumpers. And we can use
RANDARRAY to help us do that. So what we're going to do here is we're going to type in
=RANDARRAY. Now, how many rows do we want to generate random numbers for?

Well, I want to generate random numbers for all of these jumpers. And because my list is fairly short, it
would be quite easy for me to count the number of jumpers, but I'm going to get Excel to work this out
for me, by going straight into a COUNTA. Let's select our list of jumpers, close off our COUNTA, and
now we're back into our RANDARRAY Formula.

Now I don't actually want to specify a minimum or a maximum, and I'm not going to specify the integer.
And if you don't specify what integer you want to use, by default, you're going to get a decimal, which is
fine in this case. So, let's close this off, hit Enter, and this is what we get. Now notice that one of these
looks like shorter than the other and that's just because there is a 0 on the end of this.

So, just to keep things consistent. I'm going to use my Increase Decimal button just to make that the
same as all of the others. So now that I have this list, I'm going to use my copy and paste trick to throw
away the underlying formula. So let's select the numbers Ctrl + C, and then we're going to Paste Special
and paste the values over the top. So, now we have these random decimal numbers, I'm going to sort
these into order. So, let's click in the jump order column, and then on the Data Tab, I'm going to sort
these smallest to largest.

So, what we could say here is that whoever has the smallest number is going first, and whoever has the
largest number is going last. So effectively, we've generated a random jump order for all of these
different jumpers. So, it looks like Lonnie has drawn the short straw and she's going to be doing her
bungee jump first. So, that is a very practical use of how you can use RANDARRAY. Now before we
move on from this lesson, I want to show you one more function.

Now technically, this function isn't a Dynamic Array function, but it is very similar to RANDARRAY.
So, I thought it'd be a good time to introduce it into the course. Because, we are going to use this quite a
bit later on. Now if we jump across to the next worksheet, I want to show you how you can use
RANDBETWEEN. And I will say that RANDBETWEEN is one of my most used functions in Excel.

Because of the type of job that I do, I'm always running training sessions, and I need to be able to
generate dummy exercise files and practice files with random data. And RANDBETWEEN really helps
you do this. So let me show you an example of how it can be useful.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

So, let's just say that these people are employees. And I want to generate a worksheet that shows some
random employees, some random salaries, and the dates that they were hired. And I want to use this to
maybe showcase sorting and filtering. So, instead of going through and just typing in a salary for each of
these people very manually, I want to use RANDBETWEEN to generate some random numbers which I
can use as salaries.

So, we're going to type in =RANDBETWEEN. Now, RANDBETWEEN just has two arguments, bottom
and top. So you just specify the bottom number, and then the top number. And the formula will generate
random numbers between those two numbers. So, let's say the bottom salary is going to be 25,000, and
the top salary is going to be 50,000. Close the bracket, hit Enter, and now we can double-click to copy
that down. Let's Ctrl + C, and then paste just the values over the top. And now, all I need to do is apply
some Currency Formatting. And effectively, I've very quickly created myself some random salaries.

I can also utilize RANDBETWEEN to generate random dates. So, let's take a look at this. Now, again,
we just have these two arguments. But because we're using dates, we want to go straight into the DATE
Formula. So now, we can specify our bottom date. So, let's see, we're doing dates that people have been
hired. So, we're going to say that everybody was hired between 2005 and 2021.

So, the bottom date is going to be 2005 for the year. And we'll say the month is January, and the day is
the first of January, let's close the bracket, comma, we now need to specify our top date. So we go
straight into the DATE Formula again. So, my top date is we're not going to have hired anybody after
December 31, 2021. So the year is 2021, the month is 12, and the day is 31. Let's close off the DATE
Function, close off RANDBETWEEN, and if we hit enter, we're going to get a number.

Let's double-click to copy that down. And we need to apply the correct Date Formatting. So, let's jump
up to here and select Short Date. And like magic, we've now generated ourselves some random dates
between 2005 and 2021. So, RANDBETWEEN can be so helpful if you're quickly trying to create data
sets to practice with or maybe do some training with.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: XLOOKUP

Deb: Another great addition to Dynamic Array functions is the XLOOKUP Function. And this is the
perfect function for anybody who has ever struggled using INDEX and MATCH to perform Lookups.
The INDEX and MATCH Formula in itself is a reasonably complicated formula. And it can be quite
difficult to remember, particularly if you don't use it all that often.

With the introduction of XLOOKUP, not only is it more powerful and more flexible, the notation is a lot
easier. So, let's take a look at a couple of examples of how we can use XLOOKUP. Now in this table, on
the left-hand side, I have some apps listed out. I have the category that the app belongs to, the app name,
the type of app it is, the revenue, and the profit. And effectively, what I want to be able to do is select an
app from the Data Validation drop down list, and have it return the category, the type, the profit, and the
revenue.

Now normally, you would look at using VLOOKUP, or something like INDEX and MATCH for this.
And in fact, in order to return the first result of the category, you would have to use INDEX and
MATCH. Because remember, one of the big limitations of VLOOKUP is that you can't use a lookup
value that's to the right of what you're trying to return. So in this case, Google Docs is to the right of the
category. So, this would need to be an INDEX and MATCH.

Now just so you get a good comparison as to how simple XLOOKUP is, let's do an INDEX and
MATCH first of all. So, we're going to type in =INDEX, and the first thing we need to select here is the
array. Now the array is what you want to return. So in this case, we want to return the category. So we
need to select the category column Ctrl + Shift + Down Arrow to select that comma. We now need to
provide the row number. And remember, we can use the MATCH function to help us automate the
finding of that row number.

Our lookup value is whatever we have in cell H3, and our lookup array is wherever we're going to find
that lookup value. So, that lookup value exists in the apps list; Ctrl + Shift + Down Arrow. The final
argument that we have here is the match type. And for this, we want to do an Exact Match of the app
name in the apps list. So, we want a 0 argument on the end. We're going to close off MATCH, close off
INDEX, and hit Enter. And that's going to give us our result. So, let's just double check this, we need to
find Google Docs. Here it is in row 9, and the category is productivity. So that's all working.

And if you can remember this formula, that's fine, you can still carry on using INDEX and MATCH. But
now let's take a look at how we can do the same thing, but this time using XLOOKUP, because I think
you're going to find this a lot easier. So we're going to type in =XLOOKUP, and press the Tab key. Now
the XLOOKUP function has 6 arguments. And you'll notice that the last 3 are optional arguments
because they're in square brackets. So, you don't necessarily have to use all of these arguments.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

The first argument that we need to provide is the lookup value. So, that's fairly straightforward, we're
looking up whatever we have in cell H3. We then need to provide the lookup array. So, where are we
going to find that app? We're going to find it in the apps list; Ctrl + Shift + Down Arrow to select that
column. The only other thing we need to provide is the return array. So, what do we want to return? We
want to return the category, so we need to select the category column; Ctrl + Shift + Down Arrow.

Now if I wanted to, I could just stop right there, I don't have to go ahead with the final 3 arguments. So
if I close my bracket and hit Enter, it's going to give me the correct result. So now, let's do the same
thing. But for the type we're going to use some of the other arguments. So let's type in =XLOOKUP.
Our lookup value again is whatever we have in cell H3, and we're looking it up in the apps list. We then
specify the return array. So, this time we want to return the type. So, we need to select the type column,
comma.

Now let's take a look at the first optional argument; if not found. So, this is where you can specify what
you want it to say if it can't match the app in the table. Now if it can't find it, I just want it to say, ‘Not
Found’. And we need to put this in quote marks. The next optional argument is match mode. So this is
the type of match you want to do. So, much like the MATCH function, we can choose to do an Exact
Match. But we also have some other options here.

We can do an Exact Match or next smaller item, we can do an Exact Match or next larger item, or we
can do a wildcard character match. So the wildcard character match, that would be relevant if I had, for
example, may be Google Asterix as my lookup value. So, we can do wildcard character matches. And
these other two where we're looking for an Exact Match or next smaller or larger item, I'm going to
show an example of that in a moment, it's very similar to when you do a VLOOKUP Approximate
Match.

Now I want to do an Exact Match, I want to match the words Google Docs exactly in the table. So, the
next argument is 0, comma. Now I can choose how I want to search through this list. So, this is
something else that you can't really do when you're performing a lookup with INDEX and MATCH. I
can choose to search first to last or last to first. And I can even do a binary search. So, if I have my items
sorted in the ascending or descending order, I can specify that here too.

Now, if you don't provide any argument just here, the default is searching first to last. So, it's going to
start at the top of the table and search through the entries top to bottom. So, let's do first to last, close the
bracket, hit Enter, and now I get the type. Let's double check to make sure that that is correct. I can see
yes, the type here for Google Docs is Free-Ads. Let's just finish these off, let's do the profit.

So, we're going to do XLOOKUP again. The lookup value is Google Docs, comma, the lookup array is
where we can find that that's in the apps list. The return array this time is the profit column. And I'm not
going to use those optional arguments. Let's just close this off and hit Enter, and we get our result. Let's

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

just do the final one. Because practice does indeed make perfect. Lookup value is H3. We're looking it
up in the apps list. And we want to return the revenue this time. So we want to select the revenue
column. Close the bracket, hit Enter, and we get our result.

Let's just make sure that we are still all correct. And I can see that yes, everything seems to be working.
So now if I change the app that we're looking up in the drop down, everything should update nicely. So,
XLOOKUP is not only a lot easier in its notation, it's a lot easier to understand. Remember, it also
allows you to specify a few different pieces of criteria. Let's take a look at another example of
XLOOKUP.

Because remember, XLOOKUP is part of the Dynamic Array set of functions, which means that it can
spill and return multiple results. So, let's take a look at a quick example of that. I have a small employee
table just here, we have some employee IDs, some employee names, and their department. And what I
want to be able to do is type in the employee ID and have it return the employee name and the
department.

So, we're effectively returning two pieces of information from this table. So we're going to type in
=XLOOKUP, our lookup value is going to be the employee ID, we're looking it up in the employee ID
range. And we want to return the employee name and the department. So when it comes to the return
array, we simply just need to select everything that we want to return. I'm going to add a piece of text if
it's not found.

So we're going to say just, ‘Not Found’ in here. I want to do an Exact Match, and I want to search first
to last. Close the bracket, hit Enter, and take a look at that. If I now change this employee ID to 1005,
you can see that everything updates. So, it looks like Terry's in the same department. Let's do something
else, 1008, there we go.

Now, if I was to enter in an employee ID that doesn't exist, so let's say 2000, I'm just gonna get that if
not found text in the cell. So, you can use XLOOKUP to return multiple results, because it is a Dynamic
Array formula. Let's take a look at our last example. And this is where we're going to focus on that
match mode argument. And this is very similar to how VLOOKUP works when you're doing an
Approximate Match as opposed to an Exact Match.

So, what we have over here are some tax rates and some salaries. And what I want to be able to do is
type in a salary and get it to return the tax rate. Now, what if the salary that we have in cell D6 doesn't
exactly match a salary that we have in the table? So, maybe I have in here 30,000. Now I want to apply
some formatting to that. So let's just apply some Accounting Format and take those decimal places
down. And I want it to return the tax rate.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Now, because we don't have 30,000 listed exactly in this column, I effectively need to do an
Approximate Match. So I want it to return the tax rate that it's nearest to. So I can choose if I want to
return the next highest or the next smallest. So, let's type in =XLOOKUP, our lookup value is the salary,
we're looking at up in the salary column, we want to return the tax rate. I'm going to skip over the, if not
found option, because we want to go straight to match mode.

So this is where I can choose if I want to do an Exact Match, or I match it to the next smallest item or
the next largest item. Now I can't do an Exact Match here because 30,000 doesn't exist in the table. So,
do I effectively want to round it down to the one below or round it up? So, I'm going to say I want to do
an Exact Match or next larger item. So, that's going to be a 1 argument. Let's close the bracket, hit Enter,
and it's gonna give me a tax rate of 25%.

So, if we look at the table just here, it's picked this one out, because 30,000, if we were to round it up,
the next tax rate would be 25%. If I was to change this to let's go for 14,000, it's given me a result of
12% because again, it's rounding it up to 15,000 effectively. So, that match mode is very similar to
VLOOKUP Approximate Match.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: XMATCH

Deb: The final new Dynamic Array formula that we're going to look at in this section is XMATCH. And
this is like MATCH on steroids. Because, we can do so much more with XMATCH than we can do with
MATCH. So, the best thing to do here is just dive in and take a look at a few different examples.

Now I have 3 different examples here that we're going to run through. And this first example, we just
have a very simple list of different applications. And what I want to do is I want to search for the
application and return its position in the list. Because, that's basically what the MATCH function does,
it's going to provide you with the row number or wherever the lookup value is located. And what you'll
notice about the application that we're looking up is that I'm using a wildcard character just here.

So, let's take a look at how we would construct this XMATCH. So we're gonna type in =, let's choose
XMATCH. And we have five different arguments here. Once again, the last two are optional, so we
don't need to complete those if we don't want to. Now the first argument is the lookup value. So we're
looking up whatever we have in cell C5.

Where are we going to look it up? Well, we're going to look it up in this list just here. What type of
match do we want to do? Are we doing an Exact Match of the word Goo *? Do we want to match
exactly, or to the next smaller item or to the next larger item? Well, it's going to be none of those
because we're using a wildcard character.

So for this one, we're going to choose number 2. And then finally, we get to specify the search mode. So
if we want to search first to last, last to first, or if we've sorted our list in ascending or descending order.
So, I want to search first to last. So we're going to add a 1 onto the end there. Close the bracket, hit
Enter, and I can see here, that using this wildcard character, it's picked out of this list that I'm looking for
Google Docs, and it's returned the position of 1.

So, XMATCH shares many similarities with the XLOOKUP Function. Let's take a look at another
example. Now, this time, we just have a very small list of employees, and we have the monetary value
of the sales that they've generated. And what we're going to see here is that any of these sales agents that
have generated more than $17,000 in sales are going to get a bonus. And what the XMATCH formula
will do is it will basically do a COUNT because we're using numeric values. And it's going to tell us
how many employees in our list will receive a bonus.

So let's type in =XMATCH, our lookup value is going to be our threshold. Where are we looking this
up? Well we're looking it up in the sales column. Now what type of match do we want to do here? Well,
I don't want to do an Exact Match, because we're not matching exactly 17,000 in that column.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

What I want to say is that everybody who's achieved greater than that amount of sales is going to get a
bonus. So I want to do an Exact Match or next larger item. So, we want a 1 in there. And we're going to
search first to last. Let's close the bracket and hit Enter. And it's telling me that two employees have
exceeded 17,000 in sales and are going to get a bonus.

Now if I check the table over here, I can see yes, it's only these two people; Adam Lacey and Lucy
Jones, who will receive a bonus. Now the third example here is an example of how you can use INDEX
with XMATCH. So, you're probably more familiar with using INDEX with the MATCH function, but
you can expand on that by using XMATCH.

So, let's return the department and the location for the employee that we have in cell G29. So, we're
going to start out with an INDEX, we need to choose our array. So, remember our array is the
information that we want to return. So in this case, that's going to be the department, comma. Next, we
need to find the row number.

Now normally, if we were doing just a regular INDEX and MATCH, this is where we would go straight
into our MATCH Formula. And we're going to do exactly the same thing here, but we're just going to
use XMATCH instead. We can now specify our lookup value, and our lookup value is the employee.
We're looking up the employee name in the employee name range, and now we can choose match mode
and search mode.

So, I want to do any Exact Match of the employee name. And I want to search through the list first to
last. So, we want a 1 on the end. Let's close off XMATCH, close off INDEX, and hit Enter. Let's do that
one more time for the location. So we're going to type in =INDEX. This time, we want to return the
location. So this, is our array. We want to automate the finding of the row number by going straight into
XMATCH.

Our lookup value is the employee, we want to look that up in the employee range. We want to do an
Exact Match, and we're searching first to last. So we have a few more additional pieces of information
that we can add into our formula when we're using XMATCH as opposed to MATCH. Let's close off
both of our formulas, hit Enter, and let's double check our results.

So Adam Lacey, he's in the marketing department, and he's located in the West Block. If I was to change
this to let's say, Ming Sia and hit Enter, all of those details update. So, XMATCH is pretty much the
same as MATCH. It will return the position of a lookup value, and you can combine it with INDEX to
perform a powerful and complex lookup.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Exercise 02

Deb: It's time now to complete Exercise 02. And in this exercise, I'd like you to practice some of the
skills that you've learned in this section related to Dynamic Array functions. Now, notice at the bottom,
we have four different worksheets that I want you to work through. We're going to start out on the first
worksheet where we're going to practice using the UNIQUE Function.

So the first thing I'd like you to do is extract a list of unique months into Column G. I’d then like you to
extract a list of distinct months into Column H. And then finally, I'd like you to count the number of
unique months. Once you've done that, you can click over to the FILTER & SORT worksheet.

Now for this exercise, I'd like you to first create a Data Validation drop down list containing unique
values for the sales agent and unique values for the month. And what I’d then like you to do is use the
FILTER Function and create a filter that filters for the sales agent Ben. And I'd like you to ensure that
the text ‘No Records’ is displayed for 0 results.

Once you've done that, and it's working, I'd like you to then modify the formula to filter for sales agent
Ben, and the month of February. And once you have those results, I’d then like you to modify the
formula again to filter for sales agent Ben, or the month of February, which should give you a longer
list.

Once you have that longer list of results, I’d then like you to modify the formula and sort the results in
ascending order by sales agent. And I'd like you to use the SORT Function as opposed to sorting utilities
on the Home or Data ribbons. And then a final thing I'd like you to do is enter the total profit generated
by Claire for the month of March, and I'd like you just to input that into cell P4.

Once you've completed that, it's time to move on to the XLOOKUP worksheet. Now for this exercise,
once again, I'd like you to create a Data Validation drop down list in cell I4, containing the unique
values for the sales agents. And then I'd like you to construct an XLOOKUP formula to return the team,
the revenue, and the profit for whichever sales agent is selected in cell I4. And then the final part of this
exercise is practicing the RANDARRAY function.

So, I'd like you to use RANDARRAY to add some dummy data into Columns B and C for revenue and
profit. And I'd like you to use the COUNTA function to work out the number of rows required. I'd like
you to use 100 as the minimum value and 1000 as the maximum value and output the values as integers,
not decimals.

Once you've done that, I'd like you to use Paste Values to just throw away the underlying formulas. So,
quite a bit of work to do in this exercise. Have a go at it. And if you'd like to see my answer, then please
keep watching.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

So, the first thing we need to do here is extract a list of unique months into Column G. So this is fairly
straightforward, we're just going to select the UNIQUE Function, our array is going to be the list of
months, and that is it. Close the bracket, hit Enter, and that is our unique list.

Now remember distinct is slightly different because that will return only the months that appear exactly
once. So, we're gonna go for UNIQUE again, we still want to extract the months, we want to return the
unique rows. So we need a FALSE in here, but we want to return items that appear exactly once. So,
we're going to add a TRUE on the end here, and hit Enter. And then finally I asked you to count the
number of unique months.

So because we're counting text, we need to use COUNTA. We can then go into UNIQUE, and we can
select our months. Close off UNIQUE, close off COUNTA, hit Enter, and the result there is 7. Which
should basically be the same as the number of values returned in Column G. And if we take a look down
the Status Bar, you can see that the count is in fact 7. Let's jump across to the next worksheet.

Now, this is where we get to practice the FILTER and the SORT Functions. And the first thing I asked
you to do was to create a Data Validation drop down list containing unique values for the sales agent
and months.

So, the first thing I'm going to do is just somewhere down here is I'm going to use UNIQUE again to get
a unique list of the sales agents and also a unique list of the months. So now, I can use these to create my
Data Validation drop downs. So in cell G5, let's jump up to Data, into Data Validation, we want to
create a list and our source is going to be these values just here. We need to do exactly the same for the
month. So up to Data Validation, we want to create a list and our source are our unique months. So, let's
make a couple of selections.

The next thing I asked you to do was to create a filter to filter for sales agent Ben, and ensure that the
text, ‘No Records’ is displayed if there are no results. So we want to come over here and put together
our first filter. Now we want to return everything. So our array is going to be everything in this table.
We now need to specify what we want to include. Now we're only including sales agent Ben, so we only
have one piece of criteria.

So, we're going to include the sales agent, when it's equal to what we have in cell G5. And in a moment,
I'm going to switch this to say, Ben, comma. What do we want it to say if it doesn't find any records?
Well, we want it to say, ‘No Records’. Let's close our FILTER and hit Enter. At the moment, we're
seeing the results for Claire, but we need to switch this to Ben. And there we go.

This time, we want to modify the formula to filter for sales agent Ben and the month of February. So
let's switch our month to February. And let's edit our formula. Now I'm going to edit this up in the

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Formula Bar. So, if we delete out we have there, and just take it back, we've selected our range. Now we
need to specify what we want to include. Now remember, if you have more than one piece of criteria,
they need to go in brackets.

So, our first piece of criteria is that the sales agent needs to equal Ben. Let's close the bracket. And if
we're doing an AND filter, we need to add the multiplication symbol, because our second piece of
criteria is that the month is equal to February. Let's close the bracket. We want it to say ‘No Records’ if
it doesn't find anything. Let's close and hit Enter. And now we get 2 results for sales agent Ben in the
month of February.

Next, I wanted you to modify the formula to filter for sales agent Ben or February. So this is where
we're changing that operator. So, let's go back up to our formula. And instead of an Asterix in here, we
just need to switch this out for a plus instead. So now, we're getting a slightly longer list of results
because we're filtering for sales agent Ben, or the month of February. Then I asked you to modify the
formula and sort the results in ascending order by sales agent.

So once again, let's jump up to the Formula Bar. And we're just going to add SORT onto the front. The
array is generated by the FILTER Formula, let's go to the end. Our sort index, well, we want to sort by
the sales agent, which is column number 1. And we want to sort in ascending order. So we need another
1 on here. Let's close the bracket, hit Enter, and we get our new list of sorted results.

The final thing I asked you to do was to enter the total profit generated by Claire for the month of March
in cell P4. So, let's switch our filter to Claire, and we're going to change our formula. So this time, we're
going to say FILTER, we want to select everything. We have two pieces of criteria. The first piece is
that we want to filter for sales agent Claire, so sales agent must equal Claire. And, so we need an Asterix
in there, we want to filter for the month of March. So let's select month. That needs to recall what we
have in cell G8. And again, I'm going to change this to March in a moment.

Let's close the bracket. Let's add our text for ‘No Records’, close the bracket again and hit Enter. Now
let's make sure that we switch this to March because the final thing we needed to do was enter the total
profit for Claire in cell P4. So, this is a very straightforward SUM calculation. Let's just type it in. We're
looking for the total profit so let's select both of those cells, hit Enter, and there we go, 555. Let's move
on to the next part of this exercise.

The first thing we need to do here is create a Data Validation drop down list containing unique values
for the sales agents. Now all of these sales agents are unique, which makes this a little bit simpler. We
can go up to Data Validation, we don't need to do UNIQUE first of all, and we’re going to create a list.
And our source is going to be this range just here. Let's click on Ok, and I'm just going to select a sales
agent from here, because now we want to use an XLOOKUP formula to return the team, the revenue,
and the profit.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

So let's type in XLOOKUP. Our lookup value is whatever we have in cell I4, our lookup array, well, our
lookup array is the sales agent range. And our return array is going to be the team. Close the bracket, hit
Enter, and that gives us our result. We're going to do exactly the same to look up the revenue and the
profit. So, our lookup value is I4, we're looking it up in the sales agent column. And this time, we're
returning the revenue, close the bracket, hit Enter.

And finally, we need to do the same for the profit. Lookup value is I4, we're looking that up in the sales
agent range. And this time we're returning the profit. Close the bracket, hit Enter, and there we go. And
we should find that when we select somebody else from this list, everything updates.

The final part of this exercise was to practice using the RANDARRAY function to add some dummy
data into Columns B, and C. So let's click in cell B5 and type in RANDARRAY. Now the first argument
here is how many rows of numbers do we want?

Well, I want the number of rows to be equal to the number of sales agents. So I'm going to use the
COUNTA function to work out how many rows I have. How many columns of numbers do I want?
Well, I want to fill revenue and profit, which is 2 columns. I want the minimum value to be 100, the
maximum value to be 1000, and I want to show these as integers as opposed to decimals. So, we need a
TRUE argument on the end. Let's close the bracket, hit Enter, and like magic, I get my dummy data.

The final part of this exercise was just to throw away the underlying RANDARRAY formula so that
these are just values. So, let's select them all, Ctrl + C to copy. Let's go to the Home tab and we can just
Paste Special, Paste Values, and that is it. So, quite a long exercise for this section. I hope you got on
okay with that and I will see you in the next exercise.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Section 03 – Two-Way-Lookups
Video: Two-Way-Lookups

Deb: In this section of the course, we're going to take a look at some more Advanced Lookup and
Reference Functions. And we're going to start out in this lesson by taking a look at how we can perform
Two-way Lookups. And I'm going to show you two different methods.

We're going to use INDEX and MATCH first of all, and then I'm going to show you how you could do
the same thing but using the new XLOOKUP function. Now, what exactly do we mean by a Two-way
Lookup?

Well, effectively, what we want to do is we want to look up information using two pieces of criteria as
opposed to one. Now if we take a look at the table that we have on the worksheet, this basically just lists
out a few different travel companies. We then have the months; January to December listed across the
top.

And then in the middle here, the main bulk of our data is some sales figures that each of these
companies have generated by month. And what I'm aiming to do is I want to be able to select a month
and a company and have it return the sales figure.

So, we're doing a Two-way Lookup, because we need to use two Lookup values, we need to look up the
month, and then we need to look up the company to get our result. Now before we get into constructing
the formulas, there's some prep work that we need to do here. And all of this prep work is really just to
make your life a lot simpler and easier.

Now the first thing I'm going to do is put my data into a good old Excel table, Ctrl + T, ‘Yes, my table
has headers’, let's click on Ok. And immediately, I'm going to change that to no particular format. Let's
give this table a name. So let's go this Travel_Data. Now one thing I don't really need here are these
Filter Buttons in the column headings. So if we go up to Table Design, we can simply deselect Filter
Button to get rid of those.

Now the next thing I want to do is I want to create two Data Validation drop down lists, so I can simply
select the month and the company. I don't really want to spend time typing each one in to get my result.
Now what I found in the past is that if I create a Data Validation drop down list, and I use this range
running horizontally across the page, it doesn't tend to work.

So, what I'm going to do is I'm just going to output January to December, and I'm going to flip them
around, so we have them in a vertical list. And then I'm going to use that list for my Data Validation.
Now a quick way of just flipping around data is to use the TRANSPOSE Function. Now this is
something you may have used in Paste Special previously, but there is also a function to do the same
thing. And all we need to do is select our range, press Enter, and it's going to give us a vertical output.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Now I want to throw away the underlined formulas. So Ctrl + C, and then we're going to Paste Special,
and Paste Values. So now that I have this list, I'm going to create a Data Validation drop down. So up to
Data into Data Validation, we want to create a List, and our source is going to be this over here. And
click on Ok. So now, I have all of those values listed in a drop down. We're going to do the same for the
companies.

Now I have these in a vertical list already. So, this is straightforward Data Validation. We're going to
create a List, and our source is just going to be these values here and click on Ok. Now the final step of
preparing this data that I'm going to do is I'm going to create some named ranges to make our formula a
lot simpler to understand.

So, I'm going to create a named range for the company's range, for the months’, and also for the data. So
let's start out with the months. So I'm going to select all of those cells. And then in the Name box, we're
just going to call this Months. Let's select the companies, we're going to call this Companies. And then
let's select data set, and we're just going to call this Data.

So, now let's go in and let's build our first Two-way Lookup. And the first method I'm going to use is
INDEX and MATCH. So, let's type in =INDEX. The first thing we need to choose is our array. Now
remember the array is where we're going to find our answer. So, our answer is going to be somewhere
within these numbers. Now instead of selecting the cell range, because I've named my ranges, I can
simply press the F3 key and that's going to show me all of the ranges that I have in my workbook.

So, I can choose the data range. We need to automate the finding of the row number using MATCH.
What is our Lookup value? Well, we have two different Lookup values. We need to look up the month,
but we also need to look up the company. So let's deal with the month first of all. My Lookup value is
going to be B13. Where am I going to look that up? Well, I want to look it up in this month range at the
top.

Now again, because we named that range, we can simply press the F3 key and select the months’ range,
comma, we want to do an Exact Match of that month name in that range. So, we want a 0 on the end
there. Let's close off our first MATCH. Now, because this is a Two-way Lookup, we need to go straight
into another MATCH. And this time, we're going to look up the company. So our Lookup value is a 14.
Where are we looking at up?

Well, we press F3, we're looking it up in the company's range. And we're doing an Exact Match. Let's
close off our MATCH, close off our INDEX. And then when we hit Enter, we should find we get the
correct result. So, let's double check. We're looking at May, Sun and Sales, which is this value just here.
And I can see that yes, that is the same. Let's select something else. Let's go for January and go explore.
There we go, that's exactly right. So, a few steps there to achieve a really nice Two-way Lookup.

Now that is the method using INDEX and MATCH. But of course, we can do exactly the same thing
using the new XLOOKUP function. So let me show you how this works. Let's delete it out. We're going
to type in =XLOOKUP. So, what is our Lookup value? Again, we have two different Lookup values.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Let's deal with the months first of all, we're looking up January. Where are we looking it up? Well, we
can press that F3 key, we want to look it up in the months, comma, the next argument is the return array.

Now when we're using XLOOKUP, we specify the return array last, so we want to go straight into our
next XLOOKUP. Our Lookup value is the company. And we're looking that up in the company's range;
F3, companies, comma. Now we can specify what our return array is. So, our return array is going to be
those numbers. F3, let's select the data, and I could carry on going. So, if I want to specify a value, if it's
not found in MATCH mode or SEARCH mode, I can definitely do that. So, let's do that.

I'm going to add in Not Found if it can't find what I'm looking for. The MATCH mode is going to be
Exact, and we're going to search first to last. Let's close off both of our XLOOKUPs, and hit Enter. And
now, take a look at what we get. That looks good so far. If we switch to April and let's say Footsteps, I'm
getting the correct value.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Using the CHOOSE Function


.
Deb: The CHOOSE Function in Excel returns a value from a list using its given position or index. And
CHOOSE can be useful in many different scenarios. And, its power increases when it's combined with
other functions. So let's take a look at CHOOSE in its most basic form first of all.

So, what I could do here, if I just click in a random cell somewhere on the worksheet, if we type in
=CHOOSE, notice we have three arguments just here. Now there are actually more than three arguments
again, because we have those three dots at the end. Now the first argument is the index number. Now
I'm going to type in a 2 here, this won't make too much sense to you at the moment, but just bear with
me because it will all become clear. Comma, value number 1.

Now I'm going to enter in three values, we're just going to use colors. So let's go for red as our value 1,
we're going to say Blue is our value 2, and green is our value 3. Now, if I press Enter, what result do you
think I'm going to get here? It's going to return a Blue. And that's because it's using this index number
here, the number 2 to pick the second item that I have listed out. If I was to change this index number to
1, I'm going to get red. And as you would expect, if I change this to 3, I'm going to get green.

I could even do this using cell references instead. So if I have red, Blue, and green listed out in cells, I
could say =CHOOSE, index number, let's say 3 this time. And instead of typing the values out, I can use
the cell references. So we have value 1, I'm going to lock that cell reference, value 2, and finally value 3.
Close the bracket, hit Enter, and because we're selecting the third item, it's returning the word green. So,
CHOOSE can help you choose a value based on an index or a position number.

Now, that's all well and good. But how can this be useful? Well, let's take a look at a couple of
examples. Now if we take a look at this first table, we just have some employee names, and we have a
code next to them. And we need to complete the department for each of these employees. Then over on
the right-hand side, we have the code and then we have the department that that code relates to.

So effectively, what I want to do is I want it to look at the code, I want it to match it over here and return
the corresponding department. Now we could use a VLOOKUP to do this. So let's do that first of all,
and then I'll show you why there is an advantage to using CHOOSE instead. So I could do =VLOOKUP.
The Lookup value is going to be the code.

The table array is this over here, F4:G7, and we need to make sure that we lock that. The column index
number, so what do we want to return? We want to return the department, which is column number 2.
And we're going to do an Exact Match, which is a false argument. Hit Enter, and then I can copy that
formula down. And that's going to give me the correct result. Everything corresponds to this little table.
However, what happens to this formula if I was to delete this table over here?

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Well, if I delete it out, I suddenly get #N/A because this VLOOKUP doesn't have anything to refer to.
So, this is where CHOOSE has an advantage, because we're actually specifying all of our arguments
within one function when we're not referring to an external table or external data. So, let's undo. And
we're going to do this again. But this time, we're going to use CHOOSE.

So, let's type in =CHOOSE, our index number is going to be the code. And then we can specify our
values. So I could type directly into here, Sales. Then we have HR, then Marketing, and then finally we
have Finance. Let's close the bracket, hit Enter, and then when I copy this down, it’s given me exactly
the same results as the VLOOKUP. But if I was to delete this data over here, it's not going to affect the
CHOOSE formula, because we're referring to the different departments directly within the formula.

Now of course, if we were to use cell references in the CHOOSE formula for Sales, HR, Marketing, and
Finance instead of actually typing out the words, we're going to have the same situation as we do with
the VLOOKUP. Because the formula would be referring to cells over here, if we were to delete this
data, then that's going to give us some errors in our formulas. But we can use CHOOSE in a similar way
to VLOOKUP. And then it doesn't matter if we delete the data or not.

Now another way that you can use CHOOSE, and this is something, again, that I do frequently. And this
is particularly useful if you want to create some data that you can just use for training or practicing
Excel. So, what I'm gonna do, is I'm going to grab these departments Ctrl + C, let's just paste those, I'm
going to paste them all the way over here, because this formula can get quite long. Now I'm going to add
a few more departments on to the end here. So let's say Projects, Development, and IT.

Now it might be that for this list of employees, I want to assign a random department to them. I can use
a combination of CHOOSE and RANDBETWEEN to do that. So we can type in =, let's go for
CHOOSE. And this time, we're going to go straight into RANDBETWEEN. Now remember, with this
formula, we need to define a bottom and a top number. And RANDBETWEEN will generate random
numbers between those two numbers.

So, my bottom number is going to be 1 and my top number is basically going to be the count of the
number of different departments that I have. Now I only have a short list, I could type in 7, or I can get
Excel to do the hard work for me by using a COUNTA selecting the range. And we need to lock that
range if we're going to copy this formula down.

So, we can close off our COUNTA, close off our RANDBETWEEN, and now we're back into our
CHOOSE formula. So now, I can specify my different values. So my first value is cell J23. Let's lock
that. The next one is HR, then we have Marketing, next is Finance, Projects, Development, and finally,
we have IT. Let's close off our CHOOSE formula.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

If we hit Enter, we can then copy this down. And we're basically getting this list of departments put in a
random order. And the way that this function works is RANDBETWEEN is basically assigning a
number between 1 and 7, randomly to each of these names. And then that number is being used to
reference one of these departments 1 to 7. And of course, if you want to throw away the underlying
formulas, you can Ctrl + C, and Paste Values over the top. So, this is something I use all the time when
I'm generating random datasets for practice purposes.

Now let's look at our final example of using CHOOSE. Now here, I have a list of dates. And what I
basically want to do is I want Excel to look at the date in Column A, and I want it to tell me what quarter
this date falls into. Now there are a couple of different ways that you could do this, we could do this
using the ROUNDUP Function. So if we type in ROUNDUP, we're then going to go straight into the
month function. Let's select the month. And then we want to divide it by 3, which is going to give us the
quarters.

The final thing to specify is the number of digits. Now I don't want any digits on the end. So, let's close
the bracket, hit Enter, and then if I copy this formula down, it's going to tell me that these ones are all
part of quarter one, these ones are quarter two, these are quarter three, so on and so forth. Now another
way that you could do this is by using CHOOSE. So let's type in =CHOOSE, then we want to go straight
into the MONTH Function again. And our serial number is going to be the date.

Now, we can specify our values. So, the way that this works is that the first quarter is made up of three
months. So January, February, March. The second quarter is made up of April, May, June, so on and so
forth throughout the year. So, we're going to assign a value to each of the months. So, January is one, so
is February, so is March. We then have April, May, June, July, August, September, October, November,
and December.

So, we're assigning a value to each of those months. Hit Enter, and we should find that we get exactly
the same thing. Now some people find this CHOOSE formula easier to remember than this ROUNDUP
formula. And I will leave that down to you to determine which one you want to use. But, I just wanted to
showcase there, a few examples of how you can use CHOOSE in real life scenarios.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Using the SWITCH Function

Deb: The SWITCH Function is very similar to the CHOOSE Function, and can be a good replacement
for something like VLOOKUP or XLOOKUP. So in this lesson, we're going to take a look at an
example of how you can use SWITCH.

Now, what we have here in Column D are some movies listed out. In Column E, we have a ratings
column, which is currently blank. And then in Column F, we have the IMDB score for that movie. And
what I effectively want to do here is complete the ratings column using the IMDB score. And if we take
a look over on the left-hand side, we have a little table here that shows the rating and the score that's
attributed to that rating.

Now, of course, this is a scenario that is kind of perfect for some kind of Lookup function like
VLOOKUP or XLOOKUP. And it's worth noting that the SWITCH Function, despite the fact that it is
really a Lookup function, you're not going to find it under the Lookup and Reference group of functions
in the Functions Library. You'll actually find SWITCH underneath Logical.

Now before we get on to working with SWITCH, let's take a look at how we would do this if we were
using XLOOKUP. And then, we can do a good comparison between the two. So we're going to type in
XLOOKUP. Now the Lookup value is going to be the IMDB score, comma, where are we looking this
up? What is our lookup array?

Well, our lookup array is going to be wherever we're going to find this score. So, this is our lookup
array; B3:B7. Now we're going to copy this formula down. So, we don't want those cells moving. So, F4
to lock. What is our return array? Well, we want to return the rating. So, we need to select A3:A7, F4 to
lock, and then we close off our XLOOKUP. Let's hit Enter, let's copy this down, and we get exactly
what we're looking for.

Now, of course, the disadvantage with this again, is if we were to delete this table or delete the values
out, we're going to get #N/A in Column E. So, one advantage that the SWITCH Function and the
CHOOSE Function also have is that we don't necessarily have to have what we're looking up in a table
or a list. Because, we define our values from within the formula. So let's do the same thing. But this
time, we're going to use SWITCH. So, Ctrl + Shift + Down, just delete out everything that we have in
there. And this time, we're going to use SWITCH.

Our first argument is the expression. So this is basically what are you looking up, so I want to look up
the score. Comma, now I get to define the different values. So, the first value I need to define is a score
of 9. If it finds a score of 9, it’s going to return the word, Excellent. If it finds a score of 8, it's going to
return the words, Very Good. 7 is going to be Good, 6 is Okay, and finally, 5 is poor. And close the

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

bracket. So now if I hit Enter, and copy this formula down, it's going to produce exactly the same result
as the XLOOKUP.

The only difference here is that if this data gets deleted out of this table, it has absolutely no effect on the
values in Column E. Because, we're defining our values that we're using, as opposed to referring to them
via cell references in an external table or some kind of list elsewhere on the worksheet. So, that is the
advantage that SWITCH and to a lesser extent, CHOOSE have over XLOOKUP and VLOOKUP.

So, you might find there are certain scenarios where SWITCH is going to be extremely useful to you,
particularly if you don't want big long lists of data or tables of data on your worksheet, you just want the
results.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Exercise 03

Deb: It's time now to do Exercise 03. And in this exercise, we're going to practice some of the skills that
we've learned in this section. So the first thing I'd like you to do in this exercise is practice Two-way
XLOOKUPs.

So, I'd like you to replace the words Month in cell K4, and Team in cell A3, with Data Validation drop
down lists that contain the Months, and also the Teams. I’d then like you in cell L4, to add a Two-way
XLOOKUP formula to look up the month and the team and return the sales total. And then, I'd like you
to test this formula is working by checking that your results are correct by finding them in the table.

Once you've done that, it's time to move on to the next part of this exercise. And in this exercise, we're
going to practice using CHOOSE and RANDBETWEEN. So, I have a list of team members just here.
And what I want to do is assign them to a team based on colors. And I want the color assignment to be
random for each of the team members. So, I'd like you to combine the CHOOSE and the
RANDBETWEEN functions to assign team members randomly to a team based on the colors that we
have listed just here.

And then in the final part of this exercise, I'd like you to practice using the SWITCH Function. So I'd
like you to use the SWITCH Function to search in this table up here for the job ratings for each
employees. But instead of the job rating, I'd like you to return the grade that's attributed to each of the
job ratings. And I'd like you to use the SWITCH Function here as opposed to the probably slightly easier
option of using a Lookup Function. So, quite a few things to do there. If you'd like to see my answer,
then please keep watching.

So, in the first part of this exercise, I asked you to replace the words Month and Team with Data
Validation drop down lists. So let's get rid of the word month and do our first drop down. So into Data
Validation, we're going to choose List, and we need a list of the months. So our source is going to be
A4:A15. That looks perfect. We're going to do exactly the same for team.

Let's go into Data Validation, we want to create a list. But this time as source are the teams just here.
Let's click the drop down. Looking good. Now that we have these two drop downs, I want to create a
Two-way XLOOKUP formula that's going to find the value in this table based on my selections in the
drop down lists. So we're going to type in =XLOOKUP. So our first Lookup value is going to be the
month, comma.

Where are we looking it up? Well, we're looking it up in the month array, comma. Now we need to go
into our second XLOOKUP. This time, we're looking up the team. We're looking this up in the team
array. What do we want to return? Well, our result could be anywhere in our table, so we need to select
all of the values. Let's close off the first XLOOKUP, close off the second, and hit Enter. And now we

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

get our result. Let's just apply a little bit of Accounting Format and take those decimal places down. And
let's check that our result is correct.

So if we take a look at March, Team 4, this is the answer 3254. And that's exactly what we have. If we
change the month to, let's go for January. And we'll say Team 2, let's check that in the table. That should
be our result, which it is. So once you've completed that part of the exercise, let's move on to the Choose
worksheet.

Now for this, I asked you to use the CHOOSE and RANDBETWEEN functions to assign team members
randomly to a team based on color. So in here, what we want to do is we want to type in =CHOOSE.
And then we want to generate some random numbers. So we're going to go straight into
RANDBETWEEN. Now, the random numbers that we want to generate are going to correspond to these
colors in the list. So what is the bottom random number that we want to generate?

Well, it's going to be number 1. What is the top? Well, I have 4 items, so the top number is going to be
4. Now, I'm back into my CHOOSE Function. And I can assign meaning to the random numbers that I'm
generating by assigning them to colors. So whenever we get a number 1 generated, it's going to output
red. And we're going to lock this because we want to copy it down.

Whenever there's number 2, we're going to get the next color. Whenever there's a number 3, we're going
to get green. And whenever there's number 4, we're going to get White. Let's close off CHOOSE, hit
Enter, and now if we double-click to copy this down, we have a bunch of random colors generated for
each team member.

The final part of this exercise was to use the SWITCH Function to search in the table for the job rating
and return the corresponding grade. So, we have the job ratings up here. And we have exactly what
those job ratings mean. So, Excellent, Very Good, Okay, or Poor. And in the table below, I have a list of
employees, the job rating that they've achieved, but I want to return the grade.

Now, of course, we could do this using some kind of Lookup function, but I wanted you to use the
SWITCH Function. So let's type in =SWITCH, our expression. So what are we evaluating here? We're
evaluating the value in cell B12. What is our value?

Well, if the value in cell B12 is 1, then we want it to output the word Excellent. If the value is 2, we
want the word Very Good. If the value is 3, then we want it to say Okay. And if the value is 4, we want
it to say Poor. Close off the bracket, let's hit Enter. That looks good so far. Double-click to copy down
and there we have our results.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Remember, the main advantage of doing it this way over lookups is that I could now freely delete out
this table at the top and it's not going to affect my formula. So, that's the end of this exercise. I hope you
got on Ok with that. I will see you in the next one.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Section 04 – Median and Mode


Video: Median and Mode

Deb: In this lesson, we're going to take a look at how we can use Median and Mode. And both Median
and Mode are Statistical Functions. And if you're looking for them on the Formulas ribbon, you're not
going to see Statistical Functions listed out here, you're going to need to click on More Functions. And
you'll find a group called Statistical, and both of them are in here. If we scroll down to the M section, we
have Median, and we have Mode.

Now one thing to note here is that we have two Mode Functions; MODE.MULT and MODE.SNGL. In
previous versions of Excel, I'm talking pretty old versions of Excel sort of pre 2010, we only had a
Mode Function. And Mode definitely had its limitations, which meant that Microsoft implemented two
new functions; MODE.MULT and MODE.SNGL. And we're going to take a look at both of these, so
you understand the difference.

Now, the first thing we're going to do is we're going to find the average. And we're going to use this
little table over here, which basically registers the steps per day of a particular person. So in general,
they do between 5000 and 6000 steps per day, over roughly a month and a half. So if I want to find what
the average number of steps per day for this person were, and remember, an average is also known as
the mean, we can simply use our AVERAGE Function, we should all be very familiar with this.

We can simply select our data, A3:E12, close off the bracket, and we can see that the average number of
steps per day is 5617. Now the Median is similar to average, but it finds the middle value in the list. And
a lot of the time, you'll find that the median value is different to the average value. Remember, with an
average, Excel will basically add up all the numbers and divide it by the number of values to get the
average, whereas median will effectively sort all the numbers into order and find the middle value.

So, let's take a look at the median for this data set. So, we're going to click in cell H3, type in
=MEDIAN. And we're just going to select our data range, close the bracket, hit Enter, and we have a
completely different number. Now this number is also affected by whether you have an odd number of
values or an even number of values. If you have an odd number of values, then Excel will take the
middle value. Whereas if you have an even number of values, it will take the two middle values and
average them to get the median. So, that's how it calculates this number. Now let's move on to Mode.

Now if we type in =MODE, notice that we have three functions in this list; MODE.MULTI,
MODE.SNGL, and then we have MODE. And what you'll notice about MODE is that we have this little
warning triangle next to it. And that basically means that this is the compatibility version of Mode. So,
this is a formula that's available in older versions of Excel. So, Excel 2010, or previous. Mode has since

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

been replaced in later versions of Excel with the two functions that you can see above. And both of these
do slightly different things.

It is worth noting, though, that if you do use the two new functions in your spreadsheet, and you send
this spreadsheet to somebody using a very old version of Excel, they might not be able to see these
calculations because these two functions won't be available to them in their version. Now, hopefully that
won't be too much of a problem. There aren't that many people these days who are still using Excel 2010
or Excel 2007. But, it's definitely something to be aware of. So let's take a look at MODE.SNGL first of
all.

Now MODE.SNGL works pretty much the same as the old Mode Function. And what MODE.SNGL
will do is it will look through our data, and it will produce a result or it will tell us which one of these
values occurs most frequently. So, I have quite a few values in this data set that repeat. So, I want to find
out which one occurs most often. So, we're just going to select our data set one more time. Let's close
the bracket and hit Enter, and I can see that 5713 occurs the most.

Now I'm just going to check that by applying some Conditional Formatting. And I'm just going to
highlight the cells that match 5713. And I can see that I have four occurrences of this value. Now, there
are other numbers that occur multiple times in this data set. And if I highlight all of the duplicates, you
can see all of the numbers, which occur more than once. And this is pretty much what Mode Multiple
does, it will find the value that occurs the most. So in this case, it's going to be 5713.

We know that this occurs four times, but Mode Multiple will also show us all of the other values that
also occur four times. And this is something that the old Mode Function in earlier versions of Excel
couldn't handle. Hence, why we now have two new formulas. So if we do MODE.MULTI, and select
our cell range, let's close the bracket and hit Enter.

Notice that these results work like a dynamic array, they spill down into the other cells. Now I'm gonna
take the decimal places down all the way on these numbers. And I can now see that these three values
occur four times in my data set. So, you use Mode Multiple if you want to extract multiple results.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Large and Small

Deb: Most of us are used to using Min and Max to find the largest and the smallest values in a range of
data. But we also have a couple of functions called LARGE and SMALL, which will help us find not the
largest and the smallest values, but the second, third, fourth, fifth largest and smallest values in a range
of data. So, let's take a look at how this works.

Now the data that we're using here are just some album sales, we can see the year that the album was
released the artist, the album name, the genre that that album belongs to, and then we have the sales of
that album. So in this first table, I want to find out what the Top 5 sales totals were. So, if I want to find
out the top one, this is fairly straightforward, we can simply use MAX, let's select our sales range, close
our bracket, hit Enter, and I can see that the top selling album sold four and a half million copies. But
what if I want to find the second, third, fourth, and fifth bestselling albums by sales total?

Well, this is where I would use the LARGE Function. Now if we type in =LARGE, notice that we have
two arguments array, and then we have k. Now array is basically going to be what we want to return,
which is going to be one of these sales values. And k is where we specify whether we want to return the
second largest, the third largest, the fourth, so on and so forth. So if I want to return the second largest
value, I can simply type a 2 in there.

Now if I close my bracket and hit Enter, it's going to tell me that the second bestselling albums sold
3,300,000 copies. And actually looking at this, these shouldn't really be monetary values. This is the
number of copies. So, let's change that to Number and take those decimal places down. And we'll also
modify our formatting just here as well, we need to take that to Number and take those down, and let's
add a comma separator, perfect.

Now, if I want to copy this formula down like that, it's not really going to work. Because for each
formula, it's attempting to pull back the second largest. And also because we didn't lock the table range,
those cell references are moving down each time. So, these three values that it's returning is not correct.
So, this is where using a cell reference for that k value can really help.

So, if we do LARGE again, and let's select our array, and I'm going to lock it this time by pressing F4.
And for our value, because we want to return the third largest, I'm going to use the cell reference that
contains 3. Let's close the bracket and hit Enter. And now, I should be able to drag this value down, and
I'm going to get the correct results.

Similarly, we can use the SMALL function to tell us what the second lowest, third lowest, fourth lowest
values are. Now if I want to find the lowest, I could use MIN. So, we're going to select our range, close
the bracket, hit Enter, and there we get our min. Now once again, I'm just going to change these to
Numbers. Now if I want to find the second lowest, I can use SMALL, we can select our array, this is

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

exactly the same as using LARGE, press F4 to lock. And then I'm going to use the cell reference G5 as
that k value. Close the bracket, hit Enter, and now, I can copy these down. So, really nice and
straightforward.

Now what if I want to move this on a little bit and maybe find the highest sales in the Pop genre. Now if
I want to find the absolute highest, I could use the MAXIFS Function for this. So, let's type in MAXIFS.
My max range, well, I want to return the sales again. So, E4:E32, and we're going to press F4 to lock
that. And now we need to specify our criteria and our criteria range.

Well, we only want to look for sales for albums in the Pop genre. So, our criteria range is going to be the
genre. And we need to lock that. And our criteria is going to be Pop. Now I don't have that written out in
a cell. So I'm just going to type it in quote marks into the formula. Let's hit Enter. And that is the result
that I'm getting. So let's apply the same formatting. And if I take a quick look, 4500, well, I can see that
sitting just there. And yes, that is in the Pop genre.

Now if I want to find out the second largest, third largest, fourth, and fifth in the Pop genre, I could use
LARGE in a slightly different way. So we're going to do a LARGE, but we're going to combine it with
an IF. So, my logical test is if the genre, F4 to lock is equal to Pop. If that's true, we want to return the
sales values. And we want to return the second largest. So, I'm gonna use a cell reference just here. And
I also have to remember to lock this one, F4. And let's close off our large formula. Let's hit Enter, we
can copy this down, and then apply our formatting.

Let's do that again. But this time for the lowest sales in the Hip hop genre. So once again, we can use
MINIFS to find the very lowest value. So, our min range is what we want to return. So, that's going to be
the sales, we need to do F4 to lock. Our criteria and our criteria range, well, our criteria range is going to
be genre F4 to lock. And this time, we're looking for Hip hop. So, we want to put that in quote marks.
Close the bracket, hit Enter, and there we go.

And if we want to find out the second lowest we can use SMALL and combine it with IF. Our logical
test is if the genre, F4 to lock is equal to Hip hop, then we want to return if that's true, the sales, F4 to
lock. But we want to return the second largest. Close off our SMALL Function, hit Enter, and then we
can safely drag this down.

Last thing to do is just to apply some formatting. So, let's add a comma separator, and take those
decimal places all the way down. So, that is how you can use LARGE and SMALL and also a little bit
of a look at MAXIFS and MINIFS as well if you weren't familiar with those two useful functions.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Ranking Data Rank RANK.EQ and RANK.AVG

Deb: In this lesson, we're going to talk about ranking data within a list. And the example that we're
going to use is a list of movies in Column A. And then in Column B, we have the number of five star
reviews that those movies have received. And what we want to do in Column C is rank those movies
according to the number of five star reviews.

So effectively, I want to see which movies have the highest number of five star reviews all the way
down to the bottom. Now, there are a couple of ways that I could do this. And the most obvious one
would be to simply sort this column, Column B, and have the highest value at the top going all the way
down to the lowest. But the issue that you have when it comes to sorting is that it's going to sort the
movie titles as well. And I want to keep these in the order that they're currently in.

So instead, what I could do is I could have another column, Column C, where I just list out the rank of
each movie, which position in the list it falls into, according to the number of five star reviews. So for
this, we're going to use the RANK Function in Excel. Now the first thing you'll notice here, when you
type in RANK is that you get a number of different options come up in Excel’s IntelliSense menu, and
we're only really interested in the top three.

Now notice, RANK, which is the third one in this list. This function is the one that we use to use in older
versions of Excel. And it's still there as a legacy feature for anybody who's still using a very old version
of Excel. The functionality of the RANK Function has since been replaced with the function above
RANK.EQ. So, this is the one that we're going to use for this first example. Let's press the Tab key to
select it.

Now the RANK Function has three arguments; number, reference, and then we have a third optional
argument order. And this is a really straightforward formula to use. The first thing we need to provide is
the number that we want to rank. So, that is going to be cell B4. The reference is what we want to rank it
against.

So, I want to rank this value in cell B4 against the other values in Column B. And because I don't have
any other data other than the data that I'm currently using in Column B, I could select the entire column
simply by clicking at the top of the column heading. If I did have additional data further down here, it
would work out better for me to highlight the exact cell reference. But for this example, we can use the
column. Let's close the bracket, hit Enter, and now I can double-click to fill that formula down.

So, I can see that the movie 12 Angry Men is ranked 12 by the number of five star movie reviews. And
if we scroll down and look through this list, I can see here if I'm looking for the number one reviewed
movie, I can see that it's The Departed. Now when we typed in this formula, there was an additional
optional argument on the end, which is order.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Now if I press the comma here, notice that we can choose if we want to rank these in descending or
ascending order. And the default here is descending. But if I change this to a 1 on the end, and press
Return, and then double-click to copy that down, 12 Angry Men, if we're working from the bottom of
the list is in the 39th position. And effectively, the movie that's ranked one will be the one with the
fewest five star reviews. And that one would be Seven Samurai.

Now I'm going to just edit this formula. And I don't want to sort them in ascending order. Let's put that
back to descending and double-click to copy that formula down. Now if I was to sort these five star
reviews, this is going to make them a little bit easier to see. So let's go to Data, and let's sort these largest
to smallest. Now what would happen if I had two movies that achieved exactly the same number of five
star reviews? So let's cheat a little bit here and change the one underneath the Green Mile to the same
value. So, 9714.

Take a look at what happens to the rank, it's going to assign it the same number. Also notice that now it's
skipped over number five. Also notice that we don't have a movie ranked in the fifth position, because
we have two movies occupying the fourth position. So just something to be aware of when you're
working with RANK.EQ. Let's take a look at another example.

This time I'm going to show you RANK.AVG which is the other function that we have in that drop
down list. Now what I have here are some dates. And we have some calls logged. So maybe this is some
information from a call center. And we're just reviewing how many calls they logged on any particular
day. So what I can do here, let's do a rank first of all, I'm going to do RANK.EQ. Again, let's just select
that one.

My number is going to be the number of calls logged. And my reference file, I want to compare it to the
rest of the values in Column B. I'm happy with the default of descending order, so I don't need that final
argument. Let's hit Enter, and then I can double-click to copy that down. And this is going to show me
the days that achieved the highest number of calls. And once again, I could sort this list to make it a bit
easier. But I can see that this is in the number one position. So on 1/4/2022, we received the highest
amount of calls of 197. Now what about RANK.AVG? What does that one do?

So let's type in =, we're going to go for RANK again, and the top option there is RANK.AVG. Now this
has exactly the same arguments. So, let's do the same thing; we're going to rank cell B4 against
everything else in Column B, and we're going to sort it in descending order. So, we'll just accept the
default. I'm going to do Ctrl + Enter to stay in the same cell, and then I can double-click to copy that
down. Now, I'm going to sort these calls in descending order to make this a bit easier to see.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

So, let's sort largest to smallest. And you'll find that the RANK.AVG is the same for many of these. So
you can see here for 3, 4, 5, 6, 7, 8, 9, and 10, so on and so forth, it's pretty much the same. But take a
look at these first two; the RANK.AVG is 1.5, whereas the rank is one. So what's occurring here?

Well, effectively, the way that Excel works out the RANK.AVG is it says this value is in position 1, and
this value is in position 2. So, if you add 1 and 2 together, you get 3. And what would be the average of
3 over these two items? Well, it would be 1.5. So, that is where it gets its average from.

The same thing down here. This value is in position 16, this value is in position 17. So, if you add 16
and 17 together, you get 33. What's 33 divided by 2? Well it is 16.5. So, that is the difference between
RANK and also RANK.AVG.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: The COUNTBANK Function

Deb: COUNTBLANK is one of those formulas that pretty much does exactly what it says on the tin. It
counts all blank cells in a selected range. And sometimes, this can be really useful in many different
scenarios. So, let's take a look at how COUNTBLANK works.

Now in this first example, we have a table on the left-hand side that just has some order IDs, some
customer names, and then we have email addresses for some of our customers. Now, it appears that
some of the customers haven't left their email address when they've placed an order.

So, I've been tasked by my manager to go through all of our customers and tell him how many haven't
left an email address. And this is really going to determine if we're going to spend any money on
developing our order system, and making email addresses mandatory prior to placing an order.

So, I can use the COUNTBLANK function for this. And it works exactly as you would expect, we're
going to type in =, and it's this one, just here, COUNTBLANK. And we have one argument for this. And
that is the range of cells. So all I need to do here is select this range C4:C23, and it's going to tell me that
out of 20 customers, 7 of them have not left their email address.

Now currently, this data that I'm reviewing isn't in a table. So, as I add more customers to the bottom of
this list, my COUNTBLANK formula isn't going to update. So again, this is another reason why using
tables is so important. Let's press Ctrl + T, click on Ok, and I'm going to leave the Table Style as it is,
let's give add table a name, we're going to call this Orders, and now I'm going to update my
COUNTBLANK formula.

So, let's replace the cell reference with the table name this time, and hit Enter. So now, if we add a new
customer onto the bottom, so let's say the order number is 1020, and I'm just going to use my name, why
not? Notice that my formula has updated. So now, we have 8 people in the list who don't have an email
address.

Now if I was to add my email address in here, and I will say that this isn't my actual email address. But,
let's add one in and hit Enter, that COUNTBLANK formula goes back down to 7 because it's no longer a
blank cell. So, make sure that you put your data in a table and then your COUNTBLANK formula will
constantly update.

Now another quick tip here, notice as I've entered in my email address, it's automatically turned it into a
hyperlink. Now the other email addresses in here are not hyperlinks. So, if you just want to remove that
hyperlink and just have it as plain text, just right-click on the cell and choose Remove Hyperlink. Let's
take a look at another example of using COUNTBLANK.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Now what I have in the table on the right-hand side are a list of employees. And I have days of the week
across the top, and then I have a Y which tells me on which days these employees are scheduled to
work. And the first thing I want to do here is I want to just do a count of how many days each employee
is working.

So, this is just a straightforward COUNTA. I'm going to select this row, close the bracket, and hit Enter,
and then I can copy that formula down. And that just lets me know how many days each of my
employees is scheduled to work.

Now what about if my manager comes to me and he's looking at rearranging the scheduling around a
little bit, because we need more cover on certain busier days? What would be really useful to know is
how many employees are off on Mondays, how many are off on Tuesdays, Wednesdays, so on and so
forth. And this is where the COUNTBLANK function can come in really handy in a practical example.

So, let's go for COUNTBLANK. Our range, we just want to select Monday, close the bracket, hit Enter,
and then I can drag this formula across, and I can see how many employees we have off each day. So on
Saturday, we have the most amount of employees off, but Friday and Saturday are our busiest evenings.

So, this is really going to help my manager when it comes to analyzing how he wants to reorder the
scheduling of staff. So, COUNTBLANK can be used in many different situations and is a really useful
formula to have in your Excel toolkit.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Exercise 04

Deb: It's time now to do Exercise 04. And in this exercise, we're going to practice some of the skills that
we've learned in this section.

So in the first part of this exercise, I'd like you to practice using AVERAGE, MEDIAN, and MODE.
And I'd like you to find the AVERAGE, MEDIAN, and MODE for the numbers in the table. And I want
you to ensure that when you're calculating the MODE, you return all values that occur more than once.
In the second part of this exercise, I'd like you to practice using the LARGE and SMALL Functions.

So first, I'd like you to find the top three largest values in the table. And then I'd like you to return the
corresponding product. So, think about the formula you might need to use in order to do that. I'd then
like you to find the top three smallest values in the table, and then return the corresponding product. And
when you're doing this, I'd like you to ensure that you use cell references instead of hard-coded values
wherever possible, and also ensure that you apply the correct Absolute Referencing.

And in the final part of this exercise, I'd like you to practice using the RANK Function. So, I'd like you
to rank the scores of each student in descending order. And then finally, I'd like you to sort the table by
rank so the highest scoring students are at the top. So, give that a go. If you'd like to see my answer, then
please keep watching.

So the first thing I asked you to do here was find the AVERAGE, MEDIAN, and MODE for the
numbers in the table. So this is pretty straightforward. We're gonna go into an AVERAGE calculation,
we need to select all of the numbers in the table, and that's going to give us the AVERAGE.

Next, we need to find the MEDIAN. So again, this is a straightforward calculation. We're going to select
all of the numbers again, and hit Enter. And that is our MEDIAN value. Again, note that the MEDIAN
value is different to the AVERAGE.

Finally, I asked you to find the MODE of the numbers in the table. And I added a little note here to
ensure that when calculating the MODE, make sure you return all values that occur more than once. So
the reason why I specified that is because when we go into MODE, we have two options here;
MODE.MULT or MODE.SNGL.

So, if we want to return all values that occur more than once, we need to use MODE.MULTI. Let's
select our values, once again, close the bracket, hit Enter, and I can see that those values occur more
than once in the table. Let's move on to the next worksheet.

So, the first thing I wanted you to do here was to find the top three largest values in the table and then
return the corresponding product. Now when it comes to finding the largest, I could use the LARGE

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Function, or I could still use MAX here. So, if you used either of those, that's absolutely fine. I'm gonna
go with LARGE, let's select it. I'm looking for the largest value, so this is our array. And I want to find
the largest. So, that is my second argument.

Now I also mentioned in the notes that we need to use cell references wherever possible. So instead of
typing in here, one to return the largest, I'm going to use the cell reference that contains the number one.
Let's close the bracket, and hit Enter. Now, because I want to copy this formula down, I need to make
sure that I'm locking the sales array in the table. So let's make sure that we F4 just there, hit Enter, and
then I can copy this down.

Now in order to find the product, I can do a simple INDEX and MATCH. So let's type in =INDEX.
What do we want to return? Well, we want to return the product name this time. So that's our array.
Again, we need to lock that because we want to drag this formula down. We now need to find the row
numbers. Let's go straight into a MATCH. We're going to use the sales value as the lookup value
comma. Where are we looking that up?

Well, we're looking it up in the sales array, F4 to lock. And we want to do an Exact Match. Close off
MATCH, close off INDEX, Ctrl + Enter, and now we can drag this down. Let's do exactly the same to
find the top three smallest values in the table. So, this is a very similar process. We're just using the
SMALL Function instead.

So, we're looking for the smallest sales value in this array, F4 to lock. And we want to find the smallest
I'm going to use a cell reference, close the bracket, Ctrl + Enter, and then we can copy down. Now once
again to find the product I could use an INDEX and MATCH, I could even use an XLOOKUP here if I
wanted to. So, let's just switch it up and go for that instead.

So let's say XLOOKUP, our Lookup value is F11. We're looking it up in this array just here, we need to
lock that, F4. And our return array is going to be the product, F4 to lock. Close the bracket, Ctrl + Enter,
and now we can copy that down. Let's move on to the final part of this exercise, which was using the
RANK Function.

So, I wanted you to use RANK to rank the scores of each student in descending order. So, let's do this
part first of all. I'm going to click in Column D, and we're going to use our RANK Function. Now
remember, we have a few to choose from here, we want to choose RANK.EQ. Now the numbers that we
want to rank are in this array, just here. And again, I want to copy this down. So, we're going to do F4.

What's our reference? What am I ranking them against? Well, I'm ranking them against each other. So,
my second part is going to be this cell reference. Again, F4 to lock. I can specify if I want to rank them
in descending or ascending order, and I asked you to rank them in descending order, so we want a 0 on

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

the end here. Let's close the bracket, Ctrl + Enter, and take a look at that, I now have a rank assigned to
all of those scores.

Now in the final part of this exercise, I asked you to sort the table by rank so the highest scoring students
are at the top. Now if you try to click in RANK, and then use your SORT commands, so sort in
ascending, you'll find that you get this message just here.

Now the way that we can overcome that is simply to throw away the underlying formula. So let's select
Ctrl + C to copy, and then we can simply paste the values. Now we can go to the Data tab, we can Sort
A to Z, and we can see our top ranked student at the top.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Section 05 – Rounding Values


Video: Rounding Values

Deb: In this lesson, we're going to talk about Rounding Values. And specifically a three functions
ROUND, ROUNDUP, and ROUNDDOWN. And these three functions are excellent functions to know,
but are particularly important if you work in the financial sector, where being extremely accurate with
money is the highest priority. So, let's take a quick look at how Rounding works.

Now in this first table, I just have some Order IDs, I have a Price, and then I have the Price + Tax. And
you can see over here we have a Sales Tax rate of 2.5%. Now the Price + Tax, I've already added in the
calculation for this. And this is a very straightforward calculation that most of us probably know how to
do by this stage. We're doing B4 which is the Price, multiplied by the Sales Tax 2.50. And then we're
adding on the Price again. Because, if we don't add on that price, if I was just to remove this is just going
to give us the amount to increase by.

So, we do need to make sure that we are in addition, adding on the Price again to the Sales Tax amount
to get the total. So for this first order, Order 1000, the Price is 488, the Price + Tax is $5. Now what
about if this customer just here decided that they wanted to order a thousand items? What is the Price
going to be?

Well, this is a fairly straightforward calculation that most of us can do in our mind, because it's simply
going to be the Price multiplied by 1000; 5 multiplied by 1000, is 5000. So effectively, when we do this
calculation, we should get a result of 5000. Let's see what happens. We're going to type in =, let's do C4
multiplied by the volume, and hit Enter. Take a look at that, I don't get 5000, I get 5002.

Now why am I getting 5002 and not 5000? Well, this is because of this number just here. Notice that I'm
displaying two decimal places. Now the mistake that a lot of people make when they're looking at
numbers is that they think that this is the actual real value of the number. But because we've minimized
this down to two decimal places, if I was to increase these decimals, and reveal a few more of those
numbers underneath, you're going to start to see why we're getting a result of 5002.

As I increase the decimals, and I've just increased them by one, the actual number is 5002. Which is why
when we multiply it by 1000, we're getting a result of 5002. Because, increasing and decreasing these
decimal places doesn't actually change the underlying value, you're just changing the way that the
number is displayed.

Now, how can we get this to be accurate? Because we do want this to say 5000. Well, this is where we
can use Rounding. So we're going to use the ROUND Function to make sure that we're rounding to an
even number of pennies. So, let's click on this cell, we're going to jump up to the Formula Bar, and we're

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

going to use the ROUND Function. Now notice in the drop down this there, we have a few different
options, we're going to choose the first one, the first argument here is the number.

Now the number is going to be generated by the formula that we already have in this cell. So we just
click at the end and press comma. The only other argument we have here is the number of digits. So how
many decimal places are we rounding to? So, I want to round to the penny. So I'm going to round to two
digits.

If I wanted to round to the dollar, I would have a zero in here. So let's go for 2, let's close the bracket and
hit Enter. And would you take a look at that? Now, our answer has changed to 5000. And if I start to
copy this formula down, some of these will change, some of them may not. And I can then double-click
to copy this formula down.

Now it might be that you want to override the standard rounding rules and round up or round down to a
specific number of decimal places. Well, as you might have guessed, we have two functions that can
help us with that and they are called ROUNDUP and ROUNDDOWN. So, let's edit our formula.

And this time we're going to use ROUNDUP. I'm going to keep it rounding up to two decimal places.
And if we hit Enter, notice that now it's rounded it up to the next penny. If I wanted to round it up to the
next dollar, I would put a zero in here, and it's going to round it up to 6. Now, I don't want that, I want to
round it to the penny. So, let's put that back to 2. And once again, I can double-click to copy that
formula down. And you may have noticed that some of these numbers also changed.

And of course, we can do the opposite of this, we can use the ROUNDDOWN formula. Instead, I'm
going to keep it on two decimal places, let's hit Enter, it's rounded down to 5. If I, double-click, again,
some of these are changing and rounding down to the nearest penny. So just be aware of that when
you're working with Rounding, make sure you understand the different options that you have. And
whether you're rounding to the nearest penny, the nearest dollar, so on and so forth.

Now before we leave this lesson, there's just one final thing that I want to show you. Now in Column A,
we have some salaries, and all of the people who have the salaries have got a bonus of 2.15%. And we
have their new salary, including that bonus in Column B. But do you notice one difference between
Column B and Column A?

In Column B, all of these salaries are nice and neat. They're rounded nicely to the dollar, whereas the
original salaries aren't. Now the way that you can do that, and I've already written this formula out in
this column is I'm using ROUNDUP, we're doing a calculation. So we're doing A29, which is the salary,
we're multiplying it by the percentage of bonus, and then we're adding the salary again. But take a look
at this last argument. We're doing a -2 for the number of digits.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

And this method will basically round to the nearest $100. If I was to replace this with a -1, it's going to
round to the nearest $10. So, let's change that and copy it down, and you'll see that all of these will
change. So again, just be aware that you can use minus figures as well as this last argument for the
number of digits.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Specialized Rounding

Deb: In this lesson, we're going to explore some Specialized Rounding functions. And these are all in
the rounding wheelhouse, but they do slightly different things. So, the functions that we're going to be
looking at in this lesson are MROUND, CEILING, and FLOOR. So, let's take a look at the data that
we're going to be using.

So in Column A, we have some Order IDs. In Column B, we have Price. And then in column C, we have
the Price + Tax. So pretty much the same as the last example we were looking at. And there is the Sales
Tax that we're using to perform this calculation. And we already have Rounding applied to this to two
decimal places.

Now, what if I want to do something slightly different? Maybe I want all prices to be multiples of 5
cents, or 10 cents, or 20 cents, or maybe 50 cents? Well, if we want to do that, then we can use the
MROUND Function, which is going to allow us to round to a variety of different multiples. So instead
of ROUND, let's choose MROUND. And I can simply add an M onto the front here.

Now, MROUND has two arguments; number and multiple. And once again, the number is going to be
generated by the formula that we currently have. Now I want to get rid of the multiple on the end there,
because we want to specify what multiple we want to round by. So maybe I want to round to the nearest
50 cents. So I'm going to put in here .50 and let's double-click to copy this down. And this now looks a
lot neater because we've rounded to the nearest 50 cents.

If I wanted to round to the nearest 20 cents, I could change that to 0.2, and hit Enter. And then when we
copy this down, you're going to see those figures change. 0.1 for the nearest 10 cents. Once again, we
can double-click to copy down, and note our changed values. So, MROUND is a really flexible function
which just allow you to round to different multiples.

Now what are CEILING and FLOOR? Well, these work along the same lines, but CEILING means
we're rounding up, whereas FLOOR means we're rounding down. So CEILING works like MROUND
where we can specify our own multiple, but it's going to round up. And FLOOR lets us specify our own
multiple, but it's going to round down.

So, if I was to change MROUND to CEILING, notice that the CEILING function is one of those legacy
functions. So, it's since been replaced with the CEILING.MATH function. So let's select that. We have
three arguments; number, significance, and mode. Now the number once again is going to be generated
by the formula that we already have, let's delete out our previous multiple. The significance argument is
basically the multiple, it's just been named something slightly different in this function.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

So if I want to round up to the next 50 cents, I would do exactly the same thing, put .50 in here. And
then there is a third argument, which is also optional, and that is mode. A mode is really there to deal
with negative values that you have in your data. And you can specify if you want to round towards or
away from zero.

Now we don't have any negative values, so we don't need that argument. Let's press Enter. And you can
see what happens, it's now rounded up to the nearest 50 cents. And I'm sure you can guess what FLOOR
does. Pretty much the same thing but the opposite way around. Let's replace CEILING.MATH with
FLOOR.

Again, we have the same situation here; FLOOR is an old function that has since been replaced with
FLOOR.MATH, the same arguments here. So this time, let's round down to the nearest 10 cents. Press
Enter, and let's double-click to copy that down. And there we go. So, three additional Rounding
functions there which are really handy to know particularly if you work in the financial industry.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Using the AGGREGATE Function

Deb: The AGGREGATE Function is a great little function to know. What it does is it enables us to
calculate aggregates like Sum, Average, Count, Min, and Max, whilst ignoring things like Errors,
Hidden Rows, and Subtotals. And one of its main uses that I find is to perform Sum calculations and
ignore any errors that we have in cells.

Now AGGREGATE, if you're looking for it in the Functions Library, we click on the Formulas tab,
you'll actually find it under the Math and Trig group. And it's this one just here. And if we take a look at
the ScreenTip, it says, ‘It returns an aggregate in a list or database’. So let's take a look at a quick
example of how this works. On the spreadsheet, I just have a very simple list, we have just some Items,
and then we have the Price for those items.

Now notice that I have a couple of cells in this Price column that contain errors, I've got some #DIV in
there. Now, it might be that instead of taking up time trying to work out why I'm getting these #DIV, I
just want to perform a calculation on the rest of the prices. Well, AGGREGATE is going to allow me to
do that because it's going to let me ignore any error values that I have in cells. So, let's type in
=AGGREGATE.

Now the first argument is producing a drop down list. So that we need to select here what kind of
calculation we want to do. Do we want to do an AVERAGE or a COUNT or a MIN or a MAX? Well, I
want to do a SUM. So I can simply type in number 9, or I can select it from the list by pressing the Tab
key, comma to move on to the next argument. This is where I can specify what criteria I want to ignore.
And it's definitely worth taking a look through some of these.

Number 3 in particular is pretty hardcore, because it will ignore hidden rows, error values, nested
subtotals, and also other AGGREGATE Functions. Now in this first example, we're going to start off
with a very basic number 6, we want it to ignore those #DIV that we have in the cells. So once again, I
could just type in number 6, or I can select it from the menu and press the Tab key.

Now notice underneath where we can see our arguments, we have two different ways that we can put
together an aggregate. Now the one that we're currently doing is this bottom one, we've provided the
function number, the options, and now we need to provide the reference. So, this is basically just the
column that we want to aggregate. So, I'm going to select B4 to B14. Let's close off the function and hit
Enter, and it's adding up all of those numbers and ignoring these two.

Now let's take a look at another example. What I'm going to do here is I'm going to apply some filters to
these headings, and I'm going to hide some rows. So, let's say that I'm only interested in Blouses,
Dresses, Hats, and let's go for Trousers, and Sportswear, click on Ok. So now, my data contains both
hidden rows, and also we still have this error value in here. So, I want to use the AGGREGATE

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Function so I can do a COUNT. But, I want it to ignore the hidden rows, and I want it to ignore the
errors as well.

So, let's type in AGGREGATE. This time, we're going to do a COUNT, so that is number two, comma.
Now we want to ignore hidden rows and error values. And that is the option that we have all where the
bottom option number 7, comma. The last thing we need to provide is the cell range, which is B5 to
B14. Let's close the bracket and hit Enter. And I just need to change the formatting on this cell and take
those decimal places down. It’s telling me that we have four items.

And notice that we do once we're ignoring this item just here. So we have Blouse, Hat, Dress, and
Sportswear. So, AGGREGATE is a super useful function if you want to perform some kind of
aggregation, but you want to ignore certain values.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Exercise 05

Deb: It's time now to complete Exercise 05, where we're going to practice some of the skills that we've
learned in this section of the course. So the first thing I'd like you to do is to practice Rounding. So, I'd
like you to calculate the total, including Tax in Column D for each of the invoices. And you can see we
have the Sales Tax amount listed in cell G3. And I'd like you to ensure that when you do this
calculation, you round up to two decimal places.

In the next part of this exercise, I'd like you to practice more Specialized Rounding. So, I'd like you to
calculate the bonus for each employee in Column C. I'd then like you to calculate the new salary for
each employee in Column D. And then I'd like you to use Specialized Rounding to round the new salary
to the nearest $100. So, think about which function allows you to do that.

And then in the final part of this exercise, I'd like to practice using the AGGREGATE Function. So I'd
like you to use the AGGREGATE Function to complete the Total and the Average of all prices,
including tax. And when you perform this calculation, I'd like you to ignore errors and hidden rows. See
how you get along with that. And if you'd like to see my answer, then please keep watching.

So, the first part of this exercise is fairly straightforward. The first thing we need to do here is calculate
the total, including tax in Column D. So we're going to do a Sum here. And we're going to say C4,
multiplied by G3. And we need to lock that cell reference because we want to copy this down. And then
we want to plus the amount.

Now currently, I haven't applied any Rounding to this at all. And that was the second part of this
exercise, I wanted you to ensure that you rounded up these totals to two decimal places. So we need to
make a modification to this formula. And we need to specify that we want to ROUNDUP. The number
is going to be generated by our Sum calculation. So, we can jump straight to the end and just specify
how many digits we want to round up to. So in this case, that is two digits, close the bracket, Ctrl +
Enter, and then we can double-click to copy down. Nice and straightforward.

Let's move on to the second part of this exercise where I asked you to use Specialized Rounding to
calculate the new salary. So, the first thing we need to do here is we need to calculate the bonus for each
employee in Column C. So, we just want the bonus amount, so we can just do B3, multiplied by G2.
Remember, F4 to lock Ctrl + Enter. Let's double-click to copy this down. Now, we need to work out
what the new salary is. So that's going to be a straightforward Sum calculation of adding salary and
bonus together. So let's do that first of all.

We're going to say =SUM, and we just want to do B3 + C3, Ctrl + Enter. And if I copy this down, take a
look at these numbers. They're kind of a bit all over the place, we want these to be nice multiples of 100.
So, what we can do here is use the MROUND Function. So, let's go up to the Formula Bar and edit this

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

first one. We're going to use MROUND, the number will be generated by the Sum calculation, and then
we just need to specify the multiple.

Now I want to round to the nearest $100. So I'm just going to type in 100, close the bracket Ctrl + Enter.
And now when I double-click to copy this down, you can see we get nice rounded numbers to the
nearest $100.

The final part of this exercise was to use the AGGREGATE Function to complete the total and average
for all of the prices inclusive of tax. And I wanted you to ignore errors and hidden rows. So if you take a
look at my data, I have some calculations going on here, but I also have some errors in my data as well.
So I still want to perform a total and an average, but I want to ignore those errors and also any hidden
rows. And, I can see that I've got a hidden row here, row 16 is currently hidden. So, let's do the total first
of all.

We're going to go into AGGREGATE, we now need to choose our function. Now I want to use, SUM,
so I could just type in 9 or use my arrow keys and select it. Now, I can choose what I want to ignore. So
I want to ignore hidden rows and error values. So, the one that closest fits that is the bottom one just
here, comma. We now need to select the array that we want to find the total of. So that is this array just
here. And that is pretty much all we need, close the bracket, hit Enter, and we get our total.

We need to do exactly the same, but this time, we're going to do an AVERAGE. So, let's select
AGGREGATE. We're doing an AVERAGE, let's type in number 1. And we want to do the same thing.
So number 7 to ignore hidden rows and error values. Let's select our array, close the bracket, and hit
Enter. And now I can apply my number formatting. So, I'm going to take the decimal places for this one
down to 2, and let's add a comma separator. I think that looks a lot better.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Section 06 – The LET Function


Video: The LET Function

Deb: The new LET Function is part of the Logical group of functions in Excel. And what LET basically
allows you to do is assign names to calculation results inside a formula. So, if you find yourself writing
the same expression multiple times in a formula, LET basically allows you to name the expression, and
then Excel will calculate the result using the name.

So, not only is this a great time saving function, but it also makes your formulas easier to read and
understand, as you don't have to remember what a specific cell reference or range refers to, because it's
right there in the formula. So, let's start out taking a look at the LET syntax. And also, let's run through a
couple of basic examples.

So, in cell A4, I'm just going to type in =LET. And you can see here the different arguments that we
have for the LET Function. We have name 1, name value 1, calculation or name 2. So, name 1 and name
1 value are where we define the name and the value. And then the last thing we do is the calculation.
And we could have numerous pairs of names and values in our formula. In fact, the LET Function
supports up to 126 pairs.

Now, you might be listening to this thinking, ‘Okay, I kind of understand what you're saying there. But
it doesn't really make sense’. And that is completely understandable because this is one of those
formulas that only makes sense when you see it in action. So, let's take a look at a very basic example.

So, the first thing I'm going to do here is I'm going to assign a name to a variable. And for argument's
sake, and because I'm not very good at thinking up variable names, I'm simply going to call this first one
var, comma. Now, I can assign a value to the word var. So, if I assign the value 20, to this word,
effectively, the word var now represents 20. Now I could carry on going adding other names and values,
or I could perform a calculation using the variable that I've just set up.

So, if I now do a calculation, it might look something like this. I could say var + 5. Now what do you
think the results of that calculation is going to be? We've stated that var = 20, that is our variable, those
are our parameters. And then my calculation is var + 5. So as we would expect, the result is 25. Because
we're just adding 20 to 5. So, that's an example of a simple LET, just using one variable. Let's add
another variable.

So, if var = 20, let's add another variable. I'm gonna say comma. And remember, our next argument is
calculation or name 2. So this time, we're going to add another name and another name value. So let's
say that x is attributed to the value 10. So now what I could do is I could modify my calculation at the
end here. And I could do var / x. What result do you think I'm gonna get?

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Well, I'm gonna get a result of 2, because we're effectively doing 20 / 10. So hopefully, you're getting
the idea here. We set up a name, we attribute a number to that name, and we can set up 126 different
pairs of names and variables in here if we want to. The last thing we do is we perform calculations using
the variables that we've created. So, everything is defined within one formula. Let's define a third
variable.

So, let's double-click to edit the formula. We're going to click after the second variable, and this
variable, we're going to name y. And this is going to be 5. I'm now going to change my calculation to do
(var / x). And I want it to do this part of the formula first. So we're going to put it in brackets, and then I
want it to + y. Let's hit Enter, we get a result of 7. So we're doing (20 / 0), which gives us 2 and then
we're adding 5. Let's take a look at another example of using the LET formula.

So if we scroll down again, we just have a basic table that shows some employee names, and we have at
their salary. And each of these employees is going to get a bonus of 20%. So this is a fairly simple
calculation, we can just simply do a SUM. And we multiply the salary by the bonus, and we need to
make that absolute, and then we add the salary onto the bonus. Let's close the bracket and hit Enter, and
we get our result of 54,000. So how could we use LET to perform this calculation?

Well, let's click in the cell underneath. And I'm going to do this up in the Formula Bar and just show you
a slightly different way to put together your calculations. Now, this Formula Bar isn't a set size. If you
notice, if I hover my mouse over the bottom part of the Formula Bar, we get a double-headed arrow. So
if I click and drag this down, I get a much larger Formula Bar.

And sometimes when you're putting together more complex formulas, it's really helpful to be able to lay
them out in the Formula Bar, and have different parts of the calculation on different lines. It just adds to
the readability of your formulas. So, let's go into LET, open the bracket. Now I'm going to declare my
variables on the next line. So, we need to press Alt + Enter to move our cursor down. So, let's declare
our first variable.

Well, what do I select first, when I'm doing this Sum calculation? I select the salary cell. So I'm just
going to call this first variable salary. And salary is going to reference cell B17. What's the next part of
my Sum calculation? Well we multiply the salary by the bonus. So, the next variable that I'm going to
declare, and let's put it on a new line, Alt + Enter, is going to be the bonus. And the bonus is cell F15.
And we need to press F4 to lock that.

So now we've declared our two variables, we can perform our calculation. So Alt + Enter to move on to
the next line, our calculation is going to be SUM, open bracket, we're doing the salary. And notice as I
start to type it in, it comes up in Excels IntelliSense. So, I can simply press the Tab key to select it. We
want to multiply by the bonus, again, it's come up, so Tab key to select. And then we want to plus the

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

salary again, close the bracket and close off our LET. So, that is our calculation on the last line. Now
take a look at the way that we've structured that, it makes it a lot easier to read.

We have our function name on the first line, we then have our variables declared on lines two and three.
And then at the bottom, we have our calculation. Let's hit Enter and see if this works. And in fact, yes, it
does. So now, all I need to do is double-click, and I can copy that formula down. So hopefully now
you're getting the idea as to how this LET Function works. Let's take a look at one last more complex
formula. So let's move to our final worksheet.

Now this data may look familiar to you, we did use this when we were looking at the FILTER Function.
I have some block names, we have the subject, and we have the pass mark. So, this might be information
for students who took a test. And basically what I want to do is use the FILTER Function to return the
block, the subject, and the pass mark based on the criteria that we have in the middle here.

So currently, if I was using FILTER, I'd only want to see results where the Block = West and the Subject
= English. So, let's first just do this using the FILTER Function, and then we can see how we can
convert that into a LET. So, let's type in =FILTER. Our array, well our array are the results that we want
returned, which is pretty much everything in this table, comma. Now we need to specify what we want
to include.

So, let's open a bracket, I want to include all results where the Block = West. So, we need to select the
block range and that needs to equal what we have in cell E3, F4 to lock, let's close the bracket. We also
want to return results where the Subject is English. And because this is an AND calculation, we want to
return both results, we're going to separate with an Asterix. Open the second bracket, select the subject
range, and that needs to equal what we have in cell E7, F4 to lock. Let's close off our bracket, close off
our FILTER, hit Enter, and would you take a look at that, there are our results.

So we're going to do pretty much the same thing, but we're going to set this up as a LET instead. And
this is where LETs can be particularly useful. Because if you take a look at this FILTER formula, notice
lots of cell references in here. So, we can effectively replace these cell references with more meaningful
names using LET.

And this is particularly useful if you have repeating cell references in your formula, because it means
that you can declare the name for a particular cell reference, and then just replace every time that cell
reference occurs with the name. And not only does it make the formula a lot easier to read, it's a lot more
efficient for Excel to calculate. So, let's jump down to cell G9, and we're going to construct this as a
LET. Now I might need a bit more room here, so let's drag our Formula Bar down. So, we're going to do
this in the same format, we're going to start with our =Let, we're going to open a bracket, and Alt +
Enter to move on to the first line. So now, we want to declare our variables.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Now the first thing we selected was our array, which is basically everything that we have in this table.
So I'm going to call this array, let's just call it data. And then we can select the cell references, comma,
Alt + Enter to move to the next line. What do we then need to do? Well, we need to specify what we
want to include in our FILTER. And the first thing is we want to include the block. So we're going to
name the block range.

So let's give it a name, we'll call it block, comma. And that means we're referring to this range, just here,
comma, Alt + Enter. Now, you don't necessarily have to name absolutely everything that you select in
your calculations as a variable. For example, I might not want to name this cell just here where we have
West. Now, I am going to do this just so you can really see what this formula looks like when we name
everything. And I think what I'm going to do is I'm actually going to rename the block range, I'm gonna
call this blockrng, just to make that very specific.

And then the next variable, we're going to call block. And that's going to refer to this cell just here. And
we're going to press F4 to lock that. Comma, let's move on to the next line, Alt + Enter. The next thing
we need to declare is the subject just here. So let's say subjectrng is this range just here, comma, Alt +
Enter. And again, if you need to, you can just drag this down to give yourself a little bit more room.

And then our final variable to declare is just going to be the subject. And that is going to be this cell just
here. And I'm going to press F4 to lock that. So, those are all of our declared variables, we can now
perform the calculation on the last line. So comma, Alt + Enter. So now, it's time to put together our
calculation. So we want to do FILTER. Our array, well, we've declared that as the data range, comma,
what do we now want to include?

Well, the first thing to include we want to select the block range, and that needs to equal whatever we
have in the cell that we've called block, Asterix. Our second piece of criteria is the subject range, and
that needs to equal the subject, close our bracket, close off our FILTER. So, let's just take a moment to
review what we have in this calculation. We have the LET Function name on the first line, we then
declare all of our variables and what they refer to, and then we do our calculation on the last line. So,
let's hit Enter and see what we get.

Now it's telling me it's found a typo in my formula, and I think I've missed off a trailing bracket on the
end here. So, I'll say Yes to accept the correction. And take a look at that, we're getting exactly the same
results. So, our LET is working really well. Now, let's just check if we change this to East, let's see what
happens. It still works.

So hopefully, that gives you an idea as to how you can use LET and where it might be useful. I will say
LET is particularly useful if you have a large data set, if you have a complicated calculation, and
particularly if you're recalling the same information over and over again in a formula. It makes it a lot
more efficient for Excel to calculate and it makes the formulas a lot easier to read and understand.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: The LAMBDA Function

Deb: The new LAMBDA Function in Excel is a game changer. It allows us to create custom functions
that can be called by user-friendly names, and then we can reuse them throughout our workbook. So
basically, we can now take an existing complex formula, wrap it up in a LAMBDA and give it any name
we like. And then instead of typing in the long complex formula, we can simply recall the formula using
the user-friendly name. So, let's take a closer look at that before jumping into a couple of practical
examples.

So, take this long, complex formula, for instance, this is a SORTBY formula, and you can see
throughout this formula, we have lots of different cell ranges. And these cell ranges, effectively, I only
have two different cell ranges that I'm using in this formula, C4:C19, and D4:D19. Now, what I could do
here, and this is very similar to when you're using the LET Function, is I could declare my variables. So,
all that means is giving those cell references, those cell ranges, user-friendly names.

So, you can see here, I might decide to call the cell range C4:C19 datarng, and the cell range D4:D19
productrng. So then I could use those names in the formula instead of the cell references. And you can
see there, what that would look like. Now once we have this new formula that's using our declared
variables, we can then create our own custom function. And this is really where the power of LAMBDA
lies.

Using the Name Manager, I can give this entire complex formula, a user-friendly name called
SumofProduct. And then every time I want to reuse that formula in the workbook, I simply have to
recall it by the name as opposed to typing in the lengthy formula. So, that's the basics of how a
LAMBDA works. So let's look at it in action. So, let's take a look at an example of a very basic
LAMBDA, which will help you give you an idea as to how this function works.

So, what we have in this first table are some sales prices listed out in Column B. And what we want to
do is we want to work out what the price is going to be when we add 20% sales tax. So, this is a
straightforward calculation, right? All we need to do is =B8, multiplied by, now because I don't have
20% right now in a cell, I'm going to do this in a slightly different way. We're going to say 1 + 20%.
And that's going to give us our total amount, I can now double-click to copy this down.

Now we could take this very simple formula, and we could convert this into a LAMBDA. And then we
can set it up as a function and reuse this function whenever we want to increase prices by a specific tax
rate. And it doesn't necessarily have to be 20%, it could be any value. So let's take a look at what this
would look like if we create a LAMBDA. So let's click in cell D8, and we're going to type in
=LAMBDA.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Now the first thing we need to define for our LAMBDA are our parameters. Now I'm going to start out
just by defining one parameter. And just because I'm not very good at thinking of parameter names,
we're going to call it x for argument's sake. Now, this is kind of similar to a LET but there is one major
difference. If we're doing a LET, we set up what value is attributed to this variable in the next argument,
so we would press comma, and then we would say that x refers to cell B8.

Now when you're using LAMBDA, you don't do it in this way. You define the values at the end of the
calculation. So we're going to say that x represents B8, but we're going to do our calculation first of all.
So our calculation to work out the tax is going to be B8, so x, multiplied by 1 + 20%. And we can close
the bracket, and then I need to close off my LAMBDA. Now if I hit Enter here, I'm going to get a
#CALC! And that is because I haven't told the Excel formula what x means. I need to define this at the
end of the calculation.

So in brackets, we define what our variable means. So in this example, x = cell B8. Let's close it off, hit
Enter, and now that looks a lot better. And I can double-click to copy that formula down. How about we
add a second variable into this calculation to represent 20%? Well, let's click where we have our
variables, and I'm going to add another one, we're just going to call it y. And then at the end, I'm going
to let Excel know what y actually means. So y is 20%.

I can then replace the 20% that we have in the formula with y instead. And when we hit Enter, I should
find that I get exactly the same thing. So now that we have our LAMBDA, what we can do is we can
create a function using this formula. And then we can reuse this function wherever we like in the
worksheet. Now, when you're setting up these functions, you only need the part of the formula that
actually processes the calculation. So basically, everything before where we've assigned value to our
variables. Let's Ctrl + C to copy.

Now we're going to go up to the Formulas tab and into Name Manager, and we're going to create a
brand new name. So, this one is going to be called priceplustax, and then I can simply Ctrl + V to paste
that LAMBDA formula in. Let's click on Ok. So now, instead of having to perform the calculation, I can
simply call my function. So let's type in =, I'm going to start to type in the name of my function. Notice
that Excel recognizes it as a function, and it comes up in IntelliSense. So let's press tab to select it, and I
can see my arguments underneath.

Now, it might be that you want to make your arguments a little bit more meaningful than what I've done
here. But all I need to do is define my variables. So what are my x value? Well my x value is the sales
price. What's my y value going to be? Now I don't have to enter in 20%, I can use this for any tax rate.
So let's say we want to know what the sales prices will look like with a 14% tax rate. Let's hit Enter.
And like magic, it copies it down. So, that is how a very basic LAMBDA works. And I could reuse this
new custom function over and over again in my worksheet on data that is relevant.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

So now we've got that under our belt, let's take a look at a slightly more complex LAMBDA. Now, what
I'm aiming to do here is I want to sort this table of data by the salary column, in ascending order, and
then by the region in ascending order. So, let's take a look at this calculation without doing a LAMBDA
first of all. So, we're going to use SORTBY for this. Let's select the information that we want to sort and
return.

Now I want to return every single column. So my array is going to be everything, comma. What’s the
first column that I want to sort by? Well, I want to sort by the salary column, and I want to sort in
ascending order, comma. What's the second array that I want to sort by? Well, I want to sort by the
region, and I also want to sort in ascending order. Let's close the bracket, hit Enter, and that is the results
for my list.

Now you can see here in Column H, I need to apply some Number Formatting. So, let's quickly sort that
out, and that looks a lot better. So I could now set this SORTBY calculation up as a LAMBDA. So,
what's that going to look like? Now if we look at this calculation, we have three different ranges that
we're using, A4:D17, B4:B17, and D4:D17. So, we could set these up as variables. So, let's click at the
beginning, and type =LAMBDA.

So now, I can define my parameters or my variables. And this time, I'm going to name them something a
little bit more meaningful. So the first range that we reference in sort by is A4:D17, which is basically
all of my data. So we're gonna call this first variable data. The second range I reference is B4:B17,
which is the salary column. So let's call that salary. And the third range I reference is D4:D17, which is
the region column. So let's call that region. So now I have my three parameters, I need to attribute values
to those. So we're going to click right at the end.

Now remember, because we opened a parenthesis for LAMBDA, we need to close off an extra one. And
now we can define our variables. So, data relates to the entire dataset, so the range A4:D17. The salary
relates to the salary column, B4:B17. And the region relates to the region column, D4:D17. Let's close
the bracket. So now, I can go into my SORTBY formula, and I can basically replace these cell
references with the names that I've given them.

So A4:D17, we're going to replace that with data. B4:B17, we're going to replace that with salary, and
then D4:D17, we're going to replace with region. Now, if we've done this correctly, when I hit Enter, we
should find that we get exactly the same results. So now that we have our LAMBDA calculation, we can
set this up as a function. Now remember, you only need to copy the process or part of the LAMBDA.
So, that is everything before the definitions for our variables, Ctrl + C to copy.

Let's jump up to the Formulas tab and go into Name Manager. We’ll create a new name. And I'm going
to Ctrl + V to paste the formula in. And let's give this a different name. So we're going to say, Sortby.
And I'm going to be a bit vaguer with this, we're going to say SortbyNumCat. Because, I could use this

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

on other data where the headings aren't necessarily salary and region. Let's click on Ok, and close. So
now if we delete out this, we can use our formula to pull back the results that we want. So let's type in =
and start to type the name of our new formula. And notice that it comes up in Excel’s IntelliSense. Let's
press Tab to select. And now the arguments are the variables that we set. So data, salary, and region.

So, all I need to do now are provide the cell ranges that I want to use. So data, well, we want to sort
everything. Salary is the salary column, and region is the region column. Close bracket, hit Enter, and
we get exactly the same results. Let's use this same formula on a different set of data. So, if we scroll
down, I have something similar. So, the data that you want to reuse this formula on, has to be kind of
similar to the data you used to create the LAMBDA.

So this time I have products, I have some prices, I have regions and locations. And maybe I want to sort
by the price column and by the region column. So let's just output our headings over here. And we're
going to go into our function, so SortbyNumCat. Now again, notice the argument names, data, salary
and region don't really apply to the data that we have here. So, this is where you might want to be a little
bit vague with what you're naming your variables.

Now, data is going to be everything because we want to return everything. Salary, well, let's say that that
is we want to sort by the price. And then region is region in this case as well. So, we're going to select
the region just here. Close the bracket, hit Enter, and take a look at that, we get our results.

So, those are a few different ways that you can use the new LAMBDA Function and create your own
functions in Excel. It really is a great tool and a complete game changer. And I really do encourage you
to have a little play around with this and an experiment on different data sets.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Exercise 06

Deb: In this exercise, we're going to practice the skills that we've learned in this section. And in this
section, we covered two of the more complex formulas available in Excel, and two of the more new
formulas in Excel, LET and LAMBDA.

So in the first part of this exercise we're going to focus on LET. Now what I have here is a table of
delegates, the course that they attended, the date they attended the course and the location of that course.
In Column G, I have criteria. And notice that I've already set up the Data Validation drop down lists, so
we can select courses from here, we can select the dates, and also we can select the locations. And you'll
notice all the way over on the right-hand side, I have the unique list that I created in order to do these
Data Validation drop down lists.

Now what I want you to do here is to use the LET Function to create variable names for the course
range, the date range, and the location range. I’d then like you to use these variable names in a FILTER
calculation to return all delegates that attended an Excel course on 4/3/2021 in London. And you can see
here that I've already done that. So, you should be getting two results from this calculation.

In the next part of this exercise, we're going to shift our focus to LAMBDA. So what I have here is some
company names and there's just two of them in Column A, we have two different sales teams in Column
B, and then we have the sales that those teams have generated. Now what I want you to do here is
something that we haven't actually done in this course. And that is, I want you to create a COUNTIFS
calculation.

Now, we haven't seen how to do this in this course, because it's included in our Intermediate course. And
I would expect that if you are on the Excel Advanced course, you already know how COUNTIFS works.
But just in case you don't, let me quickly run through this with you. COUNTIFS basically allows us to
perform a count based on different pieces of criteria. So, you can see here that I have three pieces of
criteria. I want to count the number of sales for the company MicroWorld Sales Team 1 that are greater
than 35,000.

Because I have three pieces of criteria, that is why I need to use COUNTIFS as opposed to the singular
COUNTIF. So, let's just take a look at just the COUNTIFS formula. Once we've got that, I'm going to
leave you to construct the LAMBDA yourself. So if I was just doing a regular COUNTIFS, we would
type in COUNTIFS, we need our first criteria range.

Well, our first piece of criteria is that the company has to equal MicroWorld. So where are we going to
find that information? We're going to find it in the company range, comma, what is our criteria? Well
the criteria we're looking for in that range is MicroWorld, comma. What's our next criteria range? Well,

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

we're also looking for Sales Team 1. So, our criteria range for this one is going to be B3:B20, and our
criteria is Sales Team 1.

Our final piece of criteria is that we're only looking for sales, or we're only counting sales that are
greater than 35,000. So our criteria range is going to be the sales. And our criteria is going to be I3. So,
that would be how you would do the COUNTIFS. If I hit Enter, it's telling me that we have three records
that match this criteria. So, I basically want you to do a COUNTIFS, but I want you to turn it into a
LAMBDA.

So I want you to create a LAMBDA that performs a COUNTIFS of the company team and sales that
meet all of the criteria in columns G, H, and I. And you can name the variables whatever you like. Once
you've done that, I'd like you to create a function from this LAMBDA calculation called
CountCompanySales.

And then, I'd like you to test that that function works in cell J6. So, quite a bit of work to do there,
particularly if you're not all that familiar with the COUNTIFS formula. But, I wanted to kind of push
you a little bit on this to see how you get on with that. And if you'd like to see my answer, then please
keep watching.

So the first thing I asked you to do in the first part of this exercise was to use the LET Function to create
variable names for course, date, and location. And then we need to use those variable names in a
FILTER calculation. So, what I'm going to do is click in cell J4, and we're gonna go straight into LET.
So, this is where we need to give our variable a name. Now our first variable is going to be the course
range. So I'm just going to call it course, comma.

Now I need to assign a value to that variable. So this name is going to relate to this range, just here,
comma, let's do the next one. Our next variable is going to be the date, so I'm going to call it date. And
the range we're going to assign to that is the date range, just here, comma. Let's do the final one, I'm
going to give it a name of location. And that's going to refer to this range just here. So now we've set up
our variables, we can use them in a FILTER calculation. So let's go straight into FILTER. What are we
filtering, what do we want to return?

Well, I want to return all of the information, the delegate, the course, the date, and the location. So, our
array is everything in this table, comma. Now I need to specify what I want to include. And at this stage,
I'm going to switch up to editing in the Formula Bar so that we don't run off the side of the worksheet.
Now we need to include three pieces of information, because we've got multiple, they need to go in
brackets.

The first thing we want to include well, we want to include results where the course is equal to Excel, or
whatever we have in this particular cell. Now I've named my course range in my LET, so I can simply

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

recall it, I can type in course. And that needs to equal whatever we have in cell G4. That's our first piece
of criteria. We now have another piece of criteria. So we're going to link these together with AND logic.
And next piece of criteria is the date. So we have that set up as a variable, and that needs to equal what
we have in cell G8, close the bracket.

We have one final piece of criteria, so we need another Asterix in there. And this time, we want to call
the location range. And that needs to equal whatever we have in cell G12. Let's close off our argument,
now we're back into our FILTER. And I'm just going to add, if it doesn't find any records, we wanted to
say No Records. If you didn't do that part, don't worry, I didn't actually put that in the instructions. Let's
close off FILTER, close off LET, hit Enter. And would you take a look at that. And we should find that
this will work.

If we change this to something else, and update these dates, that all looks to be working perfectly. And
remember the cool thing about LET is that I can now use those variables we created; course, date, and
location, throughout my worksheet much like I would named ranges. So, that was the first part of this
exercise. Let's move on to the second part, and that was creating a COUNTIFS and wrapping it up in a
LAMBDA.

So, we're gonna go straight into our LAMBDA. The first thing we need to do here is we need to specify
our parameters or our variables. So I have three pieces of criteria, so I'm going to have three variables.
And I'm just going to call them exactly the same as the column headings. So my first one is going to be
called company, my second one is going to be called team, and the third one is going to be called sales.

Now remember, this is where it differs from LET because we don't define what these actually mean
what these refer to until the end of the calculation. So, once we've set out our parameters, we then need
to go straight into our COUNTIFS. What is our first piece of criteria? Well, it's MicroWorld. Where are
we going to find that, what is the criteria range? Well, it's the company range. So we're going to say,
company, and our criteria is G3.

Now I'm going to press F4 to lock that, comma. Criteria range 1, well, that is going to be the team. Our
criteria is what we have in cell H3, F4 to lock. And finally, our third piece of criteria is sales. Those
need to be greater than 35,000 or whatever we have in cell I3, F4 to lock. Let's close off our COUNTIFS
close off our LAMBDA.

The final thing we need to do here is we need to attribute meaning to company, team, and Sales. So, we
need to open another bracket, and first define what company refers to. Well, the word company refers to
the company range, F4 to lock. Team refers to the team range, and sales refers to the sales range. Let's
close it off and hit Enter, and it's returning the result of 3. So, I know that this is working.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

The final thing I asked you to do was basically create a new function based off of this LAMBDA
calculation. And I want you to call it CountCompanySales. Now remember with these, you don't need to
copy across this last part, because we're going to define those when we use the function. So, we just
need the processor part of the LAMBDA, which is everything before, Ctrl + C to copy. Let's go up to the
Formulas tab, into Name Manager, and we're going to create a new name. And we're going to call it
CountCompanySales. And let's paste that formula in and click on Ok.

Now let's test our formula is working. If we type in =, there it is in the list, just like any other function.
Notice our arguments are the parameters that we've defined. So, all we need to do is provide the values.
So company is this range, comma, team is this range, and sales is this range. Let's close the bracket, hit
Enter, and we get a result of 3.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Section 07 – Creating your own PivotTable Style


Video: Creating your own PivotTable Style

Deb: In this section, we're going to take a bit of a deeper dive into Pivot Tables. And in this particular
lesson, I'm going to show you how you can create your own PivotTable Style.

Now, the reasons why you might want to do this would be maybe you need to adhere to company
branding, maybe there are specific colors and formatting that you need to use in your Pivot Tables in
order for it to adhere to company guidelines. Or it might be that you just don't particularly like the
PivotTable Styles that are available in Excel. And you want to have a bit more control as to the look and
feel of your Pivot Tables.

And just as a bit of a recap, we're just quickly going to create a PivotTable based on the data that we
have in this worksheet. Now if I press Ctrl + Down + Arrow to take me to the last row, notice that this
data set is reasonably small, but it's enough for a PivotTable, we have 701 rows of data. And this data
basically represents product sales.

And what I've already done is I've already put this data into a table, and you can see that I've called my
table Product Sales in the top. So, let's create a PivotTable. And then we'll take a look at how we can
create a Custom PivotTable Style.

Now because I'm on the Table Design Ribbon, I'm going to click on Summarize with PivotTable. It's
picked up my table range, which is called ProductSales, and I want to place this on a new worksheet. So,
let's click on Ok. So, now I need to build my PivotTable. And I think for this one, we're going to grab
the region, I'm going to drop that down into rows. And then let's drag the profit into values. And I think
we'll add another one as well, let's add country underneath region.

Now currently, I'm displaying the sum of profit, I think I also want to see the average of profit as well.
So we're going to grab another profit field and drop that into values, we're going to change the way that
we're summarizing. So let's right-click, and go to summarize by average. Now there are a couple of
things I want to do to tidy up this PivotTable before we get into creating a custom style.

Now, I'm going to double-click on this label. And instead of average of profit, I'm just going to say Avg
of Profit, let's change these row labels. So, this is going to be the region. Now let's apply some Number
Formatting.

So we're going to right-click Value Field Settings, Number Format, we're going to choose Currency,
take those decimal places down. And we're going to do exactly the same for the average column as well.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

So Value Field Settings, Number Format, Currency, take the decimal places down. So now I kind of
have my PivotTable looking as I want it to look.

Now notice when you're selecting your PivotTable, you get two contextual ribbons; PivotTable Analyze,
and PivotTable Design. And you're going to find your PivotTable Styles on the Design Ribbon. Now, if
I click the drop down and take a look at the current Styles that I have access to, we can see that they're
categorized into Light, Medium, and Dark. And the colors that you see in here are very much based on
the Theme that you're currently using in Excel.

So for me, if I go to Page Layout, and take a look at my Themes, I'm actually using the standard Office
Theme. If I was to change the theme to something else, so let's click on Gallery, notice that the colors
are updated in my PivotTable. And if I go to the Design Tab, I get a whole different set of colors. Now,
it might be that you can find exactly the color scheme that you want simply by changing the theme
you're using in Excel. But what we're going to do here is we're going to create our own Custom
PivotTable Style.

Now when it comes to creating your own Custom PivotTable Style, you have two options. You can
either modify an existing theme, or you can create a brand new PivotTable Style from scratch. If you
modify an existing theme, it means that the colors that are currently in use in this theme will carry
through to the new Style, and you can make some tweaks to it if you want.

So, if you fundamentally like most of the design elements of let's say something like this, you could
choose to modify this theme and maybe just tweak it very slightly. Now another thing to notice here is
that whichever one of these Styles you select, it toggles on these PivotTable Style options. So for
example, this Pink Style here, the Rose Pivot Style Light 16, that has row headers, column headers
toggled on, but it has banded rows and banded columns toggled off.

So, if I was to select banded rows, I'm going to get banded rows running across my PivotTable. So, just
be aware of that when you select a PivotTable Style. Now we're going to create a new PivotTable Style.
So, let's click on this. And we're starting from a blank. So, the first thing we need to do here is give our
PivotTable Style a name. So I'm going to call this Custom Pivot Style 1. And now, I can go in and
choose which table element I want to format. So let's start with the whole table.

Let's click on format. And I'm going to apply borders around the outline, and also the inside. So, the first
thing I'm going to do here is select colors. Let's do a reasonably dark color Blue gray. And then I'm
going to use these presets to quickly apply an outline and an inside border. Let's click on Ok. Now you
can see that that preview updates so I can see what I have applied. Now, let's choose report filter labels
and click on format.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Now I want these to stand out from the rest. So, we're going to fill the background. And again, let's do a
reasonably dark color. And I'm going to make the font, let's make that White, and Bold. And click on
Ok. Report filter values. Let's click on format. And I'm going to do the same thing. Let's click on Fill,
choose a dark color, and I'm going to make those White as well. Now, do I want a column stripe? No, I
don't think I do. But I do want a first row stripe, let's format that. Go to Fill, I'm gonna choose a lighter
color this time, click on Ok. And a second row stripe, I'm going to choose a lighter gray.

Now I could carry on going through all of these, let's go all the way down to the bottom. And I'm going
to choose Grand Total row. Let's click on format. I'm going to make this a dark fill. I'm going to make
the font White and also Bold. And click on Ok. This is kind of a bit of trial and error, because you don't
really know what your PivotTable Style looks like until you actually apply it to the table. And then if
you're not happy with it, you can make further modifications. So let's click on Ok.

Now, if we click the drop down, notice that we have a new category at the top called Custom. So, I need
to select it, and I can see what my formatting looks like. Now this looks a little bit strange. Remember
that we did choose a background fill for banded rows. But this is where these PivotTable Style options
come in. Because I don't have banded rows selected, I can't see the colors that I've chosen. So if I toggle
this option on, it then becomes clear.

Now there are some modifications that I want to make to this. For example, this heading row is showing
in White, and I don't want it to look like that. So we can right-click on our Custom Style and modify it.
So this time, I'm going to choose header row. Let's click Format. I'm going to choose a fill, dark fill.
Let's make the font, White, and bold. Click on Ok, Ok again. And now that looks a lot better.

Now I think I want to make one final modification to the Style. I want all of the region titles, that
particular row where we have the subtotals, to be in a different color. So let's right-click and modify. So
let's scroll down. And I think we want Row Subheading 1. Let's click on format. And I'm going to make
this a completely different color. Let's go for this bright Pink. Click on Ok, and take a look at that. Now
I'm not saying that this looks amazing, but hopefully it gives you an idea as to how you can completely
customize the colors in your PivotTable Style.

Now if you want to select your own colors again, remember if you go to Modify and select the whole
table, for example, you're not just restricted to your theme color palette, you can go to More Colors,
choose a color from the wider palette, or if you have very specific colors, you can go to the Custom tab
and you can type in the hex value in here.

A lot of companies that I've worked for generally tend to have their branding colors as hex values for
their marketing team. You can grab that and you can get exactly the correct branded colors. Now once
you've set up your Custom PivotTable Style, if you then want to use this Style for all of the Pivot Tables
that you create, you can choose to set it as the default PivotTable Style for this document right at the

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

bottom. Now I'm not going to do that. I'm just going to click on Ok. And now this custom style is
available for me to use throughout this workbook.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Custom Number Formatting

Deb: It's time now to talk about Custom Number Formatting in Pivot Tables. And we're pretty much
picking up where we left off in the last lesson. I still have my Custom PivotTable Style applied, but I
have made a couple of changes. I've got rid of that Pink row, and I've also changed the header labels to a
slightly lighter color just to make these values a bit easier to see.

Now another thing I'm going to do here is I'm just going to very quickly change the layout of this report.
If we jump up to the Design Ribbon, notice we have a Report Layout section. And by default, your Pivot
Tables will be in compact form, which is what I have applied right now. But we do have two other
layouts that we could choose. We have outline form, which displays it in a slightly different way. And
we also have tabular form, which is the one that I'm going to use.

So now, you can see we have our regions at the top, then the country, then the products, sum of profit
and average of profit. And then we have our subtotals for each country right at the bottom and our
subtotals for each region at the bottom as well. And if you wanted to repeat these region labels all the
way down in every row, you can go to Report Layout and just choose Repeat All Item Labels.

Now another thing that's really important to understand when you're working with Pivot Tables is how
we apply Number Formatting. Now if you take look in Columns D and E, where I have the sum of profit
and the average of profit, currently, I have Currency Formatting applied to these two columns. And the
thing you have to remember with formatting is that it's basically just a mask. I'm clicked in cell D4 and
if you take a look up in the Formula Bar, you can see the actual value contained within that cell without
any Number Formatting applied.

So whenever you apply Number Formatting to a cell, you're just applying formatting like a mask over
the top, it doesn't actually change the underlying value. And that's a really important concept to
understand. Now, most of us at this stage should probably know how we change our Number Formats in
a PivotTable.

Because we do it in a slightly different way when we're not working in a PivotTable. If we have a
number in a cell, and we want to apply some formatting, we just use the Home tab and we'd select our
Number Format from the drop down. But we don't do it that way when we're working in Pivot Tables.

What we do is we right-click in the column that we want to format, go into Value Field Settings and
Number Format. And then we can choose our Number Format from here. And it might be if you want to
apply Currency Formatting, you might want to increase the number of decimal places. Maybe you want
to change the currency symbol that you're using as well. And it might be that you want to use any of
these formats, and you're perfectly happy with those.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

But one thing that people forget about is the Custom Formatting option. And I think people tend to skip
over this all the time because when you first come into here, it looks a little bit scary, we have all of
these seemingly random symbols everywhere. And if you're not sure what these mean, it can be a little
bit overwhelming. So let's understand what we're looking at.

Now currently, I have Currency Formatting applied, and I'm displaying two decimal places. And we can
see that in the sample at the top here. Now, if you look underneath that, that's telling me exactly what
that format looks like in Excel code, I guess you could call it. We have the currency symbol at the
beginning, and then we have these pound symbols followed by a 0. So, what exactly are these?

Well, these are effectively placeholders for numbers. And the pound symbol means that it's a variable,
whereas the 0 means that it's fixed. And notice at the end here, I have two 00, because I've specified two
decimal places in this particular format. If I was to go back to currency and take these decimal places
down to 0, and then jump back into Custom, notice that this has updated and it's changed, I now no
longer have .00 afterwards, because I have no decimal places. So, this what you see here basically
represents the format that I'm currently using.

Now you can define the way that the values in your cells look in four different ways. And this is very
much determined by the type of number or the type of value that you have in the cell. So, this number
here is how my positive numbers in cells are going to be formatted. If I press semicolon, I can then add
more Custom Formatting. And that's going to determine how my negative numbers are formatted.

Now I do have a couple of negative numbers in this data set. So, I can customize how those negative
numbers look. And before we do that, let's just take a look at those negative numbers. Let's click on
Cancel and Cancel and scroll all down in our PivotTable. Now, if you notice here, we have some
negative values. So currently, they just display very similar to the positive values, but we just have a
minus symbol in front. But maybe I want these negative values to really stand out, and I want them to be
highlighted in Blue.

Well, I can do that using Custom Formatting. So let's right-click, go into Value Field Settings, Number
Format, and let's go straight into Custom. Now what I'm going to do here is I'm going to copy the
positive value format semicolon. And now I can define my negative values. Ctrl + V to paste it in,
because I want the number to look the same, I just want it to be in Blue. And we can add or change the
color by putting the color name in square brackets.

So if you want Red, you can put Red in square brackets, I want mine to be Blue. So, this is the format
for any negative numbers that I have in my PivotTable. Let's click on Ok, and Ok again, and there you
go. Now notice that I don't have a minus symbol, because I removed it. If you just want them to show in
Blue, that's fine. But if you do want that minus symbol, you would need to go back in and change your
Custom Formatting.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

So I do want these with a minus so let's just add that in. Click on Ok, Ok again, and now that minus
symbol is back. So, just remember, the formatting in the first position is positive numbers. In the second
position, is negative numbers, we have two other positions. So let's jump back into our Number
Formatting. What else do we have?

Well, if I press semicolon again, anything I enter in here is going to tell Excel how to format 0 values.
So if you have 0 values in your table, again, you can set up a Custom Format for them in this particular
position. So, let's click Cancel. And currently I don't have any 0 values in my data so let's change that.
I'm going to go back to my PivotTable, Ctrl + Down Arrow to go to the last row.

Now what I'm going to do here is I'm just going to take this last row, Ctrl + C to copy it, I'm going to
paste it into the bottom. And let's change this to a completely different country. So, I'm going to say,
Argentina, and Argentina is in South America. And we're going to say that this had no sales, so it hasn't
sold any units. And we're just going to put 0s in for all of these. So now, if I go back to the PivotTable
and refresh it, we can right-click, click on Refresh.

Notice now at the bottom, it's added Argentina, but we have 0 values, because there's been no sales.
Now currently, that's just showing as a 0, with $1 symbol in front. But maybe I want this to show in a
completely different way. Maybe I don't want anything in there. Maybe I just want a blank cell. Or
maybe I want it to say ‘No Sales’, we can do that using Custom Formatting. And that is where this third
position comes in.

So let's click on the end, semicolon, and now we're defining the format for 0 values. So in quote marks,
I'm going to put, ‘No Sales’ and click on Ok, and Ok again. And take a look what we get in those cells, I
get that text. Now, interestingly, it hasn't changed the underlying number. Remember, formatting is just
a mask on top of the number. If I take a look up in the Formula Bar, the PivotTable still thinks that in
this cell is 0. We've just formatted it so that it says ‘No Sales’.

Let's right-click again, go back into and Number Formatting. Because the final position that we haven't
talked about yet, is how we want to handle text that we have in any cells. So, if you do have text in the
column, that last position is where you can specify what you want that to look like. Now, we don't
actually have any text in our columns, so we're not going to specify that. So, let's just backspace to
remove that semicolon.

Now another thing to notice is that when you build your own Custom Format, it does appear in this list
right at the bottom. So, it means that you can reuse that Custom Format again and again in this particular
workbook. So, I think I'm pretty happy with how this looks. What I am going to do is I am going to
remove the dollar sign. So, I'm just going to remove those like that. Click on Ok, click on Ok again, and
that looks a lot better.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Now remember, with these Number Formats, you can only apply them to one column at a time. So, if I
want to apply the same formatting to the average of profit, I can right-click, go back into my Number
Formatting and Custom and I should still have my Custom Formatting at the bottom. So, it's this one just
here. I can select it, click on Ok to apply that Custom Formatting.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Sorting using Custom Lists

Deb: Let's move on to take a look at how we can sort our PivotTable data. Now before we do that, I'm
going to make a couple of little changes here, I'm actually going to remove the region so that we're just
summarizing by country and product.

So, if we go down to the PivotTable fields, let's just drag region out of there. And I think I'm also going
to turn off these repeating labels. So, up to the Design tab, into Report Layout, and Do Not Repeat Item
Labels. Now, if I wanted to sort this data, that's a fairly easy process. For example, if I want to sort by
the sum of profit, I can simply right-click, go to Sort, and then I can choose smallest to largest, largest to
smallest or More Sort Options.

So, if I say smallest to largest, my data is going to rearrange itself. And I'm now viewing this from the
smallest sum profit up to the largest. But what would I do if I had a very specific order that I wanted to
solve my PivotTable in? For example, if we take a look at the products in Column B, maybe I don't
particularly want to sort them in A to Z order, or Z to A. Well, there are a couple of different ways that I
could set this up.

Now, if I just want a particular sort order for one PivotTable, probably the easiest way to do this, and
again, this depends on how many products you have in this case, is to drag and drop the values into the
order I want. So for example, if I want to sort and have Luxe at the top, I can simply grab the cell until I
get that double headed arrow and drop it at the top. If I want Royal Oak to be second, I can drag and
drop that and put it in the second position, so on and so forth.

And you'll notice that as I drag and drop these, it changes the order for all of the different countries. So,
it's consistent throughout my PivotTable. Now, this is a method I tend to use, if I don't have many fields
that I need to reorganize, and if I just want a specific order on one PivotTable. Now if I have multiple
Pivot Tables in this workbook, and I want a very specific order of these products, it's going to work out
better if I create myself a Custom List, and then I can choose to sort using that Custom List.

So, what I might do is over in a spare cell or a blank cell on the worksheet, I would define my specific
sort order. So, I'm going to do that now, join me back here in a couple of seconds. So, this is the order
that I want to sort my products in. So, I'm going to set these values up in a Custom List. So, let's jump up
to File, and we need to go into Options in order to do this. And we're going to find our Custom Lists
underneath the Advanced area.

Let's scroll all the way down to the bottom, and in the General section, we have a button here to edit our
Custom Lists. And you'll see on the left-hand side, all of the Custom Lists that I currently have set up in
this workbook. So, what we can do is we can create a new list by importing this data. So, I'm going to

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

click in Import from cells. Let's select the list and choose Import. So, you can now see I have a new
Custom List, and those are my list entries. Let's click on Ok and Ok again.

So to sort this data using this Custom List, we need to right-click, go into Sort, and this time, we want to
choose More Sort Options. Notice here we can choose to sort these manually, and it says you can drag
items to rearrange them, which is what we’ve done previously, we can sort in ascending or descending
order.

But if we click on More Options, this is where we can choose if we want to sort using a Custom List.
And the first thing we need to do here is to turn off ‘Sort automatically every time the report is updated’.
So let's deselect that. And then where it says, ‘First key sort order’, we can choose our Custom List. So
it's this one here, right at the bottom. Let's click on Ok, and Ok again, nothing happens.

Now, that's because our Custom List doesn't apply until we choose to sort A to Z. As soon as we do that,
it updates and you can now see that my products are sorted in the specific order that I need them to be.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Applying Multiple Filters to Data

Deb: In this lesson, we're going to talk about how we can apply multiple filters to one field. But before
we do that, we're going to go in and we're going to name our PivotTable. It's always important that when
you're working with things like tables, Pivot Tables, Pivot Charts, that you do give them a name so that
they're easy to identify later on, when you're doing things like adding Slicers, and connecting them to
different Pivot Tables and Pivot Charts.

Now another change I've made since the last lesson is I've just renamed these worksheets at the bottom.
So now, I have my original source data on the Data tab, and then I have my PivotTable on the
PivotTable tab, which makes a lot more sense. So, let's name our PivotTable. I'm going to make sure
that I'm clicked inside the PivotTable, and then up to the PivotTable Analyze ribbon. In the first group
just here where we have PivotTable name, currently, we just have the very generic name of PivotTable1.

Now, in general, when I'm naming things, I like to add a prefix, which helps me identify what this
actually is. So if I'm creating an Excel table, that prefix might be tbl. And if I'm creating a PivotTable, or
naming a PivotTable, in this case, I might prefix it with pvt. And we're gonna call this SumAvgProfit.
And remember, when you're naming things, you can't have any spaces, or you need to separate each
word with an underscore. And let's press Enter.

So now that we've done that, let's take a look at how we can use multiple filters in one field. So for
example, in this PivotTable just here, we have a product column. And if I click the drop down, I can
apply certain filters to this particular field. For example, if I'm not interested in seeing all of the
products, and maybe I'm only interested in the last three, I can deselect everything, and just choose to
show the data for Kensington, Mandarin, and Burlington. And if I click on Ok, that's exactly how my
data gets summarized for each of the countries.

Now, what about if, in addition to this filter that I've applied, I now want to apply a value filter? So,
maybe I'm only interested in seeing Kensington, Mandarin, and Burlington, where the sum of profit is
over 1 million. Now check out what happens if I try to do this. If we click the drop down again, and I go
to value filters, and let's say greater than, and I'm gonna say greater than a million. And click on Ok, it
applies that filter, but it kind of wipes out the original filter that I applied. Because now, I'm seeing other
products in here other than Kensington, Mandarin, or Burlington.

So, I can effectively only really have one filter on one field. Now there is a small setting in Pivot Tables
that you might not be aware of that allows you to have multiple filters per field. So, if we undo just to set
this back to how it was this little setting, you're going to find in your PivotTable Options. And there's a
couple of different ways that you can get to this, you could right-click and go down and select
PivotTable Options.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Or alternatively, on the PivotTable Analyze ribbon, in this first group, we have the Options button just
here. So, let's click it. Now there are various different options that you can turn off on in here. And
notice we have numerous different tabs at the top, which allow us to control different parts of our
PivotTable. Now, the one that we're interested in is the Totals & Filters tab.

Now if you take a look at the last option here when it comes to sorting, if you remember, in the last
lesson, we sorted using a Custom List. And this setting is checked by default, but if you are having
problems using a Custom List of sort, it's worth coming in here and checking to make sure you have this
option ticked.

Now if we go just above there into the Filter section, check out what we have here; ‘Allow multiple
filters per field’. So, we need to make sure that we have that turned on. And when we click on Ok, we
can then apply more than one filter. So currently, I'm just filtering for Kensington, Mandarin, and
Burlington. And now, if I want to only see those products that are greater than 1 million, I can type it in,
click on Ok. And now, my filter is working. I'm only seeing Mandarin, Kensington, and Burlington,
where the sum of profit is over a million dollars.

I could even add another filter. So, let's click the drop down again. And this time, if we go to Label
Filters, maybe I want to add another filter where the product ends with, ‘ton’, and click on Ok. And now
I'm just seeing Kensington and Burlington where the sum of profit is over a million. So, making sure
that you have that little option toggled on can be really useful if you're trying to use multiple filters on
one PivotTable field.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Adjusting Slicer Settings

Deb: Slicers are a quick and easy user friendly way to filter data in a PivotTable or PivotChart. Instead
of having to use these drop downs, you can create a more visual filter that's easy for even novice Excel
users to understand. So, let's take a look at how we can add a Slicer, and then we'll take a closer look at
how you can customize it using Slicer Settings.

So, let's click inside our PivotTable. And if we jump up to the PivotTable Analyze ribbon, notice in the
Filter group, we have two different types of Slicer that we can insert. We can Insert Slicer, or we can
insert a Timeline. Now it's worth noting that Timelines are specifically related to filtering dates that you
have in your pivot data.

So, if you don't have any dates in your original data set, you're not going to see anything in here. Now it
might be that you do have dates in your original data set, but when you click on Insert Timeline, you
don't see that field in here. Now normally, what causes this issue is if you go back to your original data
set, it might be that you don't have Date Formatting apply to your date column. If you don't have Date
Formatting applied, then when you click on Insert Slicer, it's not going to recognize that that is a date
field. So always worth checking if you're coming across that issue.

Now, we're just going to insert a regular Slicer. So, let's click on Insert Slicer. And notice we can add a
Slicer for any of the fields that we have in our data source. So, maybe I want to add Slicers for country,
region, and product and click on Ok. And this is what I get, these little panels. And effectively when we
click on these, it's going to filter the PivotTable data. So, if I'm just interested in seeing data related to
the USA, I can select the USA Slicer, and my PivotTable is going to update.

If I want to select multiple, I can either hold down Ctrl and make other selections, or alternatively, I can
click this button at the top called the Multi-select button, which will allow me simply to click without
holding down that Ctrl key. So, which method you use is entirely up to you. Also notice at the top here,
you have a Clear Filter button, which will just reset everything back to how it was.

Now where you position these Slicers on your page is entirely up to you. Some people like to keep them
in this format and position them down the side, maybe in Column A. Or, you can choose a different
layout for the sizes and maybe position them running across the top. And the cool thing about these
Slicers is that you can link them to multiple Pivot Tables and also multiple Pivot Charts.

So, if you only want one of these Slicers controlling certain charts or Pivot Tables in your workbook,
then you can definitely do that. I'm going to show you how to do that a little bit later on. But for now,
we want to focus on the look and feel of our Slicers and take a look at some of the Slicer Settings. Now
the first thing you'll notice is that when you are clicked on a Slicer, you get a New Slicer contextual
ribbon.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

So, this allows you to control things like the Style of your Slicer. And of course, you can create your
own custom size or style much like we did with Pivot Tables. You can name your Slicers in this first
group over here. Report Connections is where you come to connect your Slicers to multiple Pivot
Tables, and you can do things like adjust the layout and the size.

Now what I'm gonna do is I'm just going to drag down row A, because I want to put my Slicers running
horizontally across the page at the top here. Now currently, they don't really fit. So, I need to do a little
bit of rearranging. So, I'm going to click on my first Slicer, up to the Slicer ribbon, and in the Buttons
group, notice we have a Columns Setting. So, this is going to change the number of columns in the
Slicer. Currently, I have one which gives the appearance of all of the countries running in a vertical list
down the page.

Now I want to make this horizontal so it fits neatly into row 1. So, if I start to increase the number of
columns, check out how that's affecting the different countries that I have listed here. And I could carry
on going until they all fit on one row. I can then drag this Slicer out, drag it up, and let's move it out of
the way. And I can have that running across the top of my data if I wanted to. Now we do have quite a
lot of items here. So we need to stretch this out reasonably far.

And if I want to do I could do exactly the same for region and product. I can just select them and adjust
the number of columns. So again, if we drag this out and drag this up. Now I'm going to position these
in a better way in a moment, let's just get these all running horizontally across the page. So we're going
to do the same for product, we're going to drag it out, and drag it up. I'm just going to put this over there
for now.

So now we have our Slicers, I'm going to start by changing the color. So, I'm going to select all of my
Slicers by holding down the Ctrl key, I'm going to go up to Slicer Style, and then I'm going to choose a
different color for my Slicers. So I think I'm gonna go with this Ice Blue, that blends in really nicely
with the color scheme that I have in my PivotTable.

Now, what you'll also notice with these Slicers is that we have things like a header row on the Slicers.
And the header row contains the Slicer name, for example, country. And also at the end here we have
the Multi-select button and the Filter button. If you want your Slicers to look really clean, you can
remove this heading if you want to, by going into Slicer Settings. So, we can get to Slicer Settings by
right-clicking and going to Slicer Settings right at the bottom.

Or alternatively, if we use the Slicer ribbon, we have a Slicer Settings button in the first group here.
Now from here, we can do things like change the name of the Slicer, and we can choose if we want to
display that header or not. So if I deselect this and click on Ok, it's going to remove that header and
make the Slicer look a lot cleaner.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Bear in mind that if you do do this, you are also losing the Multi-select and the Clear Filter button. So, if
I want to make multiple selections, now I would need to use the Ctrl technique. So, I would hold down
Ctrl and select the countries that I want to filter by. And if I want to clear those Slicers, I can still right-
click and I have a Clear Filter from country option in the menu. So, you can get around that if you
decide to remove the header. Now let's click on Slicer Settings again and just take a look at some of
these other things that we have in here.

Now notice at the bottom here, we can sort ascending or descending. So, if you take a look at the current
order of my Slicer, I have USA, Canada, and Mexico, it's not in any particular order. Now if I deselect
Use Custom Lists, and then choose A to Z and click on Ok, that Slicer is now going to update so I have
it in alphabetical order, which is sometimes a little bit easier to read.

Let's click on Slicer Settings again. Also in here, I could choose to hide items with no data. So, if I had
countries or products in here that didn't have any data, I could choose to hide them from the Slicer. Now
I want to keep everything in there, so I'm going to click on Ok.

Now another couple of customizations that I might want to do here, if I want this to look really clean is I
might decide that I want to turn off gridlines, and then remove the border from this Slicer. So the Slicer
kind of looks like it's part of this worksheet. So, if we click on the Slicer again and go up to Slicer, what
we can do is modify the Slicer Style. And this is very similar to when we were modifying PivotTable
Styles.

Now if I right-click on the Style that I currently have selected, notice the Modify button is grayed out
because I'm going to need to duplicate the Style. And this is effectively creating a Custom Slicer Style.
So I'm going to call this DA, we'll call it Custom Slicer1. And the only thing I want to do here is remove
the border. So, I'm going to select whole Slicer and format, we're going to go to border, and we're going
to say None. Click on Ok, Ok again, and then we can apply the custom style. And that's just going to
remove that border and everything looks a lot cleaner.

Now I'm going to do exactly the same for the region and the product Slicer. And I'm going to arrange
these into a bit of a nicer order. So, I'm going to do that off camera and join me back here in a couple of
seconds. So, I've applied that same formatting to the other two Slicers. And I've just rearranged them
into a bit of a nicer order. And I've added my own Text Boxes for those Slicer titles. And I've also added
a little bit of interest by using a small icon, which you can get from the Icons Library under the Insert
tab.

Now currently, all three of these Slicers are attached to the PivotTable below. How do we know that?
Well, if we select one of the Slicers, let's go for the Country Slicer, go up to the Slicer ribbon and choose
Report Connections. You can see here, the PivotTable that it's connected to pvtSumAvgProfit, and all

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

three of these Slicers are connected to the same table. Now what about if we were to add another
PivotTable onto this page? So, let's quickly go back to our data source.

We're going to Summarize with PivotTable. I'm going to put it on an existing worksheet and we're going
to put it on this worksheet, let's put it next to the current PivotTable and click on Ok. So, let's just
quickly build another PivotTable. This time, we're going to organize by region and units sold. I'm going
to apply my Custom Pivot Tables Style. So, up to Design, click the drop down, and let's use Custom to
make this look the same. And we're going to turn on banded rows, so we get the same coloring.

Now, of course, I could go through and apply more customizations. But take a look at what happens
here. If I use my region filter, and let's say I'm only interested in seeing data for Europe, notice that
whilst this first PivotTable updates, because the Slicer is connected to it, the second PivotTable doesn't.
So, let's just quickly clear that Slicer, and connect this PivotTable to the other Slicers. I'm going to select
the first Slicer, right-click, and we want to go to Report Connections.

Notice I now have a new PivotTable and I just need to select it. And I need to do exactly the same for
the rest of the Slicers. Report Connections, select the PivotTable, and click on Ok. And let's do the final
Slicer; right-click, Report Connections. And this is why I said to you it's so important to name your
Pivot Tables and Pivot Charts. If you don't, they're just gonna say PivotTable1, PivotTable2, so on and
so forth, and it makes it harder to identify what you're connecting your Slicers to. So, let's click on that
one and click on Ok.

So now, if I select Europe, both of the tables update. And remember, you don't necessarily have to
connect every single Slicer to every single PivotTable and PivotChart that you have on your page. I
could choose to just connect the Country Slicer to this PivotTable just here. And maybe the Region
Slicer just to this one just here. So, you can really mix and match and get things to look exactly as you
want them to look.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Locking Workbooks but not Slicers

Deb: Once you've designed a really nice looking PivotTable, and you've added some Slicers, you might
decide to share your workbook with your team members or other colleagues. And the last thing you
want is for one of your colleagues who maybe he doesn't have as much knowledge in Excel as you do, to
start changing things in your PivotTable and possibly breaking it.

So, what can we do to allow other people to use the filters to extract information from these Pivot
Tables, but not change any of the PivotTable data? Well, we could consider protecting our worksheet.
Now the problem with this is if we jump up to the Review tab, we have a Protect Sheet option in here,
let's set a password on this worksheet. Let's re-enter it, like so. And now it means that other people can't
actually change anything in the PivotTable.

But it also means that they can't click on any of these filter buttons. So, we need to protect our
worksheet so that everything is protected, but the filter buttons still remain active. Now it is true in Excel
that every cell is locked by default. And we can check that by pressing Ctrl + 1 to pull up Format Cells
and go into the Protection tab. You can see here that the Locked box is checked.

Now the thing with this is that the locking of all of the cells doesn't take effect until we protect the sheet.
So, in order to keep certain things on the worksheet active and clickable, we need to unlock those cells
first of all, and then protect the sheet. So, what I'm going to do here is I'm going to select all of the
Slicers by holding down Shift, and just selecting them all. Let's right-click and go into Size and
Properties.

And you'll notice here under the Properties section, by default, the cells are locked. So we're going to
unlock the Slicers. And now when we protect the sheet, we can choose exactly what we want to remain
active. So currently, the only thing people are going to be able to do other than click on those Slicer
options is Select locked cells and Select unlocked cells.

So, I'm going to untick Select locked cells, but I'm going to say that they can use the PivotTable and
PivotChart. So, let's add a password, and let's confirm. And now, what we should find is that we can't
even select any of the cells that are locked, which should be everything on this worksheet except the
Slicers.

Notice as I hover over these are still active, I can select France, I can hold down Ctrl and select Canada,
Japan, Mexico, and everything still updates. But, I've protected the actual Pivot Tables from being
edited.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

And of course, if I want to remove that protection, I can click on the Unprotect Sheet button. I just need
to make sure that I know what the password is. As soon as I do that, everything becomes editable again
and people can go in and make changes to the PivotTable.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Creating a Calculated Field

Deb: In this lesson, we're going to talk about Calculated Fields. Now, what exactly is a Calculated
Field? Well, it's pretty much what it says on the tin, it allows you to add another field to your PivotTable
and perform a calculation.

Now, it's called a Calculated Field, because the calculation that you perform uses the field headers that
you have within your PivotTable. So, the best way to really see how this works is to dive straight into a
demonstration. Now, the first thing I'm going to do here is I'm going to remove the average of profit
from my PivotTable. So, let's grab the field and just drag it out to get rid of that. So, we're left with the
sum of profit for each of the products and each of the countries.

Now it might be that I want to add a field to my PivotTable that contains data that doesn't currently exist
in my data source. So, maybe there is going to be a sales tax added on to each of these products. And so
what I want to do is see what the sum of profit is with that 15% sales tax added. Well, I could create a
Calculated Column to see this information. So, let's click in sum of profit, up to PivotTable Analyze, and
in the Calculations group, we have a drop down here called Fields, Items & Sets.

And the first thing that we have in here is a Calculated Field. So, this is going to open up the Insert
Calculated Field dialog box, the first thing we need to do is give our Calculated Field a new name. So,
this is going to be basically the heading of this column. So, I'm going to say that this is Profit + Tax.
And then we can construct a formula.

Now this Formula Bar doesn't work quite like the Formula Bar in Excel for a couple of different reasons.
For example, if I was to start typing in here, something like an =IF, notice that I don't get my arguments
underneath, which does make it a little bit more difficult to create a formula. The other thing that you
can't use in formulas when you're inserting a Calculated Field is you can't use cell references. You have
to use the field headers, and you'll see all of the fields down below.

So, if I want to create a Calculated Field or new column, which shows me the sum of profit plus the tax,
the first thing I need to do here is scroll through my fields list and find where we have profit. So, double-
click is going to add that field name into the formula area. So, I'm basically saying take the profit, and
then I want to add 15% onto that. So then I can do my calculation. So, multiplied by 1 + and we're going
to say 15%.

So, this is actually very similar to what you type into the cell if you're trying to perform the same
calculation. The only difference is, instead of using the field, you'll be using a cell reference to work out
what 15% was of that particular value. So now that we have our formula, let's click on Ok. And notice
that it adds a new column to the PivotTable called Sum of Profit + Tax. And we should find that these
values that we have in here is basically the sum of profit with 15% added on to the top.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Now the other advantage of using a Calculated Field is that it becomes a permanent field in this
PivotTable. So, if I wanted to use this field in another calculation, if we take a look at our PivotTable
fields, we have it there at the bottom; Profit + Tax. Now, it's worth noting that this will only be available
to use in this PivotTable. If I was to create another one, it's not going to be there. So, only applies to the
PivotTable that you're currently working on.

Now, what I want to do here is apply the same Number Formatting that I have on the Sum of Profit
column. So let's right-click, we can select Number Format from here, and then we can go in and apply
add Custom Formatting. So if we scroll all the way down, remember, Custom Formatting that we add
will be at the bottom. Let's select it, click on Ok, and I now have that column formatted exactly the
same. Let's add another Calculated Field.

Maybe this time, I want to find out what the profit is averaged across 12 months. So, I'm going to go
back up to PivotTable Analyze and select Calculated Field. I'm just going to call this Avg Profit. And
our formula again, it's going to be a very simple calculation. We need to use our fields so it's going to be
profit, and we'll just say divided by 12. And of course, there are all different kinds of calculations you
can do in here, not necessarily using just one field as we've done, you can use as many fields as you like
in your formulas. Let's click on Ok.

Once again, I need to apply the same Number Formatting. I’m gonna go to Custom, select the bottom
one, click on Ok. So now, I can see what the profit is for each of these products averaged across 12
months. So, I can see here very easily that for the USA, on average, the product Mandarin is generating
the most profit.

Now before we finish this lesson, I just want to show you another cool little trick that you might not be
aware of. If we take a look at the Sum of Avg Profit, you'll see that most of these are positive values.
But we do have some negative values in here as well, they're highlighted in Blue. Now what about
instead of seeing these values, I just want to see a symbol representation?

So, maybe a Green Up Arrow if it's a positive value, and a Red Down Arrow, if it's a negative value.
Well, let me show you a little trick that you can use here in Custom Formatting. So let's right-click in
this column, and go to Number Format, and make sure that we're on Custom.

Now I'm going to clear everything that we have out of this type field. And I'm going to define what I
want to display when the value in the cell is positive. And what I want to display when the value in the
cell is negative, and we're going to use some windows symbols for this.

So check this out, it's pretty cool. If we press the Windows key and the dot or the period, it's going to
bring up a list of emojis. And we have lots of different categories that we can search through, but I can

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

see that these are the two that I want to use. So for positive values, we're going to use the Up Arrow.
Let's close this pane down, separate with a semicolon and then define what we want to see for negative
values. Windows + . I'm going to use the Down Arrow for negative values. And I'm going to define the
color of these as well.

So the Down Arrow, I want that to show in Red. So within square brackets, I'm going to add the word
Red for my negative values. And for positive values, I want those to be in Green. Now if I just add the
word Green in here, the Green that you get isn't particularly a very nice Green. So let's click on Ok so
you can see what I mean.

So what I generally tend to do, if we right-click and go back into Number Format, is I don't use Green. I
use Color 10 and click on Ok. And now we get a much nicer Green that's a little bit easier on the eye. Of
course, what I could do is Ctrl + Shift + Down Arrow and maybe decide to center all of these and now I
have a bit of a different way of representing values in a PivotTable.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Creating a Calculated Item

Deb: In the previous session, we saw how we can add Calculated Fields to our Pivot Tables. And what
I've done since then is simply just rename the column headings of sum of adjusted profit and sum of
profit by month. Because what we want to look at in this session is its sister function, which is
Calculated Items.

Now a lot of people get confused between Calculated Fields and Calculated Items. So, I want to make
the difference between the two completely clear. So, if we go back up to PivotTable Analyze, and let's
take a look at our Calculated Fields again.

Now if I click the drop Down Arrow, you can see the two calculations or the Calculated Fields that I
have in here. And what you'll notice with these Calculated Fields is that you're using the fields in your
calculation. For example, when we worked out the adjusted profit, and we added 20%, we used the
profit field.

Now Calculated Items differ because not only do we have access to the fields, we also have access to the
items within the fields. So, what do I mean by that? Well, for example, if we take a look at our
PivotTable, the country would be the field whereas USA, Canada, Mexico, China, those will be the
items within the field.

So, if we want to perform a calculation in our PivotTable, where we're using the items instead of the
field, that is where we would select Calculated Item as opposed to Calculated Field. So, let's take a look
at an example.

Now if I look at the products that I have in each of the countries, maybe I'm only really interested in the
product, Royal Oak. So maybe, I want to see the percentage of the total profit that Royal Oak accounts
for. Now because the calculation I want to do is on Royal Oak and not on the field, which would be
product in this case, I need to add a Calculated Item instead of a Calculated Field.

So, I'm going to make sure that I'm clicked in the product column, up to PivotTable Analyze, and back
into Fields, Items & Sets and take a look, the second one down is Calculated Item. Now, this looks very
similar to the Calculated Field dialog box. But the difference is not only do we have a list of fields, we
have a list of the items beneath those fields.

So, if I was to click on country, I can see all of the items within that field, region is the same, product is
the same. So now, I can perform calculations on specific items, as opposed to just on the field as a
whole. So, what calculation or what formula are we going to use to work out what Royal Oak is, as a
percentage of the whole?

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Well, the first thing we need to do is give our formula a name. So, I'm going to call this let's just call it
% Sales and I'm gonna say RO for Royal Oak. So for this formula, we're gonna go down to where we
have product, and we want to select Royal Oak. And to work out the percentage, we need to divide that
by the total of all of the items. And we want Excel to work out the total first of all, so we're going to put
it in brackets.

And then we're simply going to select the rest of the fields and add them together. So we need Luxe,
Kensington, Mandarin, and then finally Burlington. Let's close the bracket and click on Ok. Now take a
look what's happened here, we now have that new Calculated Item showing at the bottom of each of the
groups we have % Sales RO. But if you take a look at the values currently, it just says 0.

Now, this isn't too much of a problem, it just means that we don't have the correct Number Formatting
applied. We need to apply Percentage Formatting. Now I could go through and select each one of these
and apply Percentage Formatting. But a much easier way of doing this is to put all of the totals together
and format them all in one go.

Now, a simple way to do this is to go back to our PivotTable fields and simply drag country beneath
product. And what that's going to do if we scroll down to the bottom is put all of those values together
for the % Sales RO. So then, it's a much simpler process to select them all and simply change to
percentage. Now one of the things I'm going to do whilst I'm here is that I can see that I still have
Argentina at the bottom here. If you remember we added that in one of the previous lessons.

Now we don't actually need this. So let's go back to Data. I'm going to jump all the way down to the bar
bottom Ctrl + Down Arrow, and let's just delete out Argentina because we don't actually need that in our
analysis. Now it's worth noting that when you do make a change to the original source data, if you want
to update the PivotTable, all you need to do is right-click and choose the Refresh button. And notice
now that Argentina has disappeared.

So now that we have our percentages applied, we can drag the country field above product again to put it
back into its original position. And now we can see the percentage of the sum of profit compared to the
total for Royal Oak is 18%. Now, one final thing worth noting about Calculated Items, and this is pretty
much the same for Calculated Fields as well.

If you want to delete them, you need to go back into Calculated Items or Calculated Fields. Any
Calculated Items that you add don't appear as a field in your PivotTable that you can remove. You need
to select them go back up to Fields, Items & Sets, and go back into Calculated Item. So, if I wanted to
delete the % Sales RO, I need to select it from the drop down, and then I can click on the Delete button.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

I also have a Modify button up here as well if I wanted to make any changes to this. And this is pretty
much the same for Calculated Fields as well. If you want to delete a Calculated Field, simply select it
and then choose it from the drop down, and click the Delete button.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Solve Order

Deb: In this lesson, we're going to explore Solve Order. And this may or may not be a tool that you've
heard of, but it is very much related to what we've been covering in the last two lessons; Calculated
Fields and Calculated Items.

Now what Solve Order basically does at a high level is it tells Excel the order in which to perform
calculations. So we're going to look at an example, I'm going to show you what it looks like when you
haven't got your Solve Order correct, and then I'm going to show you how we can fix it.

Now to do this, I have changed the data set very slightly. If we go back to the Data tab, notice that I've
added a brand new column, Column D. And this column is showing me the status of this particular
order. So, each item or each record will either have a status of Active or Cancelled.

Now, if you ever do add more columns or more information into your PivotTable, in order to get your
PivotTable to update and be able to use that new field in other Pivot Tables, you need to refresh your
PivotTable data. And there are a couple of ways that you can do that. You can simply right-click in the
PivotTable and click the Refresh option. Alternatively, you can jump up to a PivotTable Analyze, and
you have a Refresh button just here.

Now, let's click on Refresh. And if you take a look at the PivotTable fields, we now have that status field
that we can use. And for this example, I'm going to completely change the way that we're summarizing
our data. So, I'm pretty much going to remove all of these fields that I've added previously. And we're
going to add the region in columns. We're going to have these status in rows, and I basically want to
count how many orders are active and how many are canceled for each region.

So, I'm just going to drag the profit down into the Values area, and then change the way we're
summarizing. So let's go to Value Field Settings. And we want to do a COUNT instead of a SUM. And,
I'm also going to turn off grand totals for the rows. So, we want to show them for the columns only. So,
this is pretty much what I was aiming for.

Now if you recall, we have about 700 rows of data. So theoretically, if I add up all of these, and all of
these, I should get 700. So I can see that these ones added together, if we take a look at the Status bar
that is 44. And if we add all of these together, it is 656. So, that gives us a total of 700.

So, what I want to do is basically add another Calculated Item, which tells me as a percentage, how
many orders have been cancelled for each region. So we're going to click in the status column, up to
PivotTable Analyze, and we're going to choose Calculated Item. Because the calculation that we want to
do isn't on the Status field, it's on the Items beneath; active and canceled.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

So, we need to give our formula a name. So I'm going to call this CancelRate. And then we can type in
our formula. So how do we work out the canceled as a percentage of everything? Well, we just need to
double-click to select cancelled. And we need to divide that by (Cancelled + active). And we put this in
brackets because we want Excel to do the addition first of all, let's click on Ok. And now you can see
that Calculated Item at the bottom there.

Now we need to apply some formatting. So let's select these cells up to the Home tab. And we're going
to apply Percentage Formatting. And I'm actually just going to take those decimal places up to one. So
now, I can see that for North America for example, the CancelRate is running at 7.6%. And I can also
see that the region with the highest amount of canceled orders is Australasia. So, now that I have this
Calculated Item, I'm going to add a couple more.

Maybe I want to separate this data into North and South. So maybe North America, Asia and Europe
will belong to the North group, and Australasia and South America will belong to the South group. So,
really, I'm just separating these into rough regions of the world. So, then I'm going to be able to see the
CancelRate for North and South. So I'm going to click in my region area, and let's add another
Calculated Item. So this one, we're going to call North, and I want this group to be a calculation of North
America + Asia, + Europe.

Now because I want to do one of these for South as well, instead of clicking Ok, and having to come
back into here, I'm just going to say Add, and then I can go straight into my next one. So this one is
going to be South, I'm going to delete out what we have there. And then we can go back to region. And
this time, we want to have Australasia + South America, and click on Ok. So now, notice we have two
more columns at the end here for North and South.

So the North one is doing a SUM calculation of North America, Asia, and Europe. And South is doing a
SUM calculation of Australasia and South America. Now, to make this a little bit easier to read, I'm
going to drag North so that it sits next to the regions that belong to it. So, let's move it across and place it
next to Europe. And then we're going to have South at the end.

Now notice a bit of an issue here, the CancelRate for North is showing as 17.2. And that's because if we
take a look up in the Formula Bar, it's simply doing North America + Asia + Europe. So, it's adding
together all of these CancelRates to arrive at this figure. And the same thing here for South we have
14.3, which is basically a calculation of these two cells.

Now, we don't really want it to do this, because we want to see North as an overall percentage of the
total. So, we don't want it to add up these values. Now this is related to the Solve Order. So, if we go up
to PivotTable Analyze, and go into Fields, Items & Sets, we have a Solve Order option. And this is
going to show me all of the Calculated Items that I have in this PivotTable. You can see right at the top,
we have our CancelRate, and then we have our formula for North and South.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

So currently, Excel is calculated from the top down. So it's working out the CancelRate, first of all, and
then it's doing the North and South calculation, which is why it's adding up all of the CancelRates. So
basically, what I want to do is just reorder these items, so the calculation performs differently. And
effectively, I want it to perform the CancelRate calculation last. So, I'm going to select this top item, and
I'm going to move it down so that the North and South calculations are performed first.

So, now if we click on Close, notice these now update and look a little bit better. We can now see the
actual percentage or the actual CancelRate for the North Region in comparison to the whole and the
same here for South. So, that Solve Order can really affect how your calculations are looking.

So, if you are using multiple Calculated Items in your PivotTable and something's not quite looking
right, it's not working quite correctly, it's always worth jumping into Solve Order and checking the order
that these items are being calculated in.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: GETPIVOTDATA

Deb: In this lesson, we're going to be taking a look at the extremely useful GETPIVOTDATA Formula.
And if you've never used this formula before, then you're in for a treat, because this can come in really
handy.

Now, what GETPIVOTDATA does essentially is it allows us to extract information that's stored within
a PivotTable and place it somewhere else on the worksheet. So, you might be thinking to yourself, okay,
that sounds fine. But why would I want to do that?

Well, most of the time, when you create a PivotTable, you normally want to analyze that data using a
PivotChart. Now, Pivot Charts are great, but they do have a lot of limitations, there isn't as much
flexibility and we can't do as many things with Pivot Charts that we can do with just regular Excel
charts.

So it might be that you want to use pivot data in a chart, but you don't necessarily want to use a
PivotChart, you just want to use a regular chart. Because we've already seen in previous lessons, we
can't use every single chart type when we have PivotTable data. For example, Map Charts can't be
created from pivot data. You have to extract all of the information out of the PivotTable, and then create
a regular Excel Map Chart.

Now, everything that I've said there is quite a lot to take in without seeing an example. So let's start out
by taking a look at our data. Currently, I just have it in an Excel table. And it's just some categories and
some products and the amount of revenue that they've generated over a 12-month period. And you'll
notice that these months repeat throughout the year. So, I'm going to create a very basic PivotTable
based off of this data.

So, let's jump up to Table Design and Summarize with PivotTable, I'm going to place it on the existing
worksheet, and let's just put it in cell G4, and click on Ok. So, let's build something that's really simple.
We're going to put the month in rows, and we're going to grab the revenue and put that into values. And
let's straightway apply some Number Formatting. I'm going to go for Number, let's use a 1000 separator
and take those decimal places down to 0. And one last thing I'm going to do here, I'm just going to turn
off grand totals because we don't need those.

So currently, this PivotTable is aggregating the sum of revenue by the month. And because we have
months repeated in this column, it's just aggregating it all together. For example, all the January's are
combined into this top value, this top sum. So, now that we have our PivotTable. And let's create a very
quick PivotChart. And we're not going to reinvent the wheel here, we're going to do a very basic
Column Chart.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

So let's just choose Clustered Column. And let's just do a little bit of tidying up just here, I'm going to
just remove the legend. So let's delete out that Text Box. I'm going to hide the field buttons. Let's add a
quick Chart Title. So this is going to be Sum of Revenue by Month. And I'm going to hold down my
Shift key and drag this title across to the left-hand side. Because what I want to add here is a Slicer so
that I can filter this chart by the category.

So with the chart selected, up to PivotChart Analyze, and we're going to insert a Slicer for the category,
let's do some formatting on this Slicer. Now I'm going to change the Slicer Style, let's make it gray. I
also want this running horizontally. So let's go to the Columns area, and take this up to 4. I'm going to
drag that out, drag it up. And I'm going to right-click, and we're going to go into Slicer Settings and just
deselect display header. And let's just resize the bottom of this. And I think I'm also going to remove the
border from this Slicer.

So we're going to go up to Slicer Styles. Let's duplicate the Style and give it a name. So, let's just call it
Custom Slicer. And we'll call this gray. I'm going to change the whole Slicer, let's format it and on the
borders tab, we're going to select None, just to remove that border. So now, we just need to apply our
new Custom Slicer Style. And then when I drag that onto the chart, it kind of has that effect of being
part of the chart.

Take a look at what my data currently looks like. I have all of my data running from January to
December. But if I click on Home, notice what we get; January, February, March, and we don't have the
rest of the months. What about if we click on Kids?

Well, for Kids, we only have data for October, November and December. And so those additional
months have been removed from the PivotTable. The same if I click on Women’s wear, we have data for
February, June, July and September, but we can't actually see the other months.

Now, the way that I would actually like this to work is that even if the month doesn't have data for a
specific category, I still want to see all of the months listed out at the bottom. And this is one of the
limitations of Pivot Charts, because it's always going to feed off of your pivot data. And as I select items
in my Slicer, the PivotTable updates. It’s only going to show data for those particular items. And that's
what displays in the chart.

So I'm going to do this in a slightly different way, I'm going to use the GETPIVOTDATA Formula to
extract information for all of the months. And then we're going to build our chart from there. So, let's
right-click and just clear the filter from category to put everything back again.

Now over on the right-hand side, I've just set up a data preparation table. And this takes on a very
similar structure to my PivotTable, I just have my months listed out. And then I have some cells here for

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

the revenue for each of those months. Now one thing to note is that currently in the PivotTable, even
though I'm displaying everything, I don't actually have any data for August.

So, when I use the GETPIVOTDATA Formula, I would expect that when we get to August down here,
I'm not going to get any values, or I'm gonna get some kind of error. But that's fine, we'll deal with that
in a moment. So, what we can do is we can say = at the top here, and now all I need to do, I don't even
need to type in or know the GETPIVOTDATA Formula.

Because, as soon as I tried to link to the revenue for January, Excel automatically adds the
GETPIVOTDATA Formula. And take a look of what it's doing. It's telling me that it's going to grab the
revenue, that's the KPI that we're using here. It then has cell G4, and that's an absolute cell reference.
And cell G4 is basically just the start of my PivotTable. We then have month hardcoded, and then
January hardcoded as well.

Now this is really very important because this is going to affect how your GETPIVOTDATA Formula
calculates for the other months. So if I hit Enter here, it's going to do exactly what we would expect; it's
going to pull through the sum of revenue for January. But what about if I now try to pull this down to
copy that formula? It's just going to repeat the same thing over and over again. Now, why is it doing
that?

Well, let's double-click on February and take a look at what it's doing. All of these values are hardcoded
into the formula. So, every single time I pull this formula down, it's still referring to the month of
January. So, what I want to do is make this dynamic by replacing January with a cell reference. So, let's
come out of here and go back to the first one, because what I can do is select where we have January,
and I can choose this cell just here instead, M4. Let's hit Enter.

Now if I pull this formula down, it's going to update with the correct figures. And we can compare them
across in the PivotTable. So, that is how you can make this formula dynamic, you need to replace that
hardcoded text with a cell reference. Now as I expected, when we get down to August, we're getting a
#Ref! Because, we don't have any August information in the PivotTable. We can deal with that very
simply by just wrapping the GETPIVOTDATA Formula in an IFERROR Formula.

So, let's go up to the Formula Bar. And let's type in IFERROR. The value is going to be generated by
GETPIVOTDATA. So now, we just need to define what we want it to say if there's an error. Well, I
want it to be just a blank cell so we can do 2 quote marks and close the bracket. Let's re-copy this back
down, double-click, and that looks a little bit better.

So the last thing I'm going to do here is apply some Number Formatting. So let's add a comma separator
and take those decimal places down. Now because these formulas are intrinsically linked to the
PivotTable, it means that when we use our Slicer, which is also linked to the PivotTable, these values

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

are going to update. So if I click on Electronics, you can now see that it's just displaying values
wherever it finds them in the PivotTable. If I click on Home, we get the same thing.

Now one of the benefits of using the GETPIVOTDATA Formula is not only does it update when we use
our Slicer. So now, you can see just the values for Electronics. And if I click on Home, it also updates.
But it also means that if the layout of the PivotTable changes, the values will be retained. For example,
the revenue for January is currently coming from the PivotTable over here. So the revenue is effectively
in cell H5.

Now if I was to make a change to this PivotTable, so let's bring up the field list and maybe add
something like category, the revenue for January is still in cell H5, but the revenue for February has
moved down to cell H8. But despite the fact that this has moved, the total is still correct in our
preparation table. So now, we can delete out our original Pivot Charts, and we can build just a regular
chart using the data preparation table.

So, let's select everything, let's jump up to Insert, and we're going to insert just a 2-D Column Chart.
Let's drag this down, drag it across, I'm going to grab my Slicer, and let's bring that to the front. So now,
with this chart, you can see that we have all of the months running across the bottom whether they have
data or not. You can see August there has no data but we can still see it.

The same thing if I click across to Women’s wear, I get all of the months, but I'm only seeing bars where
the data is relevant. And for me, sometimes this looks a lot better because the PivotChart isn't constantly
expanding and contracting depending on how many items of data it has, and it also enables me to see
where the gaps lay. So, GETPIVOTDATA is a great way to extract values from a PivotTable, and then
use those values to create a more flexible chart.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: GETPIVOTDATA Dependent Data Validation Lists

Deb: In this lesson, I'm going to show you how you can use the GETPIVOTDATA Formula in
conjunction with a Data Validation drop down list. So, we're using the same data that we used in the
previous lesson. And this is just our revenue data for different categories and products over a 12-month
period. I've created a small PivotTable that just shows the category and the sum of the revenue.

Now, maybe what I want to have is a Data Validation drop down list. So I can choose a category and
have it produce the sum of revenue. And this is a really simple thing to do, we only really need to
change one thing in our GETPIVOTDATA Formula.

Now, before we get to that, let's just set up our labels. So, I want to have the category just here. And then
underneath, let's say, revenue. And let's give those just a little bit of formatting. Let's make them a bit of
a darker Pink with some White text. And we'll also make that Bold. Let's use our Format Painter to copy
that to revenue. So, I essentially want my Data Validation drop down list to be here in cell K4. And this
needs to be populated with all of the different categories.

So, to do this, I'm going to go over to here and we're going to use our UNIQUE Function, just to extract
those unique values from the original table. So, we're going to select the categories, close of our bracket,
and hit Enter, and now we have our list. Let's select them all and do copy and paste shrink, so Ctrl + C to
copy. This time, I'm going to right-click and choose Paste Values from the menu instead. So, these are
the items that are going to go into my Data Validation drop down list.

So, let's click back in cell K4, up to data into Data Validation. We want to create a list and our source is
going to be the values in Column O. Let's click on Ok. So now, I can choose my different categories
from this handy little drop down. So, how do we get it to pick up the revenue from the PivotTable?

Well, once again, if we press =, let's click the sum of the revenue for Women’s wear, which is what we
currently have selected. Remember, this formula revenue is the KPI that we're measuring. So, in this
case, the sum of the revenue, $F$4 is the start of the PivotTable, then we have the category that we're
returning, which is Women’s wear.

So, all we have to do here is replace where it says Women’s wear with the cell reference, where we have
our Data Validation list. Let's press Enter, and it returns the correct result. Let's apply some formatting.
So, we want a comma separator, and we want to take those decimal places down. And if I choose
something else, let's go for Home, you can see it's pulling back the correct value.

Now remember, when you set up your Data Validation in this way, this revenue figure is always going
to rely on the fact that you have the categories in your PivotTable. And what I mean by that is, if I was

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

to remove category from rows, we’re then going to get an error in the revenue column. If I put category
back, then it fixes itself.

But if I was to add month into the rows, despite the fact that the cell where the revenue is situated has
moved, because we're using that GETPIVOTDATA Formula, it remembers. So, it's still going to update
correctly. So, if I now select Electronics, I should expect that Electronics, the total revenue is 88,374.
So, that's all fairly simple and straightforward to do.

But what if I wanted to move this on a level and create a Dependent Data Validation drop down list?
And what I mean by that is that maybe when I select Electronics, I then want another drop down list that
allows me to choose the month, and then it's going to produce the sum of the revenue.

Now I'm just going to show you this for Electronics. And then if you want to set up Dependent Data
Validation drop down lists for the other categories, Home, Kids and Women’s wear, you can have a
practice doing that on your own, because we do it in pretty much the same way. So, I'm going to add
next to Electronics, we're going to add another label, and this time it's going to be for month. Now, let's
just apply the same formatting, we use our Format Painter, and click on month.

Now in order for this to work, we need to have a reference point. Because notice that for Electronics, if
we take a look in the PivotTable, we don't have values for every single month of the year, we only have
values for January, February, April, and May. So, I don't want to all of the months showing in my drop
down list, I want it very much dependent on the category that I've selected. So, if it's Electronics, I just
want these months. If it's Home, I just want these months, so on and so forth.

As I said, we're just going to set this up for Electronics. So what I need to do is do a little bit more
preparation and create another list. So over in Column P, I'm going to add a title of Electronics, and then
I'm just going to list out those months, you could copy and paste them in, I'm just quickly going to type
them because they're just a few of them. So, we have data for January, February, April, and May.

And what I'm going to do here is I'm going to create a named range. And I'm going to use the heading as
the name for the range. So, Electronics in this case. So, let's select the range, let's go to defined names
and click Create from Selection. I want to use the top row as the name for my range. Let's click on Ok.
So now, this range of cells is called Electronics.

So now, when I set up my Data Validation drop down list, I want it to indirectly reference what we have
in cell K4, in this case, Electronics, and kind of match it to what we have over here. So, it's going to
produce me a list of these particular months. So, we can do this by using the INDIRECT Function. So,
let's go up to Data Validation one more time.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

We want to create a list, but this time our source, we're going to add a formula, and we're going to use
the INDIRECT Formula. And we want to indirectly reference our named range Electronics using
whatever we have in cell K4. Let's close the bracket and click on Ok. And now check out what we have
in the drop down. I'm seeing just the months from the Electronics named range.

So now, if I select, let's say February, what I would expect it to return in the revenue is the value that we
have here 11,702. But it's not, because we need to make a change to GETPIVOTDATA Formula.
Currently, if we look at the formula, it's just pulling back information based on whatever category we
have selected in cell K4, it's not recognizing the month. But we can very easily change that simply by
modifying what we have in this formula.

So, let's add a comma. And then in quote marks, we're going to put month and we want to reference this
cell just here. Let's hit Enter, and now we get the correct result. Let's choose a different month, let's go
for May, let's make sure that that is correct. Yes, it is. And even if I was to change the fields again. So, if
I add Product into here as well, you can see that it still keeps that total in place.

Now we've only set this up for Electronics. So, if I choose a different category, we're going to get an
error. So, what you could do if you wanted to practice this was go through and set up three more named
ranges for the other categories, and then modify that GETPIVOTDATA Formula so you have a really
dynamic Dependent Data Validation drop down list.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Creating a Dynamic PivotChart Title

Deb: In this lesson, I'm going to show you how you can create a dynamic PivotChart Title. And I
thought I'd start out by showing you exactly what I mean so you can see what we're aiming for. So,
currently on this page, I have a small PivotTable that showing the sum of gross sales for each of the
different products. And there's a couple of things I want you to notice here.

The first one is the formatting that I have on the sum of gross sales. Notice that I've changed this to a
Million Formatting. So, I'm going to show you how you can do that using Custom Formatting. But the
real thing we're interested in here is the PivotChart, and in particular, the Chart Title. So, this PivotChart
has been created based off of this PivotTable.

Notice the title currently says Total Revenue, and then it lists out all of the products. Because currently,
I'm viewing all of the data for all of the products. But what if I was to filter this PivotChart data, so
maybe I'm only interested in seeing the data for Vermont, Luxe, and Kensington, so I'm going to
deselect everything else.

Now notice that my PivotTable updates, my PivotChart updates, but also the title of the chart updates.
So now it makes sense in context of what we have below. It says Total Revenue Vermont, Luxe, and
Kensington. And this is what we call a Dynamic PivotChart Title, it changes depending on what the
chart is displaying.

Now we can achieve this by using a combination of Pivot Tables and TEXT Functions. So, let me show
you how I did this. So we're back at just our plain data set. Let's quickly insert a PivotTable. I'm going to
put it on a new worksheet, let's click on Ok. And I'm just going to drag that worksheet across and we'll
rename this PivotTable.

Now we only want a small data set here, I want to show the products, and I want to show the sum of the
gross sales. And I'm actually going to change the design of my PivotTable. Let's make that this Dark
Blue color. Now if you recall, in the completed example, I'd applied a different type of Number
Formatting to the sum of gross sales. And that is Millions Formatting. And sometimes if you have very
large numbers like we do have here, it can be a bit nicer just to format them as thousands, millions,
billions if required.

So, let me very quickly show you how to do that. We do it using Custom Formatting. So we're going to
right-click, go to Number Format, and straight into Custom. Now the format that we want to use here is
we want it to say 0.00. And then I want two commas, notice how that changes in the sample. And then I
need to specify that I want Millions Formatting. So I'm going to put an M after it.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

So, check out what that looks like. Instead of that big long number, it's now kind of rounded it up to 28.7
million. And if I didn't want that ending 0 again, remember, we can just delete that out. And we get that
format instead. So let's go with that. Click on Ok, and that now looks a lot neater. Let's now create our
PivotChart.

We're going to go up to PivotTable Analyze, into PivotChart, and I'm going to create a Bar Chart for
this. Let's click on Ok. Now I'm going to do a bit of tidying up here, we're going to hide all field buttons
on the charts, I'm going to remove the legend don't really need that. And I think I'm also going to change
the colors that I'm using here. So, let's go for something like that, Colorful Palette 4. Now, I'm not going
to do anything to the Chart Title, because this is really what we want to focus on in this lesson.

But what I am going to do is let's take that gap width down and make those bars a little bit wider. And
then we can add some Data Labels. And we're going to put those on the inside end. And let's make them
stand out a little bit, let's make them Bold, and we'll put those in White. So now, I don't really need this
horizontal axes at the bottom. So, we can delete that out.

The final thing to do here is to add a Slicer. So up to PivotTable Analyze and Insert Slicer. And I want to
use the Product Slicer just here. And I'm going to put that just underneath I'm not going to bother
formatting this at this stage. The only thing I'm going to do is just make it match a little bit better. And
we'll apply a different Slicer Style. So currently, if I select things from this Slicer, the chart updates, but
the title doesn't really do anything. So, we want to change that.

Now the way that I like to do this, because we do have some preparation to do to get this Dynamic Chart
Title to work, I like to add a Helper Sheet. And all that entails is adding a new worksheet at the bottom,
I'm going to double-click and rename this helper. And remember, you can always hide these at the end if
you don't want people to see your workings out.

Now, I'm just going to add a little heading here. And this is going to be called PivotTable. And let's just
underline that as well. Now what I'm going to do is I'm going to select the PivotTable, Ctrl + A, Ctrl + C
to copy, and we're just going to Ctrl + V to paste it onto this worksheet. And we're going to do a little bit
of rearranging here. So, let's go back to PivotTable Analyze, and make sure we have our field list up.

Because what I want, essentially are all of the products on one row not listed vertically down the page.
So I'm going to move product across to columns, I also don't need the actual sum of gross sales, I'm only
interested in the product labels. So, I can remove sum of gross sales from values. And now I just have
those headings. I also don't need the grand total. So, let's make sure that we turn that off. So, that's pretty
much the format that I want. Because this is going to be used to generate add dynamic chart labels.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Now the second thing we need to do is we need to add a Slicer. So, let's put a little heading in here and
underline it. And once again, I'm going to go back to our PivotTable workbook Ctrl + C to copy this
Slicer, Ctrl + V to paste it in. So, this is going to help us test our dynamic headings.

The final thing we need to do at the bottom is construct the formula that we need to create this Dynamic
Chart Title. So we're going to add a heading called Title, and let's underline it to be consistent. And the
first thing that I'm going to output to this cell is what exactly I want it to say. So, I want it to say Total
Gross Sales. And then I want it to have a space dash space. And then the product or products listed
depending on what's been selected in the Slicer.

So this is the first part Total Gross Sales, the next part of this title is going to be generated using the
TEXTJOIN formula. So, we're going to type in =TEXTJOIN. And this is kind of similar to CONCAT,
which we're also going to use in a moment. Now, the first argument with TEXTJOIN is delimiter. So,
when we have a case where the title contains multiple products, and maybe it’s Total Gross Sales for
Royal Oak, Vermont Lux, Kensington, how do we want those different products separated?

Well, I want to separate them with a comma space. And that needs to go inside quote marks. The next
argument is if we want to ignore any empty cells. Now, we don't have any empty cells. But it doesn't
hurt to put a TRUE in here. And then we specify the text. Now, the text that we want it to pick up is
whatever we can see in Row 5.

Now remember, what we can see in Row 5 is going to change depending on which product has been
selected in the Slicer. So, if I close the bracket and hit Enter, currently, it says Royal Oak comma space,
Vermont comma space, so on and so forth. But if I just select Royal Oak, notice how that changes down
here. If I hold down Ctrl and select Royal Oak and Luxe, that's what I'm getting. So hopefully, you can
kind of see how we're building this title.

The final thing to do is basically CONCATENATE cell A27, and cell A29 to get our full title. So for
this, we're going to use CONCAT. Text1 is what we have in A27. And I want to separate total gross
sales from the actual product names with a space dash space. So, we need to specify that in quote marks
space, dash space, close quotes. And then we want our second piece of text which is whatever we have
in cell A29. Close the bracket, hit Enter. And would you take a look at that, that's exactly how I want my
title to look.

And if I just make a couple of selections in the Slicer, notice that this title dynamically updates which is
perfect. The only thing left to do now is go back to our PivotTable, and we need to link the Chart Title
through to this cell down here. Now, we can select what we have in there. And then in the Formula Bar,
we can say =, and then we can just link to cell A31, and hit Enter. And take a look at that.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Now, it's a little bit large at the moment, so let's just reduce the size. But we should find that now when
we make selections in our Slicer, that title is going to update to reflect what we're actually seeing in the
chart.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Add Dynamic Series

Deb: In the next couple of lessons, I just want to show you some cool things that you can do with charts.
And we're going to start out in this lesson by taking a look at how we can add a Dynamic Series to add
charts. Now, what is a Dynamic Series you might be asking?

Well, I thought I'd start out by showing you an example of the finished results, you can understand what
we're aiming for when we're building this. So currently, I have a small PivotTable that's just displaying
some gross sales data for North America, USA, Canada, and Mexico. And I have this data represented in
a Stacked Column Chart.

Now the way that I'm displaying this data in this chart is slightly different. Notice that I have the years
2018 and 2019 at the side here, and everything is completely dynamic. So if any of these bars change, so
for example, let's put Mexico up to 20 million. Those bars resize, but the labels for 2019 and 2018 stay
in the middle of the stack. And this is what we call a Dynamic Series.

So in this lesson, I'm going to show you how you can add these into your charts because it is a little bit
of a process. But I thought it was worth showing it to you because it also shows you a lot of other
advanced charting techniques. So, let's get going.

So, let's start out by building our PivotTable, we're going to go up to Table Design, and select
Summarize with PivotTable. And we're going to put this PivotTable on a brand new worksheet, and let's
give it a name, in fact, I'm going to call it Pivot Chart.

So, now we can build our PivotTable. And for this, I'm going to have country in rows, I'm going to grab
date and put that in columns. And we're going to have gross sales in values. Now, I want to refine this
date a little bit, because I only want to see the year. So let's remove quarters, and date. And I also am not
interested in all of the countries. So let's apply a filter and just select USA, Canada, and Mexico, because
I only want to see data for North America.

I'm going to remove grand totals from both the rows and the columns. And this is pretty much the data
that I want to use. Now let's just apply a little bit of Number Formatting. I'm going to right-click, go to
Number Format, I'm going to apply my Custom Millions Formatting which I have at the bottom here.
And that's pretty much what I want to create my chart off of.

Now remember, when it comes to creating more complex charts, Pivot Charts have a lot of limited
capabilities. So, we're basically going to use GETPIVOTDATA to extract this data from the PivotTable.
So, I'm going to type in 2018 and 2019, and then we're just going to grab these labels Ctrl + C, and then
we'll Paste Special, and we'll transpose those, so they're running horizontally across the page.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Now I need to use my GETPIVOTDATA in order to pull those values into this little table. So, we're
going to select the value for USA 2018, and we're going to update our formula so that it's truly dynamic.
So, we're going to replace where we have a reference to USA with a cell reference instead, so M2. Now,
I want to be able to drag this formula down and across. So, I need to apply some mixed referencing here
and just lock the row. I can then replace 2018 with another cell reference.

And again, we need to do some mix referencing and this time, we need to just lock the column. Let's hit
Enter. And now we should be able to drag this down and drag this across and get our results. Now let's
apply our Number Formatting, Ctrl + 1. We're going to go into Custom and we're going to apply our
Millions Formatting. So, this is the data that I'm going to build my Stacked Column Chart from.

So let's select it, up to Insert, we're going to click the drop down for a Column Chart, and we're going to
use this one just here a Stacked Column Chart. Now let's give our chart a little bit of a title. So, let's say
Gross Sales. And this is for the North American region. So Gross Sales - North America. I'm going to
add some Data Labels to my chart. So, let's click those. I'm fairly happy with the positioning but I do
want to change the font color to White on here.

So this is pretty much how I want my data to look. But instead of having 2018 and 2019 in the legend, I
want it down the side here next to where we have Mexico. And I want the labels for the years to appear
dead in the center of the bar at the end. So that, if any of this data updates, the label is going to be
dynamic, and it's going to move with the bar and always be in the center. So how do we achieve this?

Well, effectively, because we want to add our Data Labels at the side here, we're adding another series.
Now I don't want to add another column, I basically just want to set up some marker points where I can
add my Data Labels that say 2018 and 2019. And those marker points need to be exactly in the middle
of the bar. So, we need to think a little bit outside of the box here when we're setting this up.

Now, if we think about all of the different chart types in Excel, which one gives me markers as opposed
to bars? Well, a Scatter Graph or a Scatter Plot does that. So, what we can basically do is add another
series for 2018 and 2019. And instead of adding a bar, we can add marker points. Now when you want
to add a Scatter Plot to your chart, you need to provide the chart with x and y values.

So we're going to add this additional data into our little table at the top here. Now I'm going to give this
a title, we're just going to call it Data Labels. And we're going to say x, and y. Now our x values are
going to define the position of our markets. Now I want my markers to appear after Mexico, kind of
over here. And bear in mind that in Excel positions are defined by numbers.

So for example, the USA is basically in position 1, Canada is in position 2, Mexico is in position 3. So,
if I want to add some markers after Mexico, those are going to be in position number 4. So, my x values,
I basically want them to say 4. Now, because I want this to be dynamic and update if any of this data

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

changes, we're going to use a little formula to work out the position of our x values. So, it's always going
to be one more than the countries that I have.

So what we could do here is say COUNT, the countries, and +1. And that's going to give us our position,
which is number 4. I'm just going to link to that cell to get 4 in there as well. So we have our x values.
Now we need to tell Excel, where is the halfway point in each of these stacks? So again, we need to do a
little bit of a calculation. So we're going to say SUM, and we're going to do the sum of 03, and then
we're going to -03, but we're going to divide it by 2 to get the halfway point.

Now if I copy this down and apply some formatting, Ctrl + 1, let's apply our Millions Formatting again,
we get a result, which is pretty much half of this final value, because that's where we want to see our
markers after Mexico. So, they're going to appear halfway up the bar for 2018 and halfway up the bar
for 2019. Now that we have our x and y values, we need to bring these into this chart. So, let's click on
the chart, let's right-click and go to Select Data, we need to add a new series.

Now notice here, we don't get fields where we can enter our x and y values. Now don't worry too much
about that at the moment, we're going to start with the series name. So I'm going to say I want my series
name to be Data Labels, let's just select cell P1. And if you don't get two boxes to enter in your x and y
values, always just enter the y values first, and click on Ok. So now, I can see that new series called
Data Labels has been added to the legend and we have it at the top here.

Now currently, this doesn't look correct, because we haven't added our x values, and we need to change
our new series to a Scatter Plot. So let's right-click and go to Change Series Chart Type. Now this is
where we can look at each of our series at the bottom here, and we can define what type of chart we
want to use for each series.

So, I'm going to keep 2018 and 2019 as a Stacked Column. But I want to change my Data Labels to a
Scatter Plot and click on Ok. So now, because we've changed that to a Scatter Plot when we go to Select
Data, and if we edit the Data Labels series, we now have a space here to enter in our x values. Now
remember, this is going to define the position. So, our x values is this cell range just here, and click on
Ok.

So now notice what we have, we have, effectively another column on the end, but we have a Scatter
Plot. And it's quite hard to see the dots because we have Data Labels over the top. So, let's just delete
those for the time being so that we can see those dots. Now take a look at them, they're in the correct
position. We have them next to the Mexico bar and each dot is positioned halfway in the stack.

If the data for let's say, Mexico for 2018 was to change to let's say, 20 million. Notice that when the
chart updates, those dots move as well, those markers move, so everything is dynamic. Let's undo
because I don't want that at 20 million. And let's apply some formatting to these dots. Now, these are

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

fine, but they are a little bit far away from the bars. So, what I'm going to do here is where we have our x
values for the position, we're gonna go to the Formula Bar, and instead of +1, let's just say +0.5. And
that's going to move those a lot closer to the bar.

So now, I'm going to add my Data Labels to these dots. Let's select the Data Labels, format the data
series, and we want to make sure from series options, we're formatting Series, Data Labels, and Data
Labels. So now, from label options, we can choose what we want to display on this label. So, I want to
display a value from the cells. Because, I want these to say 2018, and 2019. So let's select from our
table, click on Ok. And I don't want to show anything else. So, let's untick those and click away.

Now again, I need to do a little bit of formatting just here. So, I think I'm going to change this back to
+1, and let's say +0.4. There we go. I think that looks a lot better. So now really, the final job I have to
do here is just removing this dot. I don't really want to see the dot, I just want to see the labels.

So, this is a simple case of selecting the markers, go up to Format, and changing it to No Fill and No
Outline. So now, we have our labels and if anything changes in here, these labels have been created so
that they're dynamic, and they're going to move with the rest of the data.

A couple of final things to do here, I'm going to remove the gridlines, let's just delete those out. And I
have no need for this legend so I can select it, press the Delete key, and now I have a fully Dynamic
Stacked Column Chart, with a dynamic data series.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Adding Totals to Stacked Column

Deb: In this lesson, we're going to take the skills that we've learned about adding Dynamic Series to a
chart, and I'm going to show you how you can add a Dynamic Total to a Stacked Column Chart. And
this is a really simple thing to do, particularly if you understood what we were doing when we were
adding Dynamic Series in the last lesson.

Now, what I have on this worksheet is just a very simple data set. We have years 2018 to 2021, we have
quarters, 123, and 4, and then we have just some random sales figures. So, the first thing I'm going to do
here is create a Stacked Column Chart based off of this data. So, let's select our data up to Insert, and
we're going to insert a regular Stacked Column.

Now I'm going to do a little bit of tidying up here. Let's start by just removing those gridlines. I'm going
to move the legend up to the top simply because that's where I prefer it to be. And we're going to add a
quick Chart Title that says Sales by Year and Quarter. And I also think I'm going to add some Data
Labels. And I'm happy with those being in the center of the stack. Now, what we're aiming to do here is
add the totals for each of the years right at the top of the stack.

Now remember, anything that you want to add into your charts needs to be a series in your data. So, we
want the totals. So, we need to add a calculation into our table, that's going to work out the totals for
each of the years. So, that's a simple calculation, we're just going to type in Total, and then we're going
to do =SUM, and we're just going to add up everything above, Ctrl + Enter to stay in the same cell, and
then I can drag that across.

Now notice I'm getting a little warning here. Now the reason why I'm getting that is because it's
recognizing that I have numbers that I haven't included in my SUM Formula. So it's seeing the dates or
the years at the top as numbers. And it's basically saying, ‘Hey, you haven't included these in the
formula’. Now that's okay, in this case, so I can simply ignore the error.

So, now I have my totals in the table, I need to add totals as a series into my chart. So, let's click on the
chart, right-click our mouse, and we're going to go into Select Data. Notice here we have all of our
current series Q1 to Q4, we're going to add a new series. Our series name is going to be Total, and I'm
just picking that up from the cell. And then my series values are going to be these values just here and
click on Ok.

Now notice what it does, it adds it as another stack right on the top. So, I basically have the totals
showing in this Blue stack. Now I don't want these to show as a stack, I just want them to show as a
number above the quarter stacks. So, this is where we need to go in and change the Series Chart Type.
Because, I want this to be a marker as opposed to a stack. So, let's select the stack, right-click, Change
Series Chart Type.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Now at the bottom here, I'm happy leaving Q1 to Q4 as a Stacked Column. But the Total, I want to
display as you guessed it, a Scatter Plot and click on Ok. So what this basically does is it puts a little
marker at the top of each stack. And you can also see that it's automatically added Data Labels for me
which reflect those totals.

Now, if you don't automatically get those Data Labels, you can simply click on the markers, format the
data series, and turn Data Labels on. Now I want to do a little bit of formatting here because currently,
they don't look particularly good, I want to show them a bit higher up.

So, let's click on the Data Labels, right-click and Format Data Labels. So where we have our label
options, I'm happy with the information that it's displaying. It's displaying the Total, but I want to
change the label position. So instead of in the center, I want to show them above which looks a lot
better. I'm also going to make these Bold so they stand out a little bit more.

So now that I've moved those up, it's a little bit easier to see those markers underneath. Now we don't
want to display these so we can do our old trick of simply changing the fill color. So, if we jump up to
Format, we're going to say we don't want any fill and we don't want any outline either. So now, that
looks pretty much perfect.

And of course, if you want these to be a little bit closer to the stacks, you can manually just reposition
them by dragging that Text Box down or up. And everything in here is completely dynamic. So, if we
make a change to the data, so let's go for 2020, let's make that 6000, you'll see that they move with those
stacks and remain at the top.

Now the final thing that I can see that's a little bit wrong here is that in that legend, we now have Total.
And I don't really want to see that I'm just interested in Q1 to Q4. So, click on the legend and double-
click again. And this will allow you to select the Total and you can just press the Delete key on your
Keyboard to get rid of it.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Exercise 07

Deb: In this exercise, we're going to practice some of the skills that we've learned in this section on
Advanced Pivot Tables.

So, the first thing that I'd like you to do is to create a PivotTable from this Service Desk Data. And I'd
like you to place that PivotTable on the chart worksheet. I’d then like you to summarize the Pivot Tables
so that we can see the count of the calls by state. And then I'd like you to turn off grand totals.

I'd then like you to insert a Slicer that filters by status. And I'd like you to apply some formatting to that
Slicer. So you can choose any Slicer Style that you like, or either maybe create your own Custom Slicer
Style. But I'd like you to ensure that the layout is all on one row, and that you turn off the heading.

I'd then like you to use the GETPIVOTDATA Function to export the information out of the PivotTable
and into Columns H and I. And once you've done that, I'd like you to create a Field Map Chart based off
of this table data.

And then the final thing I'd like you to do is use the Helper tab, where we have these headings in here
already to help you out, to create a Dynamic Chart Title that updates depending on if we've selected,
Closed, Open, or Pending from the Slicer. And I just want that Chart Title to say Count of Calls -, and
then either Closed, Open, Pending, or any combination of what you've selected. So, quite a few things to
do there. If you'd like to see how I did this, then please keep watching.

So, the first thing to do here is to create a PivotTable from the Service Desk Data. So, we're going to
jump up to Table Design, Summarize with PivotTable, and I asked you to place this on the existing
worksheet and that existing worksheet is chart. And we're going to place it let's just put it here in cell A.
Now the summary that we want to do is we want to see a count of all of the calls by state.

Now if we look at our data, basically each row, each record in this data set is a call. So, we can really
use any of our field headings in order to get the count. So we're going to drag state down into rows, and
I'm going to use status. Let's just drag that into values. And then I'm going to change these heading
labels. So let's change this to state, and this is going to be counts of calls.

The next thing we need to do here was turn off the grand totals. So up to Design, into Grand Totals, and
Off for rows and columns. The next thing I asked you to do was to add a Slicer and format it. So, we're
going to jump up to the PivotTable Analyze ribbon, we're going to insert a Slicer, and we want to filter
by the status.

Now the formatting that I asked you to apply was to make sure that the layout was all on one row. So, if
we jump up to the Slicer ribbon and go to columns, if I put this up to 3 and then drag it out a bit. I also

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

asked you to not display the header. So for this, we need to right-click and go into Slicer Settings, and
we can simply deselect this option just here. And then, the final thing I asked you to do was just to apply
a Slicer Style of your choice, and I don't really mind which one you choose. So, I'm just going to go for
this one just here. And let's drag this Slicer up to the top.

Next, I asked you to export the data in the PivotTable out to Columns H and I. And you can see I've
already added the columns there for you. Now the reason that we're doing this is because we want to
create a Field Map Chart and we can't create one of those charts based off of PivotTable data. So, I'm
just going to link to the cells for the state. So, we're going to type in = select the first one Ctrl + Enter.
And now we can drag that down to complete the others.

Now we want to grab the count of calls. So =, let's link to the cell. Notice in the cell we get the full
GETPIVOTDATA Formula listed out for us. But so that we can copy this down we need to make a
change to it and we need to substitute where it says CA for the cell reference instead. Let's hit Enter and
now I should be able to copy this down.

So now that we basically have a plain old table, it's not a PivotTable, we can create our Field Map Chart.
So, up to the Insert ribbon, into Charts and Maps, and let's choose Field Map. You can see it's
recognized that it's US data, and it's shaded the relevant states accordingly.

The final part of this exercise was to create a Dynamic Chart Title that updates when we make a
selection in the Slicer. So if I select Closed in this Slicer, not only do I want the PivotTable and the chart
to update to reflect that, I also want the Chart Title to reflect that as well.

So, I want it to say Count of Calls - Open if I've selected Open from the Slicer, or Count of Calls -
Pending if I've selected Pending. So we do this by combining some TEXT Functions. So let's first of all,
clear that Slicer, and jump on to the Helper worksheet.

Now, I've tried to help you out a little bit here by adding in some headings that I find quite useful. So the
first thing I want to pull across is the PivotTable. So I'm going to grab the PivotTable Ctrl + A, Ctrl + C
to copy, I'm just going to paste that somewhere up here. Now I want to rearrange the PivotTable fields,
because it's currently not showing the information that I need.

So, let's remove state from rows and count of calls from values. And instead, let's add that status into the
columns. That's what I want. I want Closed, Open, and Pending running in the row going across. Now, I
think I've just lost my titles as I did that. So, let's just add them back in.

Next, I want to copy across the Slicer. So let's grab that Slicer, Ctrl + C, and we're just going to paste
that over here. And this is really going to help us test that everything's working correctly. And then
finally, we can construct our title.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Now the first thing I'm going to type out is basically what's going to be consistent no matter what is
selected in the Slicer. So it's always gonna say, Count of Calls, space dash space. Next, I want it to pick
up whatever I've selected in the Slicer. So for this, we're going to use TEXTJOIN. What is the delimiter
that I want to use when I've selected multiple items? So, if I've selected Closed and Open, how do I want
those separated in the title?

Well, I want them separated with a comma, space. And that needs to go in quote marks. I'm going to
ignore empty cells, and then I just need to provide the text. So, my text is located in Row 5. Close the
bracket, hit Enter. Notice currently I don't have anything selected, it says Closed, Open, Pending. If I
was just to select Open, that's going to change to Open. If I was to select Open and Pending, I'm going to
get both of those. So, that appears to be working correctly.

The final step for this title is really just to CONCATENATE both of these pieces of information. So,
want my full Chart Title to say, Count of Calls, and then I want it to say whatever has been selected in
the Slicer. Close the bracket, hit Enter. And now you get an idea as to what that title is going to look
like. So now, if we go back to the chart, and double-click in the Chart Title, we should be able to link to
this Chart Title from here. So, if you go to the Formula Bar, notice I can't actually click in there to type
in an = sign.

Now if you have this problem, and I think this might specifically be related to Map Charts, what you can
do is simply turn off this Chart Title, and add your own Text Box. So, let's do that. Let's go to Text Box,
let's draw our Chart Title, and now we should be able to click in the Formula Bar and type in =. Let's
link to our title cell, Enter. There we go. We can drag that out, and we can reformat as necessary.

Because this is a Text Box it will have a border around the outside. So, let's just say no outline. And then
I might want to make the font a little bit bigger, maybe make it Bold, and I can place this wherever I
want to place it. But let's test that this works. So, if I was to select Pending, take a look at what happens.

Now I would also probably want to align this so that it's always in the middle. So, let's drag that out so
that it's the entire width of the chart, and let's say Align Middle. So now, if I click on Open, that's what
we get, so on and so forth.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Section 08 – Introduction to Form Controls


Video: Introduction to Form Controls

Deb: Form Controls are a great way to add interactivity into your Excel reports. And they are
particularly useful if you're thinking about building an Excel Dashboard. What Form Controls like to do
is add interactivity onto your page in many different forms. And this makes your reports a lot slicker, a
lot easier to read, and most importantly, a lot easier for your colleagues and clients to use.

Now, as I mentioned, there are many different types of Form Controls that you can add into your Excel
reports. And we're going to go through some of the most common in this section. I'm going to show you
how you can set them up, what each one does, and then leave it up to you to decide which ones you'd
like to incorporate into your existing Excel reports and Dashboards.

Now, we're going to be working with these Form Controls in one workbook. So whilst this section spans
many different lessons, we're going to be using the same workbook, which is this one here Form
Controls. And you can see at the bottom, we have numerous different tabs where I've got an example of
each of the Form Controls and how they work. For example, this first Form Control is what we call a
Combo Box. And you can see how this works.

If we click the drop down, I can select a month from the year and it's going to return the revenue for that
particular month. Now there's quite a bit of prep work to get it to this stage, which is what we're going to
talk about in the first lesson. If we move on to the next worksheet, this is where we're going to see what
a Check Box does. Now, notice here, if I click this little Check Box, where it currently says show salary,
if I deselect it, the Salary for each of the employees disappears. If I click it, again, it re-appears.

The next one we're going to look at is the Option Button. So here you can see I have an example of
maybe some kind of HR report that shows employee absence in 2022. And maybe I want to see the
employees and the number of Holiday Days they've taken versus the number of Sick Days. And I have
some Option Buttons just above. I'm currently displaying the Holiday Days. But if I click Sick Days, it's
going to switch out that column and show me the amount of Sick Days each employee has. So those are
Option Buttons.

The next example, we're going to take a look at a Spin Button. So again, what I can do here is cycle
through a list of employees. And then underneath, it's going to tell me what that employee's salary is.
The next one we're going to look at is a List Box. This is fairly similar to the previous one, except we
can see our options in the big long list as opposed to having to cycle through. With this one, I can simply
select an employee from the list, and it's going to show me the salary for that person. And notice that
that title also updates with the correct name.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

And then finally, we're going to take a look at a Scroll Bar. And this is where we can use this little Scroll
Bar to scroll through a list of names. And we can see the salaries for those particular employees. So I'm
going to show you how I built each of these throughout the balance of this section. Now before we get
going, there are a couple of things that you need to do in order to use Form Controls.

Now, Form Controls can be accessed from the Developer tab, and you'll find them in the Control section
under this insert drop down. Now notice here that we have two groups Form Controls and ActiveX
Controls, we're going to be focusing on the Form Controls section. These are the ones which tend to
work best across different applications, whereas ActiveX Controls are very Microsoft specific.

Now if you're currently looking at your Excel and thinking well, I don't even have the Developer ribbon,
that's because it's not turned on by default. So, if you can't see the Developer tab, you're going to need to
turn that on first of all, so all we need to do is jump into File, go down to Options, and then underneath
the Customize ribbon, on the right-hand side, just make sure that you've got a little tick here where it
says Developer. As soon as you do that, you should find that your Developer ribbon appears at the top of
your screen.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Using a Combo Box

Deb: In this first lesson, we're going to take a look at how we can build Combo Boxes into our Excel
reports. So, let's start out by taking a look at the finished product. I have a sample report just here. And
what I want users to be able to do is select a month from the drop down and have it return the revenue
for that particular month. And the way that this is built is just using a Combo Box Form Control, and
also an INDEX Formula. So, let me show you the preparation that's gone into creating this Form
Control.

Now, if I just unhide these rows, you can see the preparation work that's going on behind here. I have all
of the months listed out, I have the revenue, a position column, a selected month, and the selected
revenue. So, notice what happens to Columns H, I, and J when I change the month from the drop down.
Notice that the position updates to position 6, the selected month is June, and the selected revenue is
$5,902.

So, this Combo Box is basically linked through to this list just here. And what it's doing is it's returning
a position of 6 depending on what we've selected in the drop down box. So if I select June, June is in
position number 6, it’s going to return that month. And then I've used an INDEX Formula to pull
through the revenue. So, let's clear out this information and start from the beginning, and I'll show you
how I set this up.

So, the first thing we need to do is insert our Combo Box control. Now we're going to find our controls
on the Developer ribbon underneath Insert. And we want to be using the top half; the Form Controls as
opposed to the ActiveX controls. And the second one along in the top row is the Combo Box Form
Control. So let's select it. Notice that my cursor has changed to a small crosshair, which means I can
now go onto my page and draw my Form Control pretty much anywhere. And if you want to resize that
out, then you can. You can make this as large or as small as you like.

Now, notice currently at the moment, if I click on the drop down arrow, we have nothing in here. So, we
need to tell the Form Control what we want to populate in the drop down list. So, in a way, this is a little
bit similar to Data Validation drop down lists. So we're going to right-click on the Form Control. And if
you want to make any changes to it, you need to go into Format Control. Now we have a few different
tabs just here. But the one that you actually want, it jumps you straight to which is the Control Tab. So
there's a few things that we need to specify just here.

The first thing is the Input range. And that is basically what do you want to appear in that Combo Box
drop down? Well, I want a big list of the months. So I'm going to select them from my data preparation.
We then need to provide a cell link. Now the cell link is basically where you want the result to appear.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Now the way that this works is that when you click this drop down and select a month, let's say January
for example, it doesn't output the word January, it's going to output the position within the range that
you're using of that particular item. So because I'm using this range January to December, if I select
January from the Combo Box, the position is going to be number 1, if I select February, the position is
going to be number 2.

Now because I don't want this type of thing actually appearing in my report, I want to be able to hide
these columns at a later date, I kind of put position off to the side. So, I have it just here. This is where
my cell link is going to be. And then finally, we need to define the drop down lines. So when we click
the drop down arrow, how many items do we want to see in that list before we have to start using the
Scroll Bar?

Now I have 12 months. So I'm going to say that I want 12 drop down lines, so that my users don't have
to scroll to find the month that they're looking for. And let's click on Ok. So now, if we click the drop
down arrow, you can see that we have all of those months listed out. And if I select May, for example,
notice in the cell link cell, which is H4, it's coming up with the position 5. If I change this to February,
it's bringing back position 2.

So, it might be that I want to use this position information to maybe output the actual month name and
the selected revenue. So, this is where we can use an INDEX Formula. If you remember when we do
INDEX and MATCH, we normally use the MATCH as part of the formula to automate the finding of
the Row Number. But, we already have the Row Number, it's this position number just here. So, this is a
very straightforward calculation.

If I want it to pull back the actual month name, I can simply type in =INDEX, what do I want to return?
Well, I want to return the month name. So this is my array. Comma, what's the Row Number? Well, I
want to pull back the month in Row Number 2, or whatever I have in cell H4. Close the bracket, hit
Enter, and I get February.

If I change this drop down and change it to August, I get August over here, so on and so forth. And if
you're building more complex reports, you might have things like different charts or different tables
linked to the selected month cell. Now, we're keeping this first one fairly basic, we do want to pull back
the associated revenue with the month.

So for example, if I select November in the drop down, I want it to return the revenue for November in
this cell just here. So in Column J, I'm going to do another INDEX Formula. So let's type in index. What
do we want to return? Well we want to return the revenue. So, this is our array. And we need to provide
the position number, which again, we hopefully have in cell H4. Close the bracket, hit Enter, and it's
now returning that revenue. So, it means that all I need to do is go to cell C5, and basically link to the
selected revenue cell to pull that through.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

So now, when we click the drop down, if I select April, everything's going to update correctly, and it's
going to pull through that revenue. Now all of this sort of workings out, all of these calculations that I'm
doing, I might not want to show those to users, I might just want them to come in here and be able to
select a month and see the revenue.

So, I could choose to put this on a different worksheet if I wanted to, or I could simply choose to hide
the columns. So I'm going to right-click, go to Hide, and now we have a very clean looking start of a
report using a Combo Box.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Using a Check Box

Deb: In this example, we're going to add a Check Box to add some interactivity to our report. So, this is
an HR report, and it shows employee salaries for 2022.

Now, obviously, employee salary information is generally private information. So, we might want to
have a toggle box at the top, which determines if we show or don't show the salary for each of our
employees. If I click the Check Box, it’s going to suddenly show the salary. If I deselect the Check Box,
it hides it again. And you can see as I do that, what's happening in my calculations, or my data
preparation, on the right-hand side.

When I check the Show salary box, the selection changes to True. When I deselect the box, the selection
changes to False. So, we're using this True/False result to tell Excel what we want to show and what we
want to hide. So, I'm going to delete out all of my calculations, and I'm going to show you how to create
this from scratch.

So, the first thing I want to do here is I want to bring across the employee names into Column B. Now
we're just going to link to the cells, let's type in =, and click on employee and Ctrl + Enter to stay in the
same cell. I can then simply drag my mouse down. But notice what happens, it also copies down all of
the formatting. So, let me show you a slightly different way of doing this.

If you want to copy a formula down, but you don't want to copy with it the actual formatting, all you
need to do is select the number of cells that you want to fill, press the F2 key, and then press Ctrl +
Enter. And now, we don't have that Blue formatting applied to the employee names. Now the next thing
we're going to do here is we're going to insert the Check Box.

So once again, we're going to go up to the Developer tab, into Insert, and the one that we want is the
third one along, Check Box Form Control. Once again, we need to draw this on our page. So, I have a
nice little gray area up here where I can position this Check Box. And I think that possibly needs to go
up very slightly. And one thing you'll notice with these Check Boxes is they can be a little bit tricky to
position. But I think that looks pretty good.

Now, I'm going to change the name of this Check Box, so let's double-click inside and we can now
rename this so it says Show Salary. Now currently, if I select or deselect this Check Box, nothing
actually happens. So, we need to format our Form Control. So let's right-click and jump into Format
Control. Again, we're working on the Control tab. The only thing we really need to add here is the cell
link. So remember, the cell link is where you want the output of this Check Box. So my cell link cell is
cell F7, and click on Ok.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

So now, what you'll notice is that when I have this Check Box selected, we get a result of TRUE, when I
deselect it, we get a result of FALSE. So we can now use this output to perform a calculation. Now I
want this to display so that when we select Show Salary, it’s going to show another column called salary
and list out all of those salaries. When we deselect, it's going to completely hide that column. So, let's
click in cell C6. And we're going to kind of do this in two parts, we're going to deal with the header first
of all, and then the rest of the data. So we need a formula in here.

Now which formula do we use when we want to assign meaning to True and False values? Well, if you
guessed the IF formula, then you would be correct. So what we're going to say here is if this cell equals
TRUE. Now remember, when you have TRUE or FALSE in a cell, you don't actually need to tell the
formula if you're specifying TRUE or FALSE. So, we can simply select the cell reference.

Now we want to copy this formula down, we don't want this to move. So, let's press F4 to lock. So, if we
have the word TRUE in cell F7, what do we want to return? Well, I want to return the heading salary. So
J6. If we have FALSE in there, what do we want it to return? Well, we want it to return nothing. That's
going to give us the effect of hiding the column. Let's close the bracket, hit Enter. And as you would
expect, we have the word salary.

So now, I can simply copy this formula down and it's going to pull through the salaries for each of the
employees. And I'm quickly also going to add some Number Formatting. So we'll add a comma
separator and take those decimal places down to 0. So, let's test out our Check Box. If I deselect it, it’s
giving me the effect that I want kind of, it is hiding the column. If I select Show Salary, it is bringing it
back. But I want this to take on the same formatting as the employee column. So, I want the heading to
show with a Blue background and White font. So how can we do this?

Well, we can simply apply a Conditional Formatting rule, this is fairly straightforward. Let's select the
cell, up to Conditional Formatting, and we're going to create a new rule. And what we're going to say
here is we're only going to format cells that contain the word salary. So we want to select equal to, and
then we can simply type in the word. Let's click the Format button. And now we can apply the same
formatting.

So, I'm going to go to the Fill Tab, and I think it was this Blue just here that I used. And we also want to
change the font so that it's White, and bold. Click on Ok, Ok again, and that formatting has now been
applied. I think it is a slightly different Blue, but not to worry, hopefully you get the idea. And now if I
deselect Show Salary, we get the effect we're looking for.

I could of course then go in and I could hide all of my preparation, or I could put it on to another tab and
maybe hide the tab instead. But that's how you can use a very simple Check Box to show or hide
specific information in a report.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Using an Option Button

Deb: It's time now to look at another Form Control that you might consider adding to your Excel
reports, and that is the Option Button. So what we're looking at here is an employee absence record.

So, it might be that I work in HR, and I want a quick way of seeing the Sick Days that my employees
have taken, and also how many Holiday Days they've taken as well. And if you notice at the top here, I
have two Option Buttons, one for Sick Days, and one for Holiday Days. So if I select Holiday Days, it's
basically going to replace the Sick Day column with Holiday Days instead. And this, again, is all being
controlled from the information that we have in cell H9.

Notice here, this is our cell link box. When I select Holiday Days, the output is the number 1. And when
I select Sick Days, the output is a number 2. And we're using this information to reference our
preparation table over here. So Holiday Days is effectively Column 1 and Sick Days is effectively
Column 2. And that's how it's pulling through that information.

And also notice that in Column C, we're using an INDEX Formula again to pull through the correct
information that we want. So, I'm going to delete out all of my calculations, and I'm going to show you
how I set this up from scratch.

Now the first thing that we're going to do here is we're going to add our Option Buttons. So up to
Developer, into Insert, and this time, we want this one just here, Option Button Form Control. Now once
again, I can simply draw my Option Button just here and reposition that. And because I want two of
them, I'm going to Ctrl + C and Ctrl + V to copy that button.

Now it's appeared all the way down there. So let's drag that back up. And what I would recommend that
you do just to make this look really professional is that you use your Alignment Tools to make sure that
both of these are aligned correctly. So holding down Shift, I'm going to right-click to select the other
Option Button. And then up on the Shape Format tab, we're going to use Align. And we're going to say
Align to Middle, like so. So now, I can go in and just modify my labels.

Let's double-click, I'm going to rename this one Holiday Days, and this one is going to be Sick Days,
like so. Now notice that when I click on these, Excel kind of knows that they're related, because it's
selecting one or the other. So, if I had more Option Buttons in my worksheet, I could tell Excel which
ones are related, which ones need to work together by creating Option Groups. So, let me just very
quickly show you that, we don't need to do because we've just got one set.

But if I select Holiday Days, and also Sick Days, let's copy and paste so I have two more over here. If I
wanted to make sure that Excel knew that these two need to work together, and these two need to work
together, I would jump back up to the Developer tab and I would create myself an Option Group box. So

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

if I just select that, it just means drawing around the two that you want to group together, and you have a
nice little Group Box here so Excel knows that these two work together.

Now as I said, we don't need to do that, because we just have one set, so we can simply delete these out.
And I will say that when you're trying to do selections and move these around, and things like that,
because these are clickable buttons, when you left-click your mouse, more often than not, you end up
just selecting the Option Button. So, quite often to get around that, I'll right-click my mouse, you get the
menu pop up, but it allows you to select the control and then move it a little bit easier. So, let's press
Delete.

So now we have these Option Buttons, we want to link them to our cell link cell over here. So, let's
right-click and go into Format Control. So, our cell link is going to be this cell just here. Now the cool
thing about these Option Buttons is because these work together, you don't need to set the cell link for
both of them. You just need to do it for one and the other one will automatically populate. So if I click
on Sick Days, notice the selection changes to 2. If I click on Holiday Days, it changes back to 1.

So now that we have this information in cell H9, we can use it to pull through the information we need
from our data preparation table. So now, we need to create a formula which recognizes which Option
Button we've selected, looks at the selection in here, whether it's a 1 or a 2, and then pulls back the
correct data from this table, including the correct column heading. So let's deal with the header first of
all, we're going to do an INDEX Formula. What do we want to return?

Well, it's either going to be Holiday Days or Sick Days. So we can select both of those cells, comma.
What's our Row Number? Well, our Row Number is going to be whatever we have in cell H9. And
we're going to copy this down. So we need to lock that cell, close the bracket, and hit Enter. And we
have Holiday Days. If I click Sick Days, it's going to switch it out. So now, this is a very simple case of
copying this formula down.

But because I don't want to copy that formatting, remember a little trick, we need to select all the cells
that we want to copy the formula to, press F2 + Ctrl + Enter. And like magic, we get our Holiday Days.
If I click on Sick Days, this completely updates. So again, Option Buttons are really nice things to add to
any Excel reports that you're creating. And there are so many things you can do with these not simply
just what I'm showing you here.

You could add more complexity by linking things through to tables, charts, other calculations, the
possibilities are really endless. But hopefully, that gives you a little taster as to how these buttons work.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Using a Spin Button

Deb: Another Form Control that can be added to Excel reports is the Spin Button. And this is an
extremely simple concept. If you take a look over in Column B, I've inserted a Spin Button, and it's
currently on Maria. If I click the down arrow, it’s going to go to the next one up, which is Vin. Then
we're going to go to James and you can see that we're getting their salary as well.

Now, this one started at the bottom, because I was cycling through it before I started recording this
video. But in general, these will start at the top of the list. So with Deb, and then you can use the Up
Arrow to move through the list and return the salary or whatever else is that you specify. And this works
on a similar principle to some of the other Form Controls that we've looked at.

We have a selection cell in the middle, this is our cell link cell. And this is basically providing us with
the position of the employee in this table over here. We're then using a VLOOKUP to pull back the
salary information based on the employee name. So, everything is all linked together. So, I'm going to
delete out all of my calculations and show you how I put this together.

So, the first thing that we're going to do here is we're going to enter our Spin Button control. So once
again, up to the Developer ribbon, into Insert. And this time, it's this one that we want to use. Now I'm
gonna draw this over here, and let's make it a little narrower, like so. And in general, I like to position
these right next to the value that this button controls. So, let's right-click on our Spin Button, and go into
Format Control.

Now we have a few different fields that we need to complete here. So, this is a bit different to some of
the other controls that we formatted previously, the first thing we need to specify is the current value.
Now, currently, we don't have any value in our cell, so I'm happy to leave that on 0. Now we need to
specify what our minimum value is going to be. So, my minimum value is going to be 1. If you wanted
this to start on 0, you could enter a 0 in there as well.

Now my maximum value is basically going to be the number of items that I want to control with the
Spin Button. So, I want to be able to cycle through all of the employees. So, my maximum value is
going to be 10. Now if you had a very long list, obviously, you would need to do some kind of
COUNTA before so you know exactly how many employees you had in your list. I can then choose the
incremental change. So when I click on the Up Arrow in the Spin Button, for example, how many
positions do I want it to go up?

Do I want it to go up by 1, do I want it to go up by 2, 3, 4? You can specify that just here. Now I want it
to go up by 1 each time. And then the final thing we need to provide is the cell link. So, my cell link is
going to be F4. Let's click on Ok. So now if I click on this Up Arrow, you can see that that selection is

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

changing. If I click down, it goes back down again to 1. And that's gonna go all the way up to the
maximum value that I provided, which in this case was 10.

So now, we basically have this generating a Row Number, we can add a formula and use this selection
to pull back the correct results from our preparation table. And you might have guessed it, we are doing
an INDEX Formula. Remember, the array is what you want to return. So, I want to return the employee
names. And my Row Number is going to be whatever is showing in cell F4. Now, we're not copying this
down. So, I don't necessarily have to lock that cell.

Let's close the bracket, hit Enter, and now you can see that it says Deb. If I click the Up Arrow, the
selection changes to 2 and the employee changes to Claire, so on and so forth. So now we have this Spin
Button working correctly, I want it to also pull through the salary depending on which employee we've
selected. Now you could use an INDEX and MATCH for this. But just to switch things up a little bit,
I'm going to use a VLOOKUP. So, let's type in VLOOKUP.

My Lookup value is going to be the employee name. So, whatever we have in cell C4, comma. Where
am I looking this up? Well I'm looking it up in the table, and we need to include in our selection, not
only the column where the lookup value exists, but also what we want to return, in this case, the salary.
If you're going to copy this formula down, you would need to lock the cell references or make sure that
you've put your data in a table previously.

Now we're not going to drag down. So, I'm just going to leave them as they are, comma. What column
do we want to pull back? What column do we want to return? Well we want to return the salary, which
is column number 2. And are we doing an Approximate or an Exact Match of the Lookup value? Well,
we're doing an Exact Match so we need to add FALSE or a 0 on to the end. Let's close off our
VLOOKUP and hit Enter. And you can see what we get. So, let's check that this is correct.

If I find Deb in the table, yes, that salary matches. If I use my Spin Control to move up to Claire, let's
make sure that that is correct. Yes, it is. Let's go up a few more. Let's go to Adam. Let's check him in the
table. Yes, that appears to be working. So, that's how you can add a Spin Button control onto your Excel
reports.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Using a List Box

Deb: List Boxes are not dissimilar to Combo Boxes in that they list out values that we've specified. But
the main difference is that with a List Box, you can actually see the values as opposed to having to click
a drop down in order to select them.

So, I've got a List Box here, again, it's just holding some employee information. And what I can do is go
through and select an employee from the List Box. And notice that in Column F, the employee that I've
selected, I'm getting to see the salary, but also the title is updating. So, it says Salary for Claire. If I
select Adam, not only does the salary update, but also that title as well. So, let's take a look at how I put
this together.

So again, we're starting with our preparation table over in Columns M and N, where I just have my
employees listed out and also the salary. The next thing we need to add is the actual List Box. So we're
going to jump back up to Insert, and then we're going to choose this one, just here List Box Form
Control. Let's draw our List Box on our page. So, I'm just going to put this over here, like so. And as you
might expect, currently, our List Box is empty. So, let's right-click and format the control.

Now a couple of things we need to add here, we need to tell Excel what our input range is. So what do
we want to display in that List Box? Well, I want to display the employees. So let's select our employee
range. We then need to provide the cell link. So where do we want the value to be output? Well, I'm
going to put it down here in cell B13.

Now the selection type for the example that we're doing, we need to leave it on single, you don't use
multi. If you were using VBA code, and you wanted your users to be able to select multiple people from
the list. But for this, we're going to leave it on single and click on Ok. So now, our List Box is populated
with all of those names. And if I click on one of them, you can see that in the cell link cell, it's basically
telling me the position of that employee in the list. So Adam is in position number 5, Claire is in position
2, Deb is in position 1, so on and so forth, we should be getting fairly used to how this kind of works by
now.

The next thing I want to do is I want to output the salary into this cell just here. So as you might have
guessed, this is where we can use an INDEX Formula. So let's type in =INDEX. Our array is what we
want to return. So in this case, the salary. So we're going to select this range just here. And then we need
to provide the Row Number. And the Row Number is going to be generated by our cell link cell just
here. Because, this is telling us the position in the list B13. Let's close the bracket, hit Enter, and check
to make sure that this is correct.

So currently, I have Deb selected. And if we take a look at the table, that is correct. Let's select Ben and
take a look at the table. Yes, that appears to be working. The final thing we need to do here is I want to

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

have a title that says Salary for and then the name of whichever employee I've selected in the List Box.
So we can do this just by using some simple TEXT Functions. So let's type in =, and I want it to say
Salary for. So this is text, so it goes in quotes ‘Salary for’, I'm going to put a space and then close my
quotes. And then we want the employee name.

Now I can't just hard code the name into the formula because I want this to be dynamic and update
depending on what's been selected in that List Box. So, I need to join this with an INDEX Formula.
What do I want to return? Well, I want to return the employee name from this range. And I want it to
return Row Number 4 in this case or whatever we have in cell B13. Let's close the bracket, hit Enter, and
there we go, Salary for Ben. Let's see if this update. So I'm going to select Lucy. Yes, it does and her
salary also updates underneath.

And remember if you want to make this truly dynamic and have everything update when new employees
get added to this list, then you need to put your data preparation into a table. So, let me quickly show
you that, Ctrl + T. Let's put this into a table. Now if I have a new employee and I add them on to the end,
so let's say we have Clive and he is 25,000. Let's take a look at our List Box. If I scroll down, there is
Clive, and everything still updates perfectly.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Using a Scroll Bar

Deb: Scroll Bar Form Controls give the impression that you are scrolling through a list of data. If you
take a look at my example, just here, I can click to scroll up through the different employees and their
salaries, and then click to scroll down. And notice that as soon as we get to the last employee, now, in
order to get this to work and look correct, there are a few different steps that we need to take. So, let me
show you how I put this together.

So, the first thing we're going to do here is we're going to insert our Scroll Bar. So up to the Developer
ribbon into Insert, and it's this one that we want just here. Let's click and I'm going to draw my Scroll
Bar just next to where we currently have Salary. So, I'm going to make it all like that, possibly a little bit
thinner. And I'm actually going to move it all the way over here. Because, I want it next to Column E.
Let's format our control. So we're going to right-click and Format Control.

Now once again, we have a few different values that we need to add, I'm going to keep the current value
on 0 and minimum value, I will always put a 1 in here. Now what is our maximum value going to be?
Well, again, this is going to be the number of values that you want to show in the Scroll Bar. So for me,
that is all of these employees, I have 10 of them. So, I'm just going to select 10 as my maximum value.

The incremental change. So, how many do you want it to jump when you click the Down or the Up
Arrow? Well I want it to jump up or down by 1. And then we have page change. So, how many do I
want to show all in one go. So I'm going to say that I want to show 5 employees. And then finally we
need a cell link cell. So for me, that is going to be cell B5. Let's click on Ok. So now, we want to return
all of the employee names.

So for this, we're going to use an INDEX Formula. What do we want to return? Well, we want to return
the employees. And because I'm going to copy this down, I need to lock these cells. So F4, comma, what
row do I want? Well, whatever row has been selected, so we're going to use our cell link cell, which is
cell B5. And again, we need to lock this because we're going to drag this formula down. Let's close the
bracket and hit Enter. And let's see what happens when we pull this down. Something's not working
quite correctly, because it's just repeating Deb over and over again.

Now the reason why it's doing this is because we haven't got our cell referencing quite right just here. If
we take a look at what this formula is actually doing, and I'm going to double-click on the second one,
because we've locked the employees range, it's always going to refer to this range. So what I'm saying
here is basically return whatever is in position 1 from this range every single time. Because when I drag
this formula down, because we've fixed both of these, it doesn't move anywhere.

So, it's always going to return selection 1 from the employee list. So, we need to change the way that
we're using Absolute Referencing up here. So, I'm going to delete these bottom ones out, let's edit this

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

first one. And what we need to do here is change the referencing of I5. Because, we want this to be a bit
more flexible and be able to move depending on what we've selected. So, we're going to take away the
cell referencing from I5 only.

Now what we can do here is press F4 to cycle through our different options until we get to just the cell
I5 without any locking. Let's hit Enter. Now this time, if I drag this down, I should find I get the other
names. And if I use my Scroll Bar, I can scroll through all of the rest of the list. The only thing left to do
here is to return that salary. As you may have guessed, we're going to use INDEX for that. This time, we
want to return the salary, F4 to lock. The Row Number is going to be generated by our selection, F4 to
lock, close the bracket, and hit Enter.

Now let's copy this down. We have that same issue. So remember, we need to adjust our locking and
remove the locking from this first cell reference. So now, when I drag this down, we should find that
that looks a little bit better. And now when we use our Scroll Bar everything works perfectly. Now I
have these little green triangles because I didn't include that top value when I updated my formula. So,
that's fine. I can just ignore the error.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Exercise 08

Deb: In this exercise where we're going to practice Form Controls, I thought we would take it up a notch
and really just focus on one particular Form Control. Because as you've probably noticed, once you've
learned a couple of the Form Controls in Excel, they're pretty easy to work out how to use the others.

So in this exercise, I simply want you to create one Combo Box Form Control. And I want you to
populate that Form Control with the months of the year. And you can see that I have those listed in
Column P in this worksheet. I want you to make the cell link cell, cell B4. But the additional thing that I
want you to try and work out is how you can insert a chart so that it is controlled by this drop down box.

So, if I select June from here, notice that not only does the chart title update, that's because I've set that
up down here already for you. But take a look at that, the totals also update. So, I'm effectively
controlling this chart using my drop down box selection. So, I encourage you to have a little bit of a
think here as to how you might possibly do this. Everything you need is available on this page.

Think about the cell link cell, think about what the outputs of that cell link cell is and how you might use
this information in a formula from which you can then build a chart from. One final little hint here. If
you take a look in Column P notice that underneath the first table, we have another smaller table that
currently is just showing me one month and the sales figures for that month. And that month is June.
Coincidentally, we have June selected in the drop down.

If I change this to September, notice that it changes to September in this table as well. So, think about
how all of this might link together and have a go at this yourself. If you get a little bit stuck, then please
keep watching because I'm going to show you the answer.

So the first thing we need to do here is we need to enter our Combo Box Form Control. So we're going
to jump up to the Developer tab, into Insert, and we're going to choose a Combo Box. Now I'm going to
draw my Combo Box just here in going across Columns B and C. And let's just make that slightly
narrower, like so.

Now, we need to right-click and Format our Control. Now with the Combo Box Form Control, we have
a few different things that we need to add here. The first one is the input range. So what do we want to
display in that drop down? Well, I just want a list of the months of the year. Now I have that list over in
Column P. So, I can simply select it from here. What do we want to be our cell link cells? So, this is
basically where the output of the Form Control is going to go.

Well, I want it to go into cell B4. How many drop down lines do I want? Well, I've got 12 months of the
year. So I might as well say 12 so that my users don't have to scroll. Let's click on Ok. So now, if I click
the drop down, there's all my months of the year. If I select June, the output is 6, because June is the

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

sixth month of the year. So that's all well and good. We're pretty clear on how we do that. But how do
we get our chart to update?

Well, I asked you to think of a formula where this information would be useful. And if you thought to
yourself, well, INDEX and MATCH is a formula where the Row Number effectively is useful, then you
would be correct. So what I'm going to do here is over in Column P, if you remember, we've got a little
table underneath for month and sales. Now, I just want to display a chart that's going to show the month
and the sales figure depending on what I've selected.

So effectively, I need to build my chart based on that data; month and sales. And that needs to relate to
my selection. So, what I can do down here is that I can use an INDEX and MATCH and use this Row
Number to pull the correct month and its corresponding sales value out of this table of data. So, let's say
INDEX, I want to return the month so we're going to index the month array. Our Row Number is going
to be our cell link cell, currently it’s June. That's what I want to return. Let's close the bracket, hit enter.
Perfect.

We need to do the same to grab the sales. So, we're gonna go with INDEX. This time we want to return
the sales. So that's our array. And the Row Number again is going to be our cell link cell. So now check
that out. As soon as I've done that, this chart updates. If I select something else from this drop down,
everything updates. And if you're wondering how I created this chart, it was very simple.

The chart is simply just created off of this data just here. So select it, go to Insert Chart, and that is pretty
much it. I created the dynamic chart title in exactly the same way as we did in the previous exercise, just
using Text Join and CONCAT. But if you managed to work that out and think that through, then you're
doing a pretty good job so far. That's it for this exercise, I will see you in the next one.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Section 09 – Power Query Overview


Video: Power Query Overview

Deb: Power Query is a powerful business intelligence tool available in Excel that allows you to import
data from different sources, clean and transform it, and then re-import it back into Excel ready for
analysis.

What makes Power Query so powerful is that when you import data in this way, you essentially create a
query or connection to the original data source, which means that any updates that occur can be
incorporated into your data model with the click of one button. Power Query also makes the process of
cleaning and transforming data simple.

Instead of needing to know Excel binning functions like Trim, Clean, Replace, Substitute, CONCAT,
various other text functions and other utilities in Excel like Flash Fill and Text to Columns, we can now
clean our data using Power Query commands via a graphical user interface. Power Query also records
all of the transformations you make, making it simple to backtrack through your steps. And the best part
about all of this is that we don't need to know any code in order to do this.

So in this section, we're going to be looking at the basics of importing data into the Power Query Editor
using Get & Transform, how we clean and tidy our data, and then how we re-export it out to Excel.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Importing Data Using Get and Transform

Deb: Power Query is a data transformation and data preparation engine available to you within Excel. It
allows us to import data, import files from external sources into Excel, and also provides us with tools to
help us clean up and repair that data prior to analyzing.

So, if you've ever taken a data set or even imported a data set directly into Excel, and then been through
and used Excel functions and other utilities in order to clean up and tidy that data, that's basically what
Power Query does. But it has a much more user friendly graphical interface that makes the whole
process of importing and cleaning data a lot easier. So in this lesson, I'm going to start out by showing
you how you can import data using Power Query.

Now when I say that sentence, it is a little bit misleading because we don't actually use Power Query to
import data. What we use is something called Get & Transform, and you'll find these options on the data
tab in the Get & Transform data group. And in general, if you wanted to import a file from outside into
Excel, this is where you would come regardless of if you wanted to use Power Query to clean that data.

Now, notice here we can choose data from many, many different sources. And some of the main sources
are listed out here. So a popular way to import data is to import it in from a Text file. What you'll find is
with a lot of external or third party systems, you can export the data into a Text file, and you can then
import the Text file into Excel.

We can also import data directly from the web, or maybe from another table or range that we have
within our workbook. And if you want to see a full list of all of the data sources that you can import
from, if you click the drop down next to Get Data, we have all of these different categories. So for
example, I could choose to import data from another Excel workbook. As we mentioned a Text or CSV
file, from XML, JSON, PDF, or even from a folder.

Now the Import from Folder option is the one that we're going to be using in this lesson. And the reason
why I like to use this is because it's a really good example of how easy it is to keep your data updated if
you create a link to a folder. But let's just put that aside for now and go through some of these other
options. We can also import data from a SharePoint folder. And if we go to From Database, we have all
of our database import options.

So, maybe you have data stored in an Access database or on an SQL Server or an Oracle database. You
can import from Azure or from Online Services such as Microsoft Exchange, Dynamics, or even
Salesforce. So, pretty much any scenario that you're going to come across is pretty much covered just
here. And if it isn't, and you need to create a link to maybe your internal third party system in order to do
data imports, you can set up what we call an ODBC link.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Now, we're not going to get into that in this lesson, but just be aware that it is there if that is something
that you need to do. Now before we do our import, let's take a look at the files that we're going to be
importing. And you'll find these files in the Sales Data subfolder in the Course Files folder. So, this is
the folder that contains the files that I'm going to import. And if I double-click to open it up, notice that I
have four separate files in here. And each one of these files is CSV file that holds sales information for
four years, 2016 to 2019.

Now if we take a look at a couple of these, let's open up the first one, you can see the data that we have
inside. Now I'm going to widen out these columns. All we have is a column for Order ID, Date, the
Product, Country Code, Unit Cost, Unit Price, and Sales Quantity. Now the thing about all of the four
files in this folder is that they are all completely consistent in their column headings. And that's really
important, particularly if you want to do what we're going to do in a moment, which is combine all the
files together to make them one big long file.

Each one of these files contains the same column headings. So, if I was to open up, let's say 2018, it
looks pretty much exactly the same as the file that we were just looking at. We just have different sales
data in here. So, what we're going to do is we're going to import the entire sales data folder, because I
want to import all of these files.

Now the good thing about importing a folder is that when you do it in this way, you're essentially
creating a link between Excel and this particular folder. So if when the next year rolls around, and I find
that I have a sales file for 2020, or 2021, all I need to do to keep my data up to date is make sure that I'm
saving those into this folder, and then I can refresh the connection, which I'll show you how to do in a
moment, and it's going to pull all of that data in automatically. So, that is why linking to a folder can be
so powerful. So, with all that said, let's close this down.

We're going to go to Get Data, From File, and we're going to choose From Folder. I'm going to navigate
to where I have my folder, and I don't need to drill down any further, I can just select the entire folder
and click on Open. Now that's going to open a separate window. And you can see in this window, those
are my four files. You can see in the Name column, Sales 2016 to 2019. Now at this point, I have a few
different options.

Notice at the bottom, we have some Action buttons. So which one you choose really depends what you
want to do with these files. So if you just want to simply load them very quickly into Excel, you have a
Load button just there. You can choose to Combine them together, or you could choose to Transform the
data, which is going to open up Power Query.

And I will say that 9 times out of 10, I will always go to Transform Data just to make sure that the data
that I'm importing is in the correct format. And I can make any final changes or clean anything up in
Power Query prior to importing it into Excel. So, let's click on Transform Data.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Now, this is where the Power Query Editor will open up. And whilst this kind of looks like Excel, it has
a similar structure, we have ribbons running across the top. If you've never been in here before, it can be
a little bit overwhelming because it's like an entire system in itself. So, in the next lesson, we're going to
pick up from this point, we're going to go through some of the main features of the Power Query Editor,
and I'm going to show you some changes that you can make.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: The Power Query Editor

Deb: In the last lesson, I showed you how to input four sales files from a folder into Power Query using
Get & Transform. And we're at the stage now where we have these files open in the Power Query
Editor. Now, this editor is where you can come to essentially clean up your data prior to loading it into
Excel.

As I mentioned, if you're used to using things like TEXT Functions and other utilities in Excel to clean
up your data, then this is kind of similar, but we have an easy to understand graphical user interface in
order to do it. So, no formulas required when you're using Power Query. Now we're going to get on to
cleaning up some of this data in the next lesson. But before we get on to that, I just want everybody to be
clear on exactly what you're looking at in the Power Query Editor.

Because if you've never been in here before, it can look a little bit overwhelming because we do have
multiple ribbons at the top that contain lots and lots of different commands. Now this Power Query
Editor is split into a few different sections. At the top, we have our ribbon structure. And this is where
you're going to find all of the commands that you can use in order to clean and tidy your data.

On the left-hand side, we have the Queries pane. And notice underneath Other Queries, this is our
current query that we've run. So, this is our sales data folder that we've imported. And as we run more
and more queries on our data, we're going to see those build up in this left-hand pane. Now in the
middle, here, we have the main window where we clean and tidy up our data.

Now currently, you can't see the data because all I've imported are the four files from a folder. So, we
have our column headings running across the top, you can see the name of the file in the second column.
So, I have my Sales Files 2016 to 2019. I can see the file types, so these are all .CSV files. And then we
have the Date Accessed, the Date Modified, the Date Created, and then an Attributes column. We have a
Formula Bar just above. And then on the right-hand side, we have our Query Settings pane.

Now, the two main things that you can do in here are Rename your queries. So currently, mine is called
sales data. But I could change the name from here if I wanted to. Or if I start to make lots of changes to
my data set, I can then rename it as something else. And then underneath there, we have Applied Steps.
And what you'll notice with Applied Steps is this is kind of like a history log.

So, every time you do something with this data, you're going to see it appear in Applied Steps. And the
good thing about that is that if you need to undo anything or backtrack a few steps, you can do that from
this pane. And we're going to see that in action in a few moments.

Now if we just turn our attention to the ribbons in the Power Query Editor, if we take a look along this
Home ribbon, you're going to see lots of things which probably make sense in the context of cleaning up

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

data in Excel. For example, we can do things like remove columns, we can remove rows from our data
set as well, we can split our columns up, we can specify if we want to use the First Row as Headers, we
can change the Data Type in use in this column, we can Replace Values or even merge queries together.
And if we jump on to the Transform tab, notice there we have more options that are going to help us tidy
up our data. We can use our Fill Down or Fill Up.

Again, we can split the column or even format the columns. So, if we want everything to be in
lowercase, uppercase, if we want to do a Trim or a Clean. These are functions that you're used to using
in Excel, except we have them in Power Query as clickable options in menus. Now, we are going to use
a few of these when we clean up this dataset in a moment. But before we do that, there is one final step.

As I mentioned, currently, we just have the files listed in the Power Query window. And what I really
want to do is expand all of these so we can see the data within each file and combine them all together
into one big long file. If you recall in the last lesson, every single file is exactly the same; it has the same
number of columns, it has the same column headings. So, it's very easy for us to combine them into one
file. And that's exactly what we're going to do in the next lesson.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Combining Files

Deb: It's time now to combine these four files and make them one file prior to cleaning up the data
before loading it into Excel. Now when it comes to combining files, there is a handy little button. If you
take a look in the content column, you'll notice that we have a button in the top right-hand corner that
has two downward pointing arrows. And when we hover our mouse over the icon, you can see that it
says Combine Files. So, let's click this button and see what we get.

Well, it's going to pop open a brand new Combine Files window. And what you're going to see in here is
a preview of the first file it comes across. So, the first file that we have was the sales data for 2016. So,
you can see the first 200 rows of data for that particular file. So, this is really here just to give you an
idea as to what your data looks like prior to loading it in. If you want to take a look at some of the other
files, you can click the drop down under the sample file, and you'll be able to see all of the files that
you're combining together listed up here.

So if I was to select 2018, it's going to go away, and it's going to load up the first 200 rows of that
particular file. And now I can see my data for 2018. So, you can give your data a quick check, make sure
it looks okay, and then we can click Ok in the bottom corner. Now it's going to go away, combine all of
those files together, and now we can see the data contained within those files. If you take a look in the
first column, we have a Source Name column, which is showing us the file that the data is coming from.

And if I use my Scroll Bar and scroll down far enough, it's going to move on to 2017, 2018, and 2019.
So, I basically have all of that data combined into one file. Now that we've done that, take a look at the
Applied Steps on the right-hand side. We now have a lot more in there, because we've just taken some
action on these files. Now pretty much all of these Applied Steps so far have been automatically
generated by the actions that I've been taking on this data. And you'll see as we take more actions, this
list is going to grow longer.

But now that we have these files combined together, we're now really at the stage where we want to go
through, start checking things like the Data Types in each column and tidying up any errors, removing
any blank rows, and really sorting our data out and getting it into the format that we want to import
directly into Excel. So, just taking a quick look at this data, I can see that we're probably not going to
need that first column.

The Source Name column is really just telling me the file name. Now in any type of analysis that I might
want to do with this sales data, I'm probably not going to need the file name. So, there's a column there
which I don't need to import. So, what I'm probably going to do during the cleanup process in the next
lesson is remove that column.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

I also want to go through and make sure that I have the correct Data Type applied to each of my
columns. And you can see the Data Type represented by an icon next to the column header. For
example, the Order ID has 1, 2, 3, which is telling me that this is a whole number or this column
contains whole numbers. And it is very important that you check the Data Types for each column to
make sure you don't import your data in the wrong format. So, we're going to do that in the next lesson
as well.

The next thing we want to take a look at is the actual data in our columns. So, if I take a look at this
product column, just here, these are some of the products that this company sells. You can see that we
have kind of two pieces of information, we have the product name, we take the first row Chicken Fajita
Wrap, but then in brackets after it, we have the location. So, this is the store location after the product
showing currently in brackets.

Now really, this information should be split across two columns. We just have one column which shows
the product and another one which shows the location of the store. So, we're also going to do that in the
next lesson, I'm going to show you how you can split up a column and how you can Replace Values to
get rid of the brackets.

Now of course, there are many, many more things you can do in Power Query. And this isn't a full on
Power Query training course. But I would advise you that if this is something that you're going to be
using a lot, you do check out a more detailed course specifically on Power Query. But in the next lesson,
we are going to go through and do a little bit of tidying up before loading our clean data set into Excel.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Transforming Files

Deb: Let's start using some of the tools available in the Power Query Editor to tidy up this data set
before loading it into Excel. Now, as I mentioned in the previous lesson, the first thing I'm going to do
here is I'm going to delete any unnecessary data. And when I say unnecessary data, what I really mean
is, if it's not going to be in my analysis, then I don't really need to import it.

Now looking at my data, I pretty much need all of these columns except this first column. This column,
the Source Name column, is really just showing me the file name that this data has come from. And I'm
not really going to use this data in any analysis that I do on this sales data. So, the easiest way to delete a
column is right-click on the column and then from the right-click menu, we have a Remove option. And
as simple as that, it has now been removed.

Now if you cast your eyes over to the Applied Steps pane on the right-hand side, take a look at what the
last action was, Removed Columns. So, as I do things, it's going to log it in Applied Steps. Now if at this
point, I think to myself, actually, you know what I didn't want to remove that column, what I could do is
hover my mouse over the Removed Columns step, and just click on the cross, which is effectively going
to undo what I did previously.

Now in this case, I do want to remove this column. So, let's just get rid of that again. And now it's time
to check the Data Types of each of our columns. So, the Data Type really determines what type of data
you have in each of your columns. So, for example, in the Order ID column, I can see the Data Type is
showing as 1, 2, 3. And if we click on this, we're going to get a menu, which exposes the rest of the Data
Types available for us to choose.

Now, this is an order number, it is a number, so I'm going to leave it on Whole Number. The next
column, well, these are dates. So, if I click this, I want to make sure that I have Date selected from this
menu. The next column is Text, I can see that Power Query has picked this up correctly, we have A, B,
C, which means that Text is contained in this column. The next column is also Text, that is the correct
Data Type. The Unit Cost is effectively Currency.

Now this currently has the Decimal Number Data Type applied to it. Now if I was to leave this on this
particular Data Type, it would import fine, it just wouldn't have any Currency Formatting. Now, I'm
going to actually change this to Currency, which also gives me consistent decimal places in this column.
Let's move across to Unit Price. I'm going to do the same thing here, let's change it to Currency. And
we're going to do the same thing with Sales Quantity. Let's also change that to Currency. So now,
everything is looking a little bit more consistent.

Again, notice, every time I change the Data Type it logged it in the Applied Steps. If I click the cross,
it's going to undo that last change that I made. So, really nice and straightforward. Another thing to

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

watch out for, which happens fairly frequently when you're using Power Query, is you want to make
sure that you have your column headings in the first row. Now, mine are in the first row. And so they're
being seen as column headings. But a lot of the time, you'll find that Order ID, date, product will be
listed out in row one.

Now if you do come across a situation like that with the data that you're using, you can simply select
that row. And then if you go up to the Transform Tab in the Table group, you have a drop down here
where you can specify Use First Row as Headers. Now the next thing that I want to do here is I want to
split up this product column.

As we mentioned, we have two pieces of information. In this column, we have the actual product. But
then in brackets after the product, we have the store location. And really, I want these in two separate
columns. So, this is really easy to do in Power Query. All we need to do is select the column that we
want to split up, and then from the Transform Tab just above where we are, we can go to Split Columns.

We can now tell Power Query where we want to split our data. Now I'm going to say I want to split by
delimiter. And I can then choose my delimiter from the drop down. Now remember, your delimiter is
basically for example if I had a colon separating Chicken Fajita Wrap and Potsdam, I could choose to
split the column at the point of the colon. Now I don't, but I do have an opening bracket. I want to split
the column just before every single opening bracket.

So, what I can do here is I can say, Custom, because bracket isn't one of the options that I have listed
above. So, let's go for Custom, I'm gonna say split the column at the first open bracket. And I'm going to
split out each occurrence of the delimiter. Now I know that we only have one opening bracket in each of
these records. So, let's click on Ok, and check out what happens. I now have two separate columns, one
called Product 1 and one called Product 2. And in the Product 1 column, I have exactly what I wanted, I
have just the products without the actual location.

Now if we look in the Product 2 column, it's almost got it right, we have the location, but we have this
trailing bracket that we need to get rid of. Now this is where we can use the Replace Values button. And
you'll find this in two places, you can find it on the Transform Tab in the Any Column group, it's just
here. Or, you can find it on the Home tab, in the Transform group, we have it here as well; Replace
Values.

So basically, what we want to do here is just replace the closing bracket with nothing. So the value to
find is the closing bracket, and we're going to replace it with nothing. Click on Ok. And there we go,
like magic. In a few clicks, we've managed to separate this data out and tidy it up so it's consistent. The
final thing left to do is rename these columns, because I don't want them called Product 1 and Product 2.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

So, all we need to do here is double-click in the column heading. We're going to call this one Product,
double-click in this one, and we're going to call it Location. And everything that I've done has been
logged in Applied Steps. So, let's give this data one final glance, everything is looking pretty consistent,
pretty good. I can see here that Unit Cost and Unit Price has gone back to its old formatting, I think
probably when I deleted one of those Applied Steps. So, let's change that back to Currency. And that all
looks pretty good.

One final thing I want to show you here before we load this into Excel, and this really gives you an idea
as to the capabilities of Power Query. If you want to, you can start doing things like adding columns,
you can even create what we call Calculated Columns, where you use your field headings to perform
calculations on your data. So, let me show you a quick example. You can see here that we have a
column for Unit Price, and then we also have a column for Sales Quantity.

Now actually looking at this, Sales Quantity doesn't need to be Currency format. This is just a number,
it's the number of items that we've sold. So, let's change this back to Whole Number. Now if I wanted to
work out what the Total Sales were, I can perform a calculation with the Unit Price column and the
Sales Quantity column. It would just be a multiplication Unit Price multiplied by Sales Quantity to get
the Total.

Now we don't need to go back to our original data set and add that in with a formula. We can do it from
directly within Power Query. So, what we could do here if we wanted to add that information, is go up
to the Add Column Tab, and go to Custom Column. We can give our column a name, so let's just call
this Total. And now, we can provide a Custom Column formula. And much like calculated fields in
Excel, what we have available for our calculations are all of the column headings from our data.

So, I can simply select Unit Price, double-click, and the calculation we want to perform is we want to
multiply it by the Sales Quantity, and click on Ok. And in a couple of seconds, you can see that we now
have a brand new column with all of those totals.

The final thing to do is just apply some Currency Formatting, and that is how simple it is. You don't
really need to know any formulas at all. So now, my data is pretty much ready to import into Excel. And
that's exactly what we're going to do in the next lesson.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Loading Files into Excel

Deb: Now that we've used Power Query to tidy up and clean our data and get it into a consistent format,
it's now time for us to load it into Excel. And again, this is a really straightforward process, all we need
to do is jump up to the Home tab. And in the first group, that Close group, we have a little drop down.
And we can choose if we want to Close and Load or Close and Load To somewhere specific.

Now we're just going to choose Close and Load because this will close this Power Query window and
load the results into our default destination, which for us is Excel. So let's Close and Load. And this can
take a couple of seconds whilst it creates the connections. But there we go, it's now loaded into Excel.

Now the cool thing about this is when it loads it in, it automatically puts it into a table, which means that
any new data that gets added on to the end is automatically going to be included in the table and any
analysis or calculations that we do based off of this data. And of course, if you don't like the Table Style,
you can jump up to Table Design and just change it to something else from here.

Also notice that over on the right-hand side, we now have a Queries and Connections pane that's opened
up. And you can see right to the bottom underneath Other Queries, it's showing our sales data, and it's
telling us how many rows have been loaded. So 39,997. If I hover over it, I get a preview of the data.
And also a little bit of information about where this data has come from. Also notice that on the Table
Design ribbon, the table has been named the same as the query name, so Sales_Data.

And of course, if you want to rename this table something else, then you can definitely do that from
here. Now if we take a look at the data that's been brought across, I can see yep, everything looks pretty
good. I have my two columns that I split up Product and Location. But notice here, Unit Cost, Unit
Price, and Total, these have kind of lost their formatting. I applied the Currency Formatting to these
before I imported. But now if I go to the Home tab, I'm gonna see it's just showing as General Format.

Now I find this quite a lot with Power Query. Sometimes when you set a Data Type, it doesn't actually
come across when you load it into Excel. Now, it’s not too much of a problem, we can simply highlight
the columns and change them to Currency Format. So let's very quickly do that.

Now the last column here, Column I, this is the Calculated Column that we added in Power Query. And
this is basically a calculation of Unit Price multiplied by Sales Quantity. Now, I don't really need this in
the analysis, I just really added it to show you how you can add a column. So, I'm going to right-click,
and we're going to delete that column out.

But aside from that, my data is clean. And it's a lot easier and quicker to do it in Power Query than
maybe importing it directly into Excel, and then using things like Text to Columns, Flash Fill, various
different text functions to tidy up that data. So, I'll leave it up to you to decide which method you prefer.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

So now that we have this data, we can simply perform an analysis. So, it might be that I want to create a
chart or maybe some kind of PivotTable. So, what I can then do is jump up to Table Design, summarize
with PivotTable, let's put it on a new worksheet, and now we are pretty much good to go. So let's grab
the Location, drop that down into rows. Let's grab the Unit Price, drop that into values. And away we
go. And we now have the full functionality of Pivot Tables open to us on this data.

So, that is pretty much the process of importing external data using Get & Transform, cleaning it up in
Power Query, and loading it back into Excel.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Exercise 09

Deb: In this exercise, I'd like you to practice the skills that we've learned in this section on importing
data using Get & Transform, and then transforming that data using Power Query. Now, the first thing I'd
like you to do is use Get & Transform and import the folder called Invoice Data. And you'll find this
folder in the Course Files folder.

Now within that folder, you'll find three invoice files, Invoice 2018, Invoices 2019, and Invoices 2020.
So, I'd like you to import the whole folder using Get & Transform, and I'd like you to transform the data
in Power Query. The first thing I'd like you to do is to combine all of the files together. Once you've
done that, I'd like you to look at your data and remove any columns that aren't necessary in the analysis.

I'd like you to ensure that each column is using the correct Data Type. And then I'd like you to split the
client column into two columns, Client and Location. And, just ensure that you're splitting at the
delimiter. I'd then like you to trim the data contained within the new Location column. And then finally,
I'd like you to close and load the data into Excel.

So, the first thing you need to do here is make sure that you have the Invoice Data folder downloaded to
your PC, and you should be good to go with this exercise. If you'd like to see my answer, then please
keep watching.

So the first thing we need to do here is we need to import the folder Invoice Data. So I'm going to jump
up to Data, and we're going to go to Get Data, From File, and we're going to choose From Folder.
Navigate to where you have the Invoice Data folder stored, select it, and click Open. And from here,
we're going to transform the data. So using our Action buttons at the bottom, we want to select
Transform data to open the files in Power Query.

Now the first thing I asked you to do here was to combine all of these files together because again, they
are completely consistent. They all have the same column headings, just different data for the different
years. So, a quick way to combine these files together is to go to the Content column, and click on the
two down arrows; Combine Files.

Power Query will evaluate your request, and then it will present you with an example of the first file.
This all looks good to me, let's click on Ok. And that's going to load those combined files into Power
Query so we can make some further transformations. So if I click the drop down and click Load More, I
can see that yes, I have all three of my files.

The first thing I asked you to do at this stage was to take a look at the columns and just remove any that
aren't going to be necessary in your analysis. And if you recall, I mentioned when we were going
through the lesson that columns like the Source Name, which just basically tell us the file name, are not

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

really something that we would include if we're analyzing this data. So, we're going to right-click and
remove the Source Name column. We're then going to go through and check to make sure that we have
the correct Data Types applied to each of the columns.

So Invoice ID, that is a Whole Number, that's fine. We have Dates just here, this is Text, which is fine.
The Amount, now I'm going to set Currency. Sometimes this gets lost when you do the import. But I
want these to be Currency columns. So, let's just change all of those to Currency. So, that's looking
pretty good.

The next thing I asked you to do was to break up the Client column. If you notice, here we have the
client name, then we have a comma, then a space and then we have the location. And I want this to be in
two columns. So if we select the Client column, on the Home tab, we can go to Split Column, and we're
going to split it by delimiter. Because we're going to use the comma as our reference point.

Power Query has recognized that we do in fact, have a comma as our delimiter. So, I don't need to make
any changes here, I can simply click on Ok. And what I should find is that I now have two separate
columns. Let's rename our columns so that this makes a little bit more sense. I'm going to double-click
up here, and we're going to name this Location. Double-click up here, and this is just going to be Client.
Now because we had a comma space, it means that all of these locations actually have an erroneous
space at the beginning here.

So, the next thing I asked you to do was to apply some trimming. And I did briefly show you this in the
lesson. It's not something we applied when we were actually going through the tutorial. But I did show
you where it was. So hopefully, you took note of that. We need to select the column, go to Transform,
and in this format drop down, we have a Trim option. And you should see that as soon as I do that, it
actually nudges those locations a bit closer to the column boundary. And that is pretty much it.

Now we're done. We just need to load this into Excel. So let's jump up to Home, Close and Load, and
that's going to load it in. And this is what you should have ended up with. Now again, obviously take a
look that the Currency Formatting has actually come across. So if you wanted to, you could very quickly
just change that to Currency Formatting.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Section 10 – Getting Data with FRED


Video: Getting Data with FRED

Deb: Forecasting is the process of predicting future values based on current or historical data. And the
reason why Forecasting is so important in businesses is that it helps us understand trends in our data, and
make better business decisions going forward.

If you work in the retail sector, maybe for a very large store, you might want to predict future sales
values based on historical data. And fortunately, in Excel, we have a number of different tools and
utilities that can help us when it comes to Forecasting. So in the next couple of lessons, I'm going to
show you how you can use Excel functions to forecast and also how you can use a simple and newer
utility called Forecast Sheets, which takes all the hard work out of Forecasting and creating graphs.

Now in this first lesson, I just want to start out by showing you a really nice add-in that I recently
discovered for quickly getting some data that you can use to practice Forecasting. Because, that's one of
the things I really struggled with when I was trying to learn Forecasting in Excel. And that was getting
some data that was large enough or appropriate.

Fortunately, after a little bit of Googling, I stumbled across a video where I saw somebody using this
add-in, and I thought this would be a great opportunity to show you how you can quickly grab some
data. Now this add-in is called FRED. And you can see that I have it loaded up because I have a brand
new ribbon called FRED at the top here.

And what FRED allows you to do is basically very quickly import US Data or International Data from a
number of countries, and use that not only to do forecasting, but many other things if you just need a
quick data set. Now if you're wondering how to load this up, that is exactly what I'm going to show you
in this lesson. Now you'll find Add-ins on the Insert tab in the middle just here. So, you want to go
straight to Get Add-ins.

Now, if you're looking for this particular add-in, the quickest way to find it is simply to click in the
Search area and type in FRED. And let's run that search, and it's this one here that you want. And you
can see here that this allows you to download data from the Federal Reserve Bank of St. Louis
Economic Data, which is basically what FRED stands for. So, all you need to do is click on the Add
button, click Continue, and then it's going to load up the ribbon like it has just here. So, how does FRED
work?

Well, let's go across to the Browse Popular FRED Data group and choose some data. Now I have a
choice here of US Data. Or if I wanted to, I could select International Data. And you can see that we can
pull in data from numerous different countries. Now for this example, I'm going to use US Data. It then

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

presents me with a few different popular US Data categories. So, it really depends what kind of data
you're interested in. Now I'm going to click on Production and Business Activity. And I think we're just
going to use this one here, Real Retail and Food Services Sales.

Now, if I click on this, what you'll notice is that in cell A1, I now have this little piece of code RRSFS.
Now you don't need to worry too much about what that means. All you need to do is make sure you
have that cell selected. And then from the FRED Tab, click on Get Data. And that will basically
download all of that data into Excel. You can see a little bit of information at the top. And then we have
our two columns, we have our Date, and we have our Value.

So, this is Retail and Food Service Sales from basically 1992 to 2022-01-01. Now this is a pretty large
data set. If I press Ctrl + Down Arrow, you can see it goes all the way down 368 rows, there might be
that if you're just practicing some Forecasting, you don't really need this much data. Now one of the
coolest things about this is that it's so quick to change your date range.

So for example, maybe I'm only interested in looking at data between 2015 and 2022, I don't need to go
through and delete out all of these dates that I don't need. All I need to do is jump up to my date range
up here and change the value. So I'm going to double-click here and let's change 1992 to 2015 and hit
Enter. Now if I click the Get Data button again, would you take a look at that, my data now runs from
2015 down to 2022. So now, we only have 92 rows of data. So, a really nice quick way of modifying
your date range.

Now, of course, if I want to use this, I don't particularly need any of this information above, so I can
select the rows, right-click and just delete those out. And then I can apply whatever formatting I want to
these column headings. And I have a really nice working data set to practice Forecasting, create tables,
Pivot Charts, so on and so forth. So, if you're struggling to come up with a data set to practice your
Forecasting, this is a great option that you might want to consider.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Creating a Linear Sales Forecast

Deb: Let's start out by taking a look at how we can use Excel’s inbuilt FORECAST Functions to create
a Forecast, see trends and predict future values. Now, one thing you have to remember when you're
Forecasting is that it does rely on time based data. And what we mean by that is data or values that
change over a period of time.

So, what you're always going to need in your data set in order to do this accurately is a column that
contains some dates, and then a column that contains some values. So, this data that I'm using might be,
let's say, sales for a mega store. And you can see that we're taking data from 2010, all the way down to
2021. And this data has been logged at various different points throughout the year.

So, you can see that they've taken a reading of their sales at the end of January, the end of April, the end
of July, and the end of October. And that pattern is repeated for all of the years through to 2021. So now,
what we want to do is we want to predict what our sales are going to be going forward. And there's a
few different ways that we can do this.

So in the next few lessons, I'm going to show you all of the different FORECAST Functions that you
have available in Excel, then once you kind of understand how those actually work, I'm then going to
show you a quick and simple way to do it.

Now the first thing I would always recommend before you even get into Forecasting is that you take the
data that you currently have and create a quick Line Chart, so you can really get an idea as to the type of
data that you're looking at.

So, I'm going to click somewhere in my data, let's jump up to Insert, and we're going to insert a quick 2-
D Line Chart. So, this is my data. And one thing that stands out to me about this particular data set is
that we have numerous peaks and troughs. And this kind of continues at various different levels all the
way through the different years. Now, this implies to me that there is some kind of seasonality with this
particular data set.

Now, what I mean by seasonality is that at certain points of the year, sales might go up and at certain
points of the year, sales might go down. And if you do have data that does show signs of seasonality,
then that's really going to affect how you forecast the data. So, always worth coming in here, and taking
a quick look. Now if you're thinking to yourself, well, my data kind of goes up and down. Or maybe
you're thinking my data is reasonably flat.

Now, if you have a data set where the line is reasonably consistent and reasonably flat, maybe it just
slopes up one way or maybe just slowly slopes down, that would be more what we call Linear Data. And
the reason why I'm mentioning this is because you'll see in a moment when we pull up all of the

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

different functions that you have for Forecasting in Excel, there are some which are more relevant for
Linear Data, and some which are more relevant to data that has some kind of seasonality to it.

Now, my data does have seasonality, but I'm going to show you first an example of how we can put
together a Linear Forecast. And you'll see quite clearly in a moment why it's not really appropriate for
the data that we're using in this example. So, let's make this chart a bit smaller, I'm not going to delete it,
we're just going to kind of shove it over there for the time being.

Now the first thing I need to do here is I need to add some dates on to the bottom, because we want to
predict future values. Now, because mine are fairly consistent, we take data readings at the end of
January, April, July, and October, I'm just going to use this pattern and I'm going to drag it down, you
can see that Excel works out but I want the next year. So, let's just go to the end of 2023. So, we want to
predict the future sales values for these two years. And as I mentioned, first, we're going to do this using
a Linear Forecast.

So, let's go back up to the top and let's just type in a title. We're going to call this Linear Forecast. And
let's apply a different color formatting to differentiate it. So let's do a little bit of Blue and some White
text. Okay, now, as I mentioned, the first thing we're going to do here is a Linear Forecast, which isn't
really suitable for the type of data that we have. But I want to show you this anyway.

Now, a Linear Forecast would be suitable if you have fairly predictable data that's either all going up or
all going down. That is when you would use a list The Forecast. So let's type in =FORECAST, and you
can see just how many FORECAST Functions we have in Excel. Now, the bottom one used to be the go
to function that everybody would use. But notice we have that little warning triangle next to it, which
just lets us know that this is an old function, which has since been replaced with better newer functions.

Now, if you're going to do a Linear Forecast, as you would expect, it's this one that you want to choose
FORECAST.LINEAR. So let's double-click and take a look at the arguments. So, we have three
arguments. Here we have x, known ys, and known xs. And that's the other thing you need to be aware of
when you're trying to put together a Forecast. Your x values are your dates, and your y values are your
sales in this case.

Now the first argument x is basically the first date that we want to predict. So, that is going to be cell
A50, comma. We then need to provide our known y values. So, our y values are our sales in millions.
And these are unknown values, let's select them all, comma. We then need to provide our known xs. So,
this is fairly straightforward; our dates are our x values. So, we want all of the known xs, and that is
pretty much it.

If we close the bracket and hit Enter, we can then drag this down. And these are our predicted values if
our data is Linear. So, let's take a look at what this looks like when we put together a Line Chart. So let's

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

select all of our data all the way down, including our Linear Forecast. Let's jump up to Insert, and we're
going to insert another Line Chart. Now, take a look at this. Notice the legend at the bottom, we can see
sales in millions, and then we have our Forecast on the end; our Linear Forecast.

Now notice how this Forecast looks completely different to the original data. And that's because we've
done a Linear Forecast. So, this really works on data that has a predictable, smooth trend upwards or
trend downwards. This doesn't really predict accurately our results based on our data set, which is why I
wouldn't use this for this type of data. But if you do have Linear Data, then this is going to work out
perfectly.

And of course, you could apply some formatting to this chart to make this look a little bit better. But
we're just going to leave it. But we are going to give it a title so we can do a good comparison between
all of the different Forecast charts that we create. So, this is a Linear Forecast. And we're just going to
drag this over and place it underneath our other Line Chart. Let's also drag it out to make it more
consistent.

So now, we've seen what a Linear Forecast looks like. In the next lesson, I'm going to show you the
correct Forecast to use for data that contains seasonality which is the data that we're using. So, I'm going
to hop over there now, and I look forward to you joining me.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Creating a Sales Forecast with Seasonality

Deb: In the last lesson, we saw how we can predict future values using the FORECAST.LINEAR
Function. And the result of that was a graph which looked something like this.

Now, as I mentioned, because our data is not linear, this isn't the best function to use for our type of
data. And our data, if we take a look at this first chart here has some sort of seasonality to it. We have
peaks and troughs, sales increase and decrease at certain points in the year. So, let's now take a look at
how we can predict values when our data has seasonality. And we can do this using another Excel
function that's called FORECAST.ETS.

Now the ETS part stands for exponential triple smoothing. This isn't a term that you need to worry too
much about. All you really need to know is that you use this function when you have data that contains
seasonality. So, let's add a quick column heading. This time, we're going to say ETS Forecast. And let's
give this a different color background so it stands out, let's do a bright Yellow. Like so. So now, if we
scroll down, we're going to do a very similar thing, but we're just going to use a different formula.

So, let's type in FORECAST, and the first one in the list is the one that we want. And if we take a look at
the ScreenTip, it says; ‘Returns the Forecasted value for a specific future target date using exponential
smoothing method’. So, this is what we want for our type of data. So, I would expect this to be more
accurate, because this formula requires us to be a bit more detailed with our inputs. So, let's double-click
to select.

Now, notice we have a lot more arguments just here. Now, the last three are all optional arguments,
because they're in square brackets. Now the first argument is the target date. So again, this is the first
day that we want to predict a value for. So again, that is cell A50. Now, this time, instead of having a
known xs and a known ys argument, we have values and timeline, which basically means the same
thing, it's just a little bit easier to understand.

So our values, this is basically our known ys. So, that is our sales data, just here, comma, our timeline.
This is basically our known xs. So, we want to add dates for the next argument. So, let's grab all of those
like so. Now, notice, if I press the comma, it then moves me on to the seasonality argument. Now, if we
don't add anything in here, Excel is going to work out the seasonality for itself. So, let's see how good of
a job it does. I'm just going to close off the bracket just here, hit Enter, and we're going to drag those
values down.

So, now that I have these new predicted future values, let's create another Line Chart and see what that
looks like. So this time, I'm going to select all of this data, I don't want my linear values, but I do want
these values. So, if you want to select columns or cells that are non-contiguous or not next to each other,

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

you just need to make sure that you hold down the Ctrl key when you make your next selection. So
we're going to select this column just here.

So now we've made our selection, let's jump up to Insert, let's go across the Line Charts and create
ourselves another Line Chart. Now take a look at that. This looks a lot more in keeping with our data.
So, Excel has done a pretty good job at working out the seasonality of our data and predicting our future
values based on that.

So, that is quite a difference than when we did the Linear Forecast. So, this is why it's important to really
at the beginning, take a look at the data that you have, create a quick Line Chart, because that's going to
really show you the function that's going to best suit the data that you have. So, let's put this underneath
and we'll call this ETS Forecast.

So now that we have our ETS Forecast, we're going to move on to the next lesson where we talk about
Confidence Levels. Because, these are also really important to add to your Forecast, because it will
essentially show you a range from which your predicted values will fall into. But we're going to talk
about this more in the next lesson. So, please join me over there.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Adding Confidence Levels

Deb: In the previous lesson, we created an ETS Forecast which better suits our data than the Linear
Forecast. And if we take a look at the Line Graph that we've created for the ETS Forecast, we can see
our Forecast on the end here showing in orange.

Now, these are our predicted values for the next two years. And what you'll find with most Forecasts is
that along with the predicted values, you'll also have a line which shows the Upper Confidence Level,
and a line that shows the Lower Confidence Level. And these are normally set to a percentage. So for
example, the default in Excel is 95%. So, what that means is that the predicted values, 95% of them will
fall within the Upper Confidence and the Lower Confidence Bound. So, how do we show these on our
Forecast?

Well, this is going to involve a few more formulas. So, let's add another column to our data set, we're
going to call this Confidence Level. And let's put this in a different color, we're going to go for an
orange this time with White text. So, let's scroll down to the bottom. And this time, we're going to use a
different formula.

So, we're going to type in FORECAST, and the one that will work out your Confidence Level is this one
that just here, FORECAST.ETS.CONFINT. And if we hover our mouse over it and take a look at the
ScreenTip, it says; ‘It returns a confidence interval for the Forecast value at the specific target date’. So,
let's double-click and take a look at our arguments.

Well, these are fairly similar to the last formula that we constructed. The last four this time are optional,
because they're in square brackets. So, let's add in our target date, our values, and our timeline. So, our
target date is going to be the date that we have in cell A15, our values are going to be our known ys, so
our sales in millions, our timeline is going to be dates, so our known xs, and then we can define
Confidence Level seasonality, so on and so forth.

Now, like the last formula, we didn't actually add seasonality in, we just got Excel to work that out for
us, we can do the same with Confidence Level. If we don't specify a specific Confidence Level, Excel
will use the default, which is 95%. And I'm pretty happy with that. So, I'm simply going to close off my
formula and hit Enter. Let's copy this down.

So now that we have our Confidence Level, we can use these values to work out our Upper Confidence
Bound and our Lower Confidence Bound. So, let's add two more columns. We're gonna say, Upper
Bound and Lower Bound. And we'll put both of these in the same color because they are kind of related.
So, let's do a Purple color for these with White text. So how do we work out our Upper Bound?

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Well, we just need to perform a very simple calculation. We have our predicted value just here, this is
our ETS Forecast. So, all we really need to do here is add our Confidence Level onto this value. So, this
is a very straightforward calculation, we just want to say =D50 + our Confidence Level and hit Enter,
we can then copy that down. So, these values are now going to be our Upper Confidence Bound. And if
we take a look at this first value, the predicted value is 20,417, and our Upper Forecast bound is 25,278.

So, 95% of our predicted values are going to fall below these values just here. We need to do pretty
much the same for our Lower Confidence Bound, but we need to do a subtraction instead. So this time,
we want to take our predicted value, and we want to minus the Confidence Level, and hit Enter. And
now, we can drag down.

So, for this first one where our predicted value is 20,417, 95% of predictive values will fall between
15,556 and 25,278. So, we've given ourselves quite a wide range where those predicted values are going
to be correct. So, now that we have our Upper Level and our Lower Level, we can add these in to our
Line Charts. So, this time we want to select all of this data just here, we want our ETS Forecast. So, let's
hold down Ctrl and select this column.

We don't want to include our Confidence Level, but we do want the last two columns. So, we can select
both of these as well. And now we can create our Line Chart. So let's jump in here, let's grab our Line
Chart, and then we can drag that over and take a look at it, we have our predicted values in the middle,
and then we have our Upper Bound and Lower Bound. And of course, you can apply formatting to this
chart to make these lines look a little bit better.

Now I'm going to leave you to do that if you want to, let's just give our chart a title; Upper and Lower
Confidence Bound. And then we can drag this chart over and just place it underneath. So now that we
have these charts, we can really get a good comparison between all of them. So, if I zoom out a little bit
so we can see all four, remember, we started out with just our plain data. This helped us identify the type
of data that we're using, we worked out that we were using seasonal data.

We then produced a Line Chart to show a Linear Forecast, which didn't really work for our data type.
But this will work for predictable values that have a smooth steady increase or decrease. We then did an
ETS Forecast which was suitable for our data because it includes seasonality. And then finally, we
added an Upper and Lower Confidence Bound to show the range in which 95% of all predictive values
will fall within.

So, that is how you can use Excel functions to create Forecasts. Now that we've done that, and we have
more of an understanding about Forecasts and the types of Forecasts that we can do, I'm going to show
you a much easier way to do this using Forecast Sheets.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Using Forecast Sheets

Deb: In the last few lessons, I've been showing you how you can use Excel functions to create different
types of Forecasts. And now in this lesson, I'm going to show you the easy way to do this. Now, the
reason why I didn't show you this, first of all, was because I think it's really important to understand
exactly what you're doing when you're putting together Forecasts.

It's also important to understand the different types of Forecast you can do, and how the type of data that
you're using affects which function you use. But saying that, if I was asked to put together a Forecast, I
would definitely go straight to Forecast Sheets, as opposed to putting everything together myself using
FORECAST Functions. So, let me show you how simple this is.

Now we're going to be using the same data, we have our dates, and we have our sales in millions. And
we still have our predicted dates listed out here, but we need to work out our Forecasted values. So let's
click in our data, and what we're going to do is we're going to jump up to the Data Tab, and all the way
over in the Forecast group, we have a Forecast Sheet button.

Now if we take a look at the ScreenTip, it says; ‘It creates a new worksheet to predict data trends’. We
can preview different Forecast options before generating your visual Forecast worksheet. So basically,
this magic little utility takes all the hard work out of creating Forecasts, we just need to provide a few
inputs. So, let's click on Forecast Sheets. Now take a look at that. It's already showing me a preview of
my data. And I can see not only my Forecast, but it's also given me that Upper Confidence Bound and
that Lower Confidence Bound as well.

So, I haven't had to do anything aside from click on that Forecast Sheet button. And the cool thing is in
the top corner, it's currently showing as a Line Chart, but if we wanted to, we could create a Column
Chart instead. So now you can see in orange, we have the predicted or the Forecast values, and then this
bar represents the Upper and Lower Confidence Bound. Now, we're going to stick with a Line Chart and
take a look at some of the options that we can modify in this window.

Now the first thing we can modify is the Forecast End. So currently, this Forecast End is being taken
from the last date that I have in my data set. But if I wanted to extend this out, I could simply click on
the Calendar and choose an end date for my Forecast. Let's expand Options. So, this is where we can
add a little bit more detail into the Forecast, we can also set a Forecast Start Date. So, this is the date
where we have our first Forecasted value.

Now what you can do here, if you wanted to, was set this date to slightly earlier, so that we can really
get a good comparison and see how accurate our Forecasted values are without actual values. So, what I
could do is maybe set this to a week before. Now notice when I do that, what happens to my Line Chart.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

You can see now, the Forecast is actually fairly accurate, because the orange line is almost overlapping
the Blue one. And I could take the date back even further if I wanted to compare the accuracy.

Notice underneath we then have the Confidence Interval. As I said, the default in Excel is 95%. And in
general, I leave it and 95%, but you could modify this if you wanted to. We then have a Seasonality
Options. So, we can choose to Detect Automatically or we can Set it Manually. Now again, I generally
tend to leave this on Detect Automatically because Excel does an excellent job. But if you wanted to set
this manually, you could. For example, maybe I want to set this to the quarters of the year. So, I would
set my seasonality to four instead. Now I'm not going to do that, I'm just going to choose Detect
Automatically.

I could choose to include Forecast Statistics. So, let's do that so you can see what that looks like. And
then on the right-hand side, we just have our Timeline Range, which is already selected and our Values
Range. We then have a Fill Missing Points option. And it's currently set to Interpolation. I'm probably
saying that completely wrong and statistics gurus out there will be cursing my name. Interpolation,
interpolation, however you want to say it, the only other option you have is zeros.

Now what this basically means is that if we have any gaps in our data, any missing data points, how do
we want Excel to fill those gaps? So interpolation is just going to fill them in based on the trend, or we
could just have it set to zeros. And then finally I get an option as to how I want to aggregate duplicates.
Do I want to take an AVERAGE, a COUNT, a MAX, a MIN, a SUM? So on and so forth. Now, I'm
going to leave this on AVERAGE.

So basically, I leave most of these default options as they are. The only thing I generally tend to change
occasionally is the Forecast End date, the Forecast Start date, and if I want to include Forecast Statistics.
So, let's click on Create. And would you take a look at that, pretty much all of the work that we did in
the last few lessons is done for us using Forecast Sheets.

It gives us our different columns, we get our predicted values, our Upper Confidence and Lower
Confidence at the bottom, and we get a nice Line Chart that shows all of that data. And of course, if we
wanted to, we can add a nice Chart Title, and format this chart however we want.

Notice that we also have this little statistics table at the top. I will say that I am not a statistical expert,
and so what exactly these mean, I am not 100% sure. But if you do work in that field, then this could be
information that's useful to you. But that is Forecast Sheets.

One thing to note is that if you click on any of these Forecast values, take a look in the Forecast bar. It's
picked up that my data has seasonality, and it's applied the FORECAST.ETS formula to my results.
Now if my data was slightly different, it might be that Excel will use the FORECAST.LINEAR
Function instead, to work out these Forecasted values.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Notice that if we move across to the Lower Confidence Bound, take a look at that formula, which is
pretty much what we did previously, it’s using that FORECAST.ETS.CONFINT Function. If we go to
the Upper Confidence Bound, it's doing the same thing but we're doing a plus as opposed to a minus. So,
that Forecast Sheets button really is a fantastic time-saving utility that's reasonably new to Excel, which
will allow you to create Forecasts with essentially the click of one button.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Exercise 10

Deb: In this exercise, we're going to practice some of the skills that we've learned in this section on
Forecasting. And this time, we're going to be using temperature data.

So, you can see in Columns A and B, I have some dates, and I also have the average temperature taken
at various different points throughout the year. And my data runs from 2015, all the way down to 2021.
And what I'd like you to do is to create a Forecast for the temperature for 2022 and 2023.

Now, if you recall, when we were looking at this, during the sessions, I showed you a few different
techniques you can use, and one of them was a lot easier and simpler than some of the others. And I
don't really mind which method you choose to use to do this Forecast. If you'd like to practice using the
formulas, then please feel free to do that.

Alternatively, if you'd like to go for the simpler method, and use Forecast Sheets, that's okay too. What I
really want you to do here is just practice putting together a Forecast and knowing that if you're asked to
do that, you know where to go. So, give this a go. If you'd like to see my answer, then please keep
watching.

So, I'm going to use the simple method to do this, I'm going to use Forecast Sheets. So, all I need to do is
click in my data, and then on the Data Tab, in the Forecast group, I'm going to select Forecast Sheet.
And like magic, take a look at that. If we expand the options and just check to make sure that everything
in here is correct; I've got my Forecast End date, my Forecast Start date, my Confidence Interval is set to
95%, and it's automatically detected that I have a certain amount of seasonality to this data.

So, all I need to do is click on Create. And there, my chart is created. And that is really it. We could add
a little Chart Title in here if we want to, so everybody knows what this is. So we're gonna say Predicted
Temperatures for 2022 and 2023. But it's as simple as that. That is all I needed from you in this exercise.
That's it for now, I'll see you in the next one.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Section 11 – Using a Macro to Automate Tasks


Video: Using a Macro to Automate Tasks

Deb: Macros help us automate repetitive tasks, giving you more time to focus on the really important
stuff. And all a macro really is, is a recording of different steps, different commands that you execute in
Excel converted to VBA code, which we can then rerun at a later time on different data.

So for example, if maybe each week you receive a report from a colleague, and you have to go through
and tidy up that report, maybe you have to remove the blank rows, maybe you have to apply Number
Formatting to particular columns, maybe you need to add and format a heading, and then maybe print
that report.

Well, instead of doing all of those repetitive tasks each week, you could create a macro, which you can
click on which will execute all of those steps for you. So, macros are effectively a really great time-
saving feature. And throughout the balance of this section, I'm going to show you how you can record
some simple to more complex macros, how you can understand the basics of VBA code, I'm going to
show you how you can make your macros really user friendly, and how you can create your own Macro
ribbons to make them easy to access.

Now before we get too far ahead of ourselves, let's just take a look at some macros in action, so you can
understand exactly what they do. And I have quite a few examples in this workbook of useful macros.
Now one thing you have to remember with macros is that you're going to find them on the Developer
tab. So once again, if you don't have this Developer tab turned on, then you're going to need to go into
Excel Options like we did for Form Controls and make sure that you have a tick in the box.

Once you do, you're going to be able to see this first group here called Code. And this basically contains
all of the commands you need to run and execute macros. Now for the time being, or for at least this
lesson, we don't really need this, because I've already created the macros for each of these worksheets.
And if you're curious as to where those macros are housed, if we click on the Macros button, you can
see the different macros that I have set up in this workbook.

So, what we're going to do is we're going to run each of these so you can see how they work. So, this
first macro, this is going to help me delete all the blank rows from this data set. So, you can see that we
have a few blank rows running throughout this data set. And it might be that I have a worksheet that has
thousands of rows that I quickly want to remove the blank rows from.

Now because I've set this up in a macro, all I need to do is click on the Macros button, find the correct
macro, which is this one here, Delete_Blank_Rows, and click on Run. And would you take a look at
that, like magic, all of those blank rows have now been deleted. On the next worksheet, I want to apply

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Accounting format to Columns D all the way across to Column J. Currently, the values in these columns
just have General Formatting applied. And I want to change this to Accounting format. Now I've already
set up a macro to do this. So if we jump into the Developer ribbon, open up Macros, it's this one just
here, Accounting_Format.

Now you're going to see a few easier ways of executing these macros as we go through this section.
You're not expected to come into this macro area each time, find the macro, and click on Run, because
you can use the Keyboard Shortcut or you can assign it to the Quick Access Toolbar. But we're going to
talk about that a bit later on. For the time being, let's just run them from here. So, I'm going to select
Accounting_Format, and click on the Run button. Now notice it's only applied Accounting format to the
cell I was clicked on.

So, another really important point about macros, make sure that you select the cell range that you want
to run them on. So, Ctrl + Shift + Down, that looks pretty good. Let's rerun that macro. And now I have
Accounting format applied to all of those cells. Let's jump across to the next worksheet.

In this example, I want to format this data as a table. Let's open up our Macros, let's find the correct
macro, which is this one just here, Format_As_Table, and click on Run. Hopefully, you're seeing how
much quicker this can be. What about if I want to do things like apply Conditional Formatting?

Well, I can do that too using a macro. All I need to do here is select the range that I want to apply the
data bars to, and then I can go into Macros. Let's choose the Data_Bars macro, and click on Run. I can
also use a macro to remove all hyperlinks from these URLs. So, I'm going to select the range, open up
Macros, and this time, we're going to choose Remove_Hyperlink. As you can see, it makes automating
all of these types of tasks a lot quicker.

Now, we're just doing single tasks here, and we are going to look at a more complex example as we go
through this section. But let's take a look at a couple more examples. What about if I want to apply some
Conditional Formatting? Well, we have a macro for that. I can select all of the data, go to Macros, let's
choose Highlight_Cells, and click on Run. So, this macro is highlighting all cells that are greater than
$9,000. What about this next one?

Here, we want to calculate the percentage of profit to revenue. And notice that I have a button just above
that says Calculate_Percentage. Now, what this means is that all I need to do is highlight the cells and I
can just click Calculate_Percentage, and I get the result that I'm looking for. And we're also gonna see
how we can assign macros to buttons in this section as well.

Now the final macro I have in here, which I haven't yet showed you is the New_Worksheet macro.
Because we can use macros to do things like create new workbooks. If I run this one, notice that at the
bottom, I now have a new worksheet called Sheet1. So, those are some really nice examples of how you

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

can use or how you can incorporate macros into your daily work to streamline your workflow and
automate repetitive tasks.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Recording, Saving, Running Macros

Deb: The beauty of macros is that we don't need to know anything about coding in order to create them
because we have the Macro Recorder.

Now, the Macro Recorder simply record that actions as steps and it converts it to VBA code. So, all we
need to do is save the macro, and then we can reuse it. And when you run a macro, it's basically just
rerunning the recorded steps. So we're going to take a look at a few examples of this in this section, and
I'm going to show you exactly how easy it is to automate your repetitive tasks.

Now, when it comes to recording macros, there are a few different places where you can go to turn on
your Macro Recorder. Now you can find the Macro Recorder on the Developer tab. So again, make sure
that you have that tab turned on. In the first group, that Code group, we have a Record Macro button just
here. So, you can start your recorder by clicking on this button.

The second place you can go to start recording a macro is on the View ribbon all the way at the end, we
have a Macros group. And if we click the drop down, we have a Record Macro button in there as well.
And the third place you can go to Record Macros is down in the Status Bar in the bottom left-hand
corner. If you notice next few where it says ‘Ready’, we have a little icon just here. Now this is actually
the Macro Recorder.

Notice that when I hover my mouse over it, it says that, ‘No macros are currently recording’, which is
correct. Now if you can't see that icon for some reason, it might mean that you have to right-click on the
Status Bar, and make sure that you have Macro Recording Enabled. If you don't have a tick next to this
option, then you're not going to be able to see the Macro Recorder in the Status Bar. So, you can choose
any one of those three methods to start recording a macro.

Now, we're going to start out by recording a very simple macro so you can kind of get the idea as to how
this works. So, let's set up our scenario. Maybe every week, I need to create a weekly overview report
for the sales team. And each week I type in the heading, I format the heading and then I copy and paste
the data in from another worksheet. So, maybe I want to automate the process of typing out the report
heading each week.

Now before I show you how to create a macro to do this, let's take a look at the number of steps it would
take us to do this manually. So the first thing I would do would be to click in cell A1 and type in the
heading of the report, Weekly Overview Report Sales Team, what I then might do is select the row, go
to the Home tab and then I can apply some formatting. So let's take this up so it's a little bit bigger, let's
make it Bold.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Maybe I want to change the background fill to Blue, the font to White, and then I'm ready to copy and
paste my sales data in. Now, that was probably about six or seven clicks in order to get this heading to
look as I want it to look. And that might not seem like a lot to you. But if you're doing this all the time, it
would be much better to create a macro, which will perform all of those steps with the click of one
button. So, let's clear everything that we've done. And this time, we're going to record the steps using the
Macro Recorder.

So I'm going to click in cell A1, I'm going to jump up to Developer and I'm going to click Record
Macro. Now the Record Macro window that comes up requires us to enter a little bit of information first,
for example, we need to provide a Macro name. Now when you're naming your macros, it's always a
good idea to make the names pretty descriptive. Because if you have lots of macros in Excel over time,
you want to be able to quickly find the macro that you want to run. So, this macro is going to format the
heading of this report.

Now notice there that I'm separating those three words with underscores and that's another important
thing with macros. You can't have any spaces in the macro name, so it needs to be all one word all
separated with underscores. Now at this stage, you can also assign a Shortcut key to your macro. So if
you want to quickly be able to execute the macro simply by using a quick shortcut, then you can assign
that here.

Now I will say you have to be a bit careful with the Shortcut keys because most of the shortcuts in Excel
are already taken by other commands. For example, you wouldn't want to assign the Ctrl + C Keyboard
Shortcut to your macro because it's going to overwrite Ctrl + C which is a very common Keyboard
Shortcut you used for copying. So, what I generally tend to do is I like to add a Shift key into my Macro
Shortcuts.

So, this Shortcut key, I'm going to say is Ctrl + Shift + H. Now if you do choose a Shortcut key that's
already assigned something else in Excel, you will be warned about that when you click Ok on this
window. Now the next thing we need to determine is where we want to store this macro. And you can
see if I click the drop down, I have a couple of options. I can store it in This Workbook, I can store it in
a New Workbook, or I can store it in the Personal Macro Workbook.

So, what's the difference between these three? Well, if I choose to store the macro just in This
Workbook, it means that the macro will only be accessible in this particular workbook. If I want to make
the macro accessible to all of my workbooks, I will need to save it in my Personal Macro Workbook. So,
that is the main difference between those two options. You could also choose to save this in a
completely New Workbook if you wanted to. Now for our examples, I'm going to choose This
Workbook.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

And then finally, we can add a Description. And again, I do I always like to add a description in case
somebody else is looking at this report, I want them to know exactly what this macro does. So, macro to
format the heading of the weekly overview sales report. Now it's also worth noting that as soon as I click
Ok on this window, I'm into recording my macro. So, from that point on, anywhere that I click will be
recorded in the macro. So, just make sure that you know exactly what you want to record before you're
clicking the Ok button.

Another thing to note, if I click on Ok, you can see now that on the Developer ribbon, the Record Macro
button has now changed to Stop Recording because I'm actually in the middle of recording a macro.
Also notice that the icon in the Status Bar has changed to a square. And as I hover over it says, ‘A macro
is currently recording’. Now I'm being pretty careful here not to click anywhere so that I record those
steps in the macro. But one thing to know and a lot of people worry about this is a macro doesn't record
the amount of time it takes you to execute a step.

So, I've been sitting here for about 30 seconds or so talking away, I'm not going to have to wait 30
seconds when I run the macro for it to execute the first step. So, the amount of time you take has no
effect on the amount of time the macro takes to execute. So, with all that said, let's start recording our
steps.

The first thing I want to do is click in cell A1, we're then going to type the name of the report. Let's
apply some formatting. Going to select the row, up to Home, we're going to take the size of the font up
by two. We're going to make the font Bold, and we're going to apply a Blue background fill White font.
And I'm also going to make this a little bit wider, and I'm going to align to the center.

Now the final step is very important. If I was to stop recording my macro now with this first row
highlighted, when I run the macros that is exactly where the macro is going to end. So if you don't want
it to end with the first row highlighted, you want to make sure you select the cell where you want your
cursor to end up. So, I'm going to just click in cell A2, and now I'm going to stop my macro. So, up to
the Developer ribbon, and click Stop Recording.

Now once you've finished recording your macros, they get stored underneath this Macros button just
here. And you can see as we hover over it says, ‘View Macros’. There is a Keyboard Shortcut for this of
Alt + F8. Now if we click this button, this is where you're going to see all of the macros that you've
created. And we have various different actions that we can take on the right-hand side.

We can run our macro from here, we can step into it, we can edit the VBA code, we can delete it, so on
and so forth. Also notice that I'm choosing to show macros in all open workbooks. Currently, I only
have this workbook open. But if I had multiple Excel files open, I could see all of the macros in all of
those workbooks. If I just want to narrow it down to ones that I have in this workbook, I can just select
that from the drop down.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

So now that we have our macro, let's test it out and see if it works. So, I'm going to create a new sheet at
the bottom, and we're going to run our macro. Now remember, we did assign a Keyboard Shortcut to
this, so I could use that. Alternatively, I can jump into Macros and click the Run button, which is exactly
what we're going to do here. So let's click on Run. And would you look at that, the macro has run and
we now have automated the steps to add and format our weekly overview report title.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Recording a Macro with Relative Referencing

Deb: In this lesson, we're going to take a look at how we can record a macro using Relative
Referencing. But before we get on to that, I just wanted to give you a quick heads up about saving
workbooks that contain macros.

So if I try and save this workbook which contains the macro that we created in the last lesson, notice
what happens. Let's click on the Save button, I'm going to get this message pop up. What it says is; ‘The
following features cannot be saved in macro free workbooks, and then it has VB project’. So basically,
Excel is recognizing that we have VBA code in this workbook. And when we have VBA code and
macros in a workbook, we need to save the workbook as a completely different file type.

So currently, my file is saved as an .xlsx as the default Excel file type. But for workbooks that contain
macros, we must save them as Macro Enabled Workbooks. And you'll be able to tell if you've been sent
a workbook that contains macros, because when you open it, you're gonna get a Yellow warning
message across the top, just letting you know that your workbook has macros, and asking you if you
want to enable those or not.

Now the reason why this is so important is because you don't want to open a workbook that contains a
macro that might have malicious code that will run on your system. So, always make sure that you trust
the source of where this Macro Enabled Workbook is coming from. Now I know that I created this
macro, so it's all good. So I'm going to click No on here, and it's going to ask me to re-save.

So, I need to resave this workbook using a different file type. And the file type we need to save it as is
this one just here, Excel Macro Enabled Workbook. It has an .xlsm file extension. So, let's select that,
and click on Save. And my workbook with my macros is now saved correctly. So, now let's talk about
Relative Referencing when you're using macros.

Now it's worth noting that by default, all macros are recorded using Absolute Referencing. So what
exactly do I mean by that? Well, let's take the example of the macro that we recorded in the last lesson,
which basically adds and formats this report header. Now, what about if I wanted to run this macro in a
different part of the workbook? So, maybe I wanted this header again, somewhere down here in Row 18.

We'll check out what happens if I click in Row 18, and run this macro again. We're gonna go up to the
Developer tab, into Macros, and let's just click Run. Well, it doesn't look like it does anything. What it
actually does is it reruns the macro and just puts the heading directly over the top of the existing
heading. And that's because this macro uses Absolute Referencing. So, it's always going to run the
macro in the cells that you selected when you originally recorded the macro.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

So, because I clicked in cell A1 and I started typing this heading out, it's always going to run that macro
in cell A1. So that's not great, because it doesn't provide us with much flexibility. If I want to run this
macro elsewhere, for example, in Row 18, I'm not going to be able to do it with the macro I've recorded
in the state that it's currently in. And this is where Relative Referencing comes in.

And if you take a look at the Developer tab in the Code group, notice that we have a button here that
says, ‘Use Relative References’. And what this will basically do when you select it is it will offset the
starting cell. So, if you've recorded a macro using Relative References, and you've applied it to row 1, if
you then decide you want to apply it to Row 18, Excel effectively uses the OFFSET Function to work
out exactly which cell you want to run this macro in. So, that can be really helpful. So, let's create
another macro, and let's record it using Relative References and see the difference.

Now the first thing to remember here is that if you want to run a macro using Relative References, you
need to make sure that you enable this option prior to recording the macro. And what I'm going to do is
I'm going to record a macro that adds two little headings in here, one that says Team and one that says
Total. And then I'm just going to add in some dummy figures for the sales team. So we're going to turn
on Use Relative References, and we're going to click Record Macro. We're going to give this macro a
name. We're going to call this one Sales_Team_Report.

Once again, we're going to assign a Keyboard Shortcut this time. Let's do Ctrl + Shift + R. I'm going to
store it in This Workbook, and let's just give it a quick description. So, let's click on Ok. So now, I'm
into recording my macro, I'm going to click in cell A3, and I'm going to type my first heading. So this is
going to say Team, we're going to click in cell B3, and this is gonna say, Total. And then I'm just going
to add some data.

Now, let's just apply a little bit of formatting to these headings. I’m going to select both cells, and we're
just going to make those Bold and give them an Underline. Now remember, important to click on
whichever cell you want your macro to end in. So, I'm just going to put it here in cell A9. Let's stop
recording the macro. Up to Developer, click Stop Recording. So, let's see the difference when we run
our macro now that we've recorded it using Relative References.

Now if we jump across to the test worksheet, I'm going to click over here, and I'm going to run my
macro. And this time, I'm going to use the Shortcut key that I assigned to it of Ctrl + Shift + R. And
would you take a look at that. Now, the only thing I didn't add into my macro was to resize the column.
So, I might want to go back and maybe do something like that. But you get the idea.

Now it just so happens that where I rerun this macro is basically in exactly the same cell range as where
I recorded it. So what about if I want to run this macro somewhere over here, maybe in Column M?
Well, let's see if it still works, Ctrl + Shift + R, would you take a look at that, it does. So, I can now
basically rerun this macro anywhere in this workbook.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

So, that is the difference between the default which is Absolute Referencing in macros, and Relative
Referencing in macros. Make sure you know the difference and have a little practice so that you
understand how this works.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Multi-step Macros

Deb: In this lesson, we're going to take a look at how we can create or how we can record a more
complex multi-step macro. So far, the macros that we've been recording have been fairly basic, fairly
straightforward, just one or two steps. But what about if you want to completely reformat a report using
a macro?

Well, that's exactly what we're going to do in this lesson. Now, I will say that when you are thinking
about creating a more complex macro, there are a couple of things that you should consider. The first
one is that you need to really make sure that you know exactly what you need in order to complete your
tasks. And that might involve jotting down the steps on a piece of paper so that you don't get halfway
through recording your macro and then forget where you need to go or start clicking around the ribbons
looking for a specific command.

The second thing to remember is that when you do run a macro, there is no way for you to undo that
macro easily. You might have noticed that when you've run macros in previous lessons, the Undo button
is actually grayed out. So, trying to backtrack out of it requires you to go back in and manually reformat
and reverse the macro changes.

So, in order to safeguard against this a little bit, and in order to preserve the original, I always like to
make one or multiple copies of the worksheet prior to running the macro. And that's exactly what we're
going to do first. So, let's hold down Ctrl, and let's drag our worksheet to create a copy. And I'm actually
going to create two copies. So, let's do that again. So, the data that we're going to be working on is the
data on the multi-step macros worksheet. And I want to perform a few different tasks on this data.

The first thing I want to do is I want to break up the customer name into two columns; First Name and
Last Name. I want to remove the leading three zeros from this order number. I want to remove the
hyperlinks from the email addresses. And I also want to disguise the credit card number in column E.
So, I only want to display the last four digits, which in this case, they're all the same, it doesn't matter
too much. And I want all of the rest of the numbers to show as Asterix.

The final thing I want to do is Autofit the entire table. So quite a few different tasks to complete there.
And we're going to put this in a macro so that we can execute all of them with the click of one button.
So I'm going to click in the customer name cell in cell A5, let's jump up to the Developer ribbon and into
Record Macro.

Let's give our macro a name, Reformat_Customer_Report. And I'm going to give it a Keyboard Shortcut
of Ctrl + Shift + C. Let's add a quick description. And now we can click on Ok and start a macro. So the
first thing I need to do here is split up the customer name into First Name and Last Name columns. So

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

for this, we're going to need two additional columns. You can use Keyboard Shortcuts to insert them,
I'm just going to right-click, Insert, right-click, Insert.

Now I'm going to use Flash Fill to fill these names down. So I need to provide the first one, Ctrl + Enter
to stay in the cell, up to Data, and we're going to click Flash Fill. Let's go to the second column and give
it the first one, Ctrl + Enter. And this time I'm going to use a different method for Flash Fill, I'm going to
select all of the cells that I want to fill, and use the Keyboard Shortcut Ctrl + E to fill those down.

Now, I just need to add my column headings First Name and Last Name. Now, I can delete Column A.
The next thing I want to do is remove the leading zeros from the order number. Now you're going to
notice in a minute when we do this, that when I remove those leading zeros, Excel is going to give me
some green warning triangles telling me that the number that's left is text and I should convert it to a
number.

Don't worry about that too much for the time being, we can always do that afterwards. So, let's insert
another column. And this time I'm going to use TEXT Functions. So, we're going to use the RIGHT
Function to extract the last five characters from the cell. Close the bracket, Ctrl + Enter, and then we can
double-click to copy this down.

Now I want to delete this column so I need to paste these values, let's Ctrl + C, go to Home, and select
Paste Values. And there, is my green warning triangle. Let's move this heading across. And now we can
delete out Column C.

The next thing we want to do is remove the hyperlinks from these email addresses. So that's a simple
case of selecting all of the cells, right-clicking the mouse, and then choosing Remove Hyperlinks from
the right-click menu.

And then finally, we want to disguise this credit card number, and just show the last four characters and
we want everything else to be in Asterix. So at the side here, we're going to use some TEXT Functions.
I'm going to put in quote marks what I want these characters to look like. So, we want four Asterix,
dash, another four dash, another four, let's close the quotes. And we want to join that with the RIGHT
Function because we want to extract the last four digits.

Close the bracket, Ctrl Enter, we can double-click to copy that formula down, we're going to throw away
the formula because we want to delete the column, Ctrl + C. We're going to paste those values. Let's
move the heading across, and now we can delete out Column F.

The final thing I want to do is I want to Autofit the entire contents. So, Ctrl + A to select the table, up to
the Home tab, into Format, and I'm going to say Autofit Column Width. And I want my cursor to end up
in cell A1. Let's stop the Macro Recorder.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

So, quite a few steps there. Let's test it out on one of our other worksheets. So, if we jump across to
Multi-step Macros (2), remember this is where we have our original data, let's run the macro. So I'm
going to go into Macros, choose Run, and would you take a look at that. Like magic, it's applied all of
those steps.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: The VBA Editor

Deb: In this lesson, we're going to take a look at the VBA Editor. Now, what exactly is VBA? Well,
VBA stands for Visual Basic for Applications. And you find it in all Microsoft applications, because it's
the language that sits behind the application. And it's mainly used for programming, editing, and running
application code.

So effectively, when you create a macro, what you're essentially creating is VBA code. So, it's important
that you at least understand the VBA Editor window. And whilst you might not get to the stage where
you're writing your own macros from scratch using VBA, it is good to be able to understand how to
jump into a macro that you've created and make minor changes by tweaking the code.

Now the workbook that we're currently in contains lots and lots of different macros. In fact, there is a
macro for each of these worksheets that does different things. For example, the first macro that was run
on this worksheet deleted all blank rows, the one on the second worksheet applied Accounting format,
we then have a macro that formatted this data as a table, another one that pasted values.

The next one added some data bars to a data set. And then we have one that removed hyperlinks from
URLs. We also have a macro in here that creates a new blank worksheet. So, we have about 7 or 8
macros in this workbook. Now if we want to see the code that sits behind these macros, this is where we
jump into the VBA Editor. And there are a few ways that you can get to it.

So, the first way is that we could go up to the Developer tab. And in the Code group, we could click this
icon just here Visual Basic. And you can see there the second way that we can get to the VBA Editor,
and that is by using the Shortcut key of Alt + F11. So, let's click it to open up the window. Now I'm
going to maximize this out to make it a bit easier to see. But this is essentially where all of the code is
stored for each of the macros. And the VBA Editor window is really made up of lots of other different
windows.

For example, on the left-hand side, we have the VBA Project Pane. So, this is where you can see your
workbook and all of the macros contained within that workbook. For example, at the top here, you can
see we've got the current file name, which is 11-05-VBA Editor.xlsm, that's my workbook name. And
then underneath, you can see all of the sheets with the sheet name in brackets. And then right at the
bottom, we have this modules folder, which currently says Module 1.

And if we double-click on Module 1 that's basically going to open the code for all of the macros that we
have in this workbook. And you can see that's exactly what I have loaded up in the main project
window. Now one thing you'll notice about the VBA Editor is that it is kind of old school in its
appearance.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

If you remember, back before we had the ribbons in our Microsoft applications, we were using a menu
system. And that is exactly what we still have in the VBA Editor window. For example, if I click
Format, I get a drop down menu and offshoot menus containing my commands. I also have toolbars old
school toolbars as opposed to ribbons.

Now if we just take a quick look at the code, let's understand what we're looking at. Because the thing is
with VBA code, it's not particularly difficult code to understand. And there are definitely some edits that
you can make without really having any programming knowledge. So, at the top here, you can see the
first macro, which is called Delete_Blank_Rows. And this is the macro, which as you would expect,
deletes blank rows from a data set.

Now your macros will always start with Sub, and then the macro name. And you'll notice right at the
end of this macro, which is just where we have this line, we will always finish with End Sub. Anything
you see in green is a comment. And comments in general are kind of like notes in a way that you can
add into your macro code to give people more of an idea as to what the macro does, and any other
helpful information that you might want to add.

And comments not only appear in green, but you'll also see that they have an apostrophe at the
beginning. And that basically tells VBA not to run these as pieces of code, they're just comments. So, if
you do want to type any notes at the top of your macro and give your users some advice or some
information about how to use this macro, simply make sure you add an apostrophe before you type your
text.

Underneath, we then have the code which needs to run in order to delete blank rows. So let's take a look
at this code. Now, this first line of code which ends in .select, this is as you would expect, it's simply
making a selection. So it's selecting the cell range A18:M22. I can see that then in the macro, I clicked
on the cell, E18, and then I selected columns A:M.

We then have a line of code, which basically says select all of the blanks. And then underneath, we are
deleting the entire row before ending up in cell A2. So, if I wanted to make a minor modification, maybe
I decide that instead of my cursor finishing in cell A2 when I run the macro, I want it to finish in cell
B10, I could simply modify this cell reference in here. So, I could change that to B10. And effectively,
I've modified my macro code.

So, let's save this and rerun the Delete_Blank_Rows macro. I'm going to click on Save on the toolbar,
I'm going to close down the VBA window, and we're going to go to the Delete_Blank_Rows workbook.
So, let's add some in, I'm just going to insert one there. Let's insert another one here, and another one
just here.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

So now, I'm going to rerun the macro. And what we should find is that instead of our cursor ending up in
cell A1, we should find it ends up in B10. So, let's jump up to Macros, let's find Delete_Blank_Rows,
and click Run. Take a look at that, those blank rows have been deleted, and look where my cursor is, it's
in B10. So, we can immediately see how that small change to the VBA code has affected the macro.
Let's jump back into Visual Basic.

So, this is reasonably simple code to understand. And all of this has been generated simply by me
recording a macro. Now if we scroll down to the next macro, you can see that it's separated by a line.
This is the one that applies Accounting format. Again, we just have the name of the macro in green as a
comment. And this one is basically applying Custom Number Formatting to three columns. And if you
remember back to when we covered Custom Number Formatting, this is basically what we have here,
we're specifying the format for positive, negative, zero values, and text.

So for a lot of macros that you run, the code isn't particularly hard to understand. Of course, VBA can
get quite complex and you definitely do need to know how to write it if you want to start to write your
own macros from scratch. But I will say that for the most part, you're going to be using the Macro
Recorder to generate your VBA code. But, it's good to have an understanding as to how to jump into this
VBA Editor, have an idea as to what you're looking at, and also be aware of how you can make minor
changes.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Assigning Macros to Buttons

Deb: In this lesson, we're going to record a couple of macros to sort and filter this data. And then I'm
going to show you how you can assign macros to clickable buttons to make it super easy for your users
to execute the macros.

Because let's face it, if you're sharing this workbook with other members in your team, it's not
particularly user friendly that if they want to sort this data in a specific way, they need to go up into
Macros, find the correct macro, and then run it. What would be much better would be just to have a
clickable button, which makes it really obvious what they need to do. Now before we get on to creating
the buttons, we need to create the macros. So I'm going to create three macros.

The first macro is going to sort this data by the Department and the Hire Date. The second macro is
going to filter the list by Job Title, and the third macro is going to clear the filters. So, let's first record
our macros. So, let's jump up to Record Macro. And this first macro is going to sort data by department
and hire date. So, let's give it an appropriate name. So I'm going to call this Sort_By_Dept_Hire_Date.
Just for quickness sake, I'm not going to assign a Shortcut key, I'm going to store it in This Workbook.
And we won't add a description for now.

As I said, I'm just trying to save a little bit of time here, I would recommend that you add both of these
things. Let's click on Ok. So now, I'm recording my macro. So, I'm going to click in the Department
column, I'm going to go up to home. And we're going to jump in to our Custom Sort, because I want to
sort on two columns. So, the first column I want to sort by is the Department, I want to sort on the
values in the cells, and I want to sort the departments A to Z.

I want to add another level because I then want to sort by the Hire Date, and let's say Newest to Oldest,
and click on Ok. Let's jump up to the Developer ribbon and Stop Recording. The next macro I want to
record is a Filter Macro. So I want it to filter the Job Title to only show me details for the sales
assistants. So let's do Record Macro. This one I'm going to call Filter_By_Job_Title, let's click on Ok.
And now, we can click the drop down next to Job Title, I'm going to deselect everything and only select
sales assistant and click on Ok. Let's stop recording our macro.

Now the final macro that I want to create is one that's going to reverse what we just did and clear the
filter. So let's jump up to Record Macro, and we're just going to call this one Clear_Filter. Let's click on
Ok, let's go to our drop down and select Clear_Filter from Job Title. Stop recording the macro. So now, I
have three macros sitting here that I can apply to my data. And let's just try out one of these. Let's do the
Filter_By_Job_Title. Again, if I select it and click Run, it’s going to apply the filter. If we go back into
macros and say Clear_Filter, let's run that one, it's going to put everything back.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Now of course, if I try to run the Sort_By_Dept_Hire_Date, I actually already have that applied. So
when I click Run, it's not going to look like it does anything. But if you were to try using this on an
unsorted set of data, then that's going to work. So now that we have our three macros, let's assign them
to a user friendly clickable button.

Now, there are a couple of different ways that you could do this, you could simply insert a shape, so
maybe one that looks like a button, maybe something like a rounded rectangle, and assign a macro to a
shape that is perfectly fine.

What I want to do is basically create something that looks a little bit more like a button. So for this,
we're going to use Form Controls. So if we go up to the Developer tab, into Insert, notice that under
Form Controls, we have this one here called Button. So, let's select it and I'm going to draw a button on
the page. And I want three of these. So, let's make sure we get these the right size.

Now notice as soon as I let go, it gives me the option to assign a macro. So, this first one is going to
Sort_By_Dept_Hire_Date. Let's click on Ok. So now I have my button, and I can edit that button title.
And I'm going to drag that out a little bit more so everything fits on nicely. And there we go, we have
our first clickable button.

Now if you want to move these around, it's a bit difficult because as soon as you click on these buttons,
it's going to execute that macro. But if you right-click, that's gonna allow you to select the button, and
then you can reposition it. Let's draw another button.

So up to Developer, we're going to grab another one. And we're going to draw that in here. And you can
spend a little bit more time aligning these and getting these exact than I am here. Let's assign this macro,
the Filter_By_Job_Title, click on Ok. We're going to make this a little bit taller. And once again, we can
edit the button name.

And then the final button that we want to add is just one that's going to clear that filter. So let's draw our
button out. Let's assign the Clear_Filter macro, click on Ok. Double-click, and this one is Clear Filter.
Now remember, if you want to align these perfectly, you can use your Alignment tools. And you can
spend a bit more time resizing these to get them exact. But let's see how these work.

As I said, if we click Sort by Dept and Hire Date, that one's already applied. But what about if I click
Filter by Sales Assistant? That one's working perfectly. If I want to clear the filter, I have a button there
and it's going to execute that macro. So, that's a really nice quick and easy way to assign macros to Form
Control buttons to make them easier for your users to execute.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Creating a Custom Macro ribbon

Deb: In the last lesson, we saw how we can assign macros to useful clickable buttons to make it super
easy for our users to execute those macros. But that isn't the only way that we can make it easy to
execute macros not only for our users, but also for ourselves.

We can also add macros to the Quick Access Toolbar. And if we have a lot of macros that we're using
every single day, we could even think about creating our own Macro ribbon. So let's take a look up both
of these options.

Now, the Quick Access Toolbar, as we know is this little toolbar that I have underneath my ribbons, you
might have it above in the top left-hand corner. But this basically contains commands that you use
frequently. And we saw in the Beginners Excel Course how we can customize this ribbon with all of our
favorite most useful commands. So, how can we add our macros to this ribbon?

Well, it's a pretty straightforward process. All we need to do is click the drop down at the end and go
into More Commands. Now, this is going to jump us across to Excel Options. And helpfully it's jumped
us straight on to the correct page, which is the Quick Access Toolbar Page. On the right-hand side, we
can see our Quick Access Toolbar and all of the icons that we currently have on there. And then on the
left-hand side, we have a big long list of all of the commands available in Excel.

Now you'll notice at the top, it says Choose Commands from and then we have Popular Commands
selected. But if we click the drop down just here, notice that we can choose Macros. And this is going to
show all of the macros that you have in this workbook. So, what I'm going to do is I'm going to add all
of these macros to my Quick Access Toolbar.

So, let's select the first one, click the Add button. Second one Add, third one, Add. And what I'm also
going to do is add a Separator, and I'm going to move that Separator up so that it separates my macros
from some of the other icons that I have on that toolbar.

Now you'll notice currently, each of these macros has the default name of the macro, and also a default
icon. Now you can modify these details if you need to. Notice underneath we have a Modifier button.
So, if I click this, it's going to allow me to choose a different icon. And I can also change the display
name. So, maybe I want to give it more of a user friendly display name.

So, let's just say Sort By Dept and Hire Date, which is basically the same, we just don't have the
underscores. And maybe I want to assign this icon just here. Let's click on Ok. And I can do exactly the
same for the others.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

So let's click on Modify, I'm going to say Filter by Job Title, and let's give this a little funnel icon. And
then we'll go to Clear Filter, let's modify. Again, I'm just going to remove the underscore from this, and
I'm going to give this one a little clear icon.

So now if I click on Ok, you can see that I have these macros assigned to my Quick Access Toolbar. So
if I click on the funnel icon, it's going to run that macro. And I can then clear the macro from here as
well.

Now in a similar way, I could create my own ribbon that houses all of my macros. So, this is particularly
useful if you have a lot of macros in your workbook, and you want to have them all easily accessible on
a ribbon.

So once again, we need to go into Excel Options to do this. So, let's click on File, let's go down to
Options. And this time, we're going to click on Customize ribbon. So on the right-hand side, we have all
of the ribbons that we currently have active in Excel. And right at the bottom, I have some Action
buttons.

So, I can create a new tab, a new group, and I can rename. So, what I'm going to do is create a new tab,
and then I'm going to rename this tab. So, let's select it and click on Rename. And I'm going to call this
My Macros. And that's basically going to be my ribbon. Now we know that when we're using ribbons,
not only do we have the ribbon, we have different groups.

So for example, I'm clicked on the View ribbon at the moment and my commands are stored in groups.
So, the first group is Workbook Views, the second group is Show, the third group is Zoom, so on and so
forth. So you can create your own groups on your ribbon as well. So where we have new group
underneath, I'm going to rename this and I'm going to call this Sorting and Filtering. Let's click on Ok.

So now I have my tab, my group set up, all I need to do is add my macros. So, on the left-hand side of
the screen, we're going to go back to Macros, and we're just simply going to add these. So, let's click
Add, and we just select and carry on adding. And once again, I can go in and give these better names. So
let's rename, I'm going to do exactly the same thing. Let's give it this icon, and I'm going to go through
and apply the same settings that we applied previously.

So let's rename this one, Filter by Job Title, and let's give it a filter icon. And then finally, we're going to
rename this to Clear Filter. So, let's just remove that underscore, and we're going to choose the clear
icon. So now when I click on Ok, take a look at my ribbons. I have a new ribbon called My Macros. And
when I click on it, I have a Sorting and Filtering group, and there are my macros.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

It might be that you want to give these a little bit of a shorter name, so they're not so squashed in there,
but these are still going to work. So, if we click on Filter by Job Title, it runs the macro, we can clear the
filter. And I can go through and add other groups which contain other macros that do different things.

So, you can really customize your copy of Excel, automate all of your tedious tasks, and then make
those macros easily accessible either by adding them to the Quick Access Toolbar or creating your own
Custom Macro ribbon.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Exercise 11

Deb: In this exercise, I'd like you to create a macro to clean up this data set. And I want the macro to be
able to do the following, it needs to apply Date Formatting to Column A, convert all names and columns
C to proper case, apply Currency Formatting to Column G, remove any duplicate entries, and finally
format the data set as a table.

Now, once you've done that, and you've tested that the macro is working, I'd like you to create a
clickable button to run the macro. And then I'd also like you to edit the macro in the VBA Editor, and
change the finishing cell to cell M1. And just a note with this, remember, it's very difficult to backtrack
out of a macro.

So, ensure that you create a few copies of the worksheet prior to recording and running the macro. So
that if you do run into any issues, you can go back to the original. So give that a go. If you'd like to see
my answer, then please keep watching.

So, the first thing we're going to do here is we're going to record our macro. Also know that I've made
quite a few additional copies of this worksheet in case it all goes a little bit wrong. So, let's jump up to
Developer and into Record Macro. I need to give my macro a name. So I'm going to call this
Clean_Data. I'm not going to assign a Shortcut key or give this a description. But if you did, that is
absolutely fine. Let's click on Ok, and we're now into the recording of our macro.

So, the first thing I need this macro to do is to apply Date Formatting to Column A. So, let's select
Column A, up to Home, into our Number Formatting, and we're going to choose Short Date. The next
thing I need it to do is convert all the names in Column C to proper case. So for this, we want to insert a
column, and then we're going to use the PROPER Function. Let's select our text, close the bracket, Ctrl
+ Enter, and then we can double-click to copy that down.

And then the final thing we're going to do is just move the heading across. And then we're going to copy
and paste the values for this column. Because that means we can then safely delete out Column C. I then
asked you to apply Currency Formatting to Column G. So, that's fairly simple. Let's select it and apply
some Currency Formatting.

I then asked you to remove duplicate entries. So if we go up to the Data tab, we have a Remove
Duplicates option. Let's select in, click on Ok, it's found two duplicate values and it's removed them.

The final thing I asked you to do was to format the data set as a table. I don't mind which way you did
this either using the Keyboard Shortcut, or by going to the Home tab. I'm going to say Ctrl + T, and then
click on Ok. And I'm going to end this macro in cell A2. Let's go to the Developer tab and stop
recording the macro.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Now before we go any further, I'm going to test that this macro is working. So let's go on to one of our
copies, and let's rerun that macro. So into Macros, I'm going to select it, and click on Run. And there we
go, it's working perfectly. The next thing I asked you to do was to create a clickable button in order to
run this macro. So, let's go on to our next worksheet and add it over here so that we can test it out at the
same time.

So up to Developer, into our Form Controls, and we're going to choose Button. Let's drag and I'm going
to assign my Clean_Data macro to the button. Let's double-click to change the button name, and I'm
going to call this Clean Data. And let's drag it in a little bit. Lovely. Let's test this to see if it works. Let's
click the button, and like magic, it does.

The final thing I asked you to do was to edit the macro in the VBA Editor and change the finishing cell
to cell M1. So, if we jump back up to the Developer tab, we can go to Visual Basic; Keyboard Shortcut
for that is Alt + F11. I'm going to double-click on Modules and Module 1, and there is my Clean_Data
macro. And if I scroll down to the bottom, I should find that the last cell that we end in is cell A2. So,
I'm simply going to change this to cell M1.

Let's save our code. I don't really need to save this as a macro free workbook because it's just an
exercise. Let's close this down. And let's try running the macro again on our final worksheet. And what
we should find is that this time the cursor finishes in cell M1. So, up to Macros, let's run it and take a
look at that, it does. That's it for this exercise, I will see you in the next one.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Section 12 – Finding the Last Occurrence of a Value


Video: Finding the Last Occurrence of a Value

Deb: In this last section, we're going to take a look at some more Advanced Excel formulas. And these
formulas are formulas that combine multiple Excel functions together in order to perform a task. And
we're going to start out in this first lesson by putting together a formula that is going to help us find the
last occurrence of a value in a list. So let's take a quick look at our example.

Now what I have here is a very small table, it just shows some Employee names the department that they
work in, and when they were last absent, and you'll see that the Employee names repeat throughout this
list. So basically, what I want to find out is the Last Absent Date of particular Employees. And you can
see that I have that listed here.

Currently, I'm looking up the Employee Ayesha Jacobs. And I can see that her Last Absent Date was
12/01/2021. And if I look at the table, despite the fact that she occurs numerous times throughout this
list, Excel has picked out the last time she was absent. If I was to change this to another Employee name,
so let's go for Donna Gibbs, notice that it updates and if we work from the bottom, I can see that yes, the
last time that Donna Gibbs was absent was 08/15/2021.

Now the formula that we use to create this combines multiple different functions. And if you take a look
in the Formula Bar, you can see the formula that we're going to talk through and construct. Now before
we get on to this, I want to highlight a function that we haven't yet covered throughout the balance of
this course. And that is the ROW Function. So, let's just take a quick look at what ROW does for us.
Now in its most basic form, ROW will return the row number of a value.

So, if we type in ROW, you can see we only have one argument which is reference. So, if I was to select
this cell, just here, A9, close the bracket, it’s going to tell me that it is row 9 in the spreadsheet. And I
can see yes, cell A9 is in fact in row 9. So, this function relates less to the positions within tables. It's the
position within the actual worksheet. And we can use this to help us construct the formula above. So,
let's talk through how I put this together.

Now the first thing I'm going to do here is I'm going to create my favorite thing in the world, which is a
Data Validation drop down list, simply so it's easy for me to select the Employees. So, let's delete out
the Employee and the Last Absent Date. And we're going to pull out a unique list of the Employee
names. So let's select our range, close the bracket, hit Enter, we're going to throw away the underlying
formulas Ctrl + C, I'm going to right-click, and we're going to say Paste Values.

Now, let's create our Data Validation drop down. So into Data Validation, let's select it, we want to
create a list, and our source is going to be these names just here. Click on Ok. So now this makes it a lot

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

easier for me to select these names. So now let's construct our formula for the Last Absent Date. And I'm
going to move these over because this formula is quite long. Now as we are essentially looking up a
date, we want to use a Lookup Function first, and we're going to use INDEX.

The first thing we need to provide is the array. So remember, the array is what you want to return. So we
want to return the Absent Date. So we want to index this array just here, comma. Now we need to find
the row number. Now remember, we can't just do a match here of the Employee name because the
Employee name occurs multiple times in Column A. So we need to go about this in a slightly different
way.

What we're going to do is we're going to say that we want to find the MAX, ROW, and we're going to
use our reference point as being this column just here, C2 to C16. So effectively, this is going to output
the maximum number of rows in the range C2 to C 16. So, if we just take a look at what the result of
that is on its own, I'm just quickly going to delete out the beginning bit of this formula. Let's just do a
MAX of this and see what it gives us.

Now I have different formatting applied there, so let's just set that to general. So the maximum number
of rows in this range is 16. Now note here that there's actually only 15 items selected in the range C2 to
C16. But that's not what this function does. It's just telling us what the maximum row is where the data
ends, which is row 16. So, that's a really important distinction to make. It’s not counting the number of
values in the selected range, it's telling you what the last row that contains data is.

So, let's just go back and add in an INDEX onto the front here, and we're indexing this range just here,
then we want to find the maximum row. But we also need to match the Employee name in Column A.
So we're going to use our AND operator to add in a second condition if you like. So, we want to look for
E4 in this range, just here. Let's close off ROW, close off INDEX, and see what we get. Let's apply
some Date formatting and check to see if this is correct.

So Tracy Bell, there she is, something's not quite right here. Her Last Absent Date was 11/3/2021. So
why is it picking up the one below? Well, this is because it's including the header as a row when it's
doing the count. So because the heading is Row 1, it's producing the next result to the one that we want.
So, what we need to do is edit our formula. And I'm gonna do this up in the Formula Bar, and we need
to say -1, let's hit Enter. And now we get the correct result.

What about if we change this to somebody else? Let's go for Garth Osborne. If we count from the
bottom here, there he is, the Last Absent Date was 4/16/2021. Now let me just illustrate this -1 part a
little bit better. If we had our data table further down, so let's just pick it up and drag it down a few rows.
Notice we get a different result for Garth. Because now, we have 1, 2, 3, 4 rows at the top. And because
we're using the Row number, the result is going to be incorrect. So if we have our data like that, we will
need to -4 rows to get the correct result. And now, if we check Garth Osborne, that is the correct result.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

So, just bear that in mind. The position of your data on your worksheet makes a big difference if you're
using the ROW Function in your formula. But, that is effectively how you can construct a formula that's
going to pull out of a list of data the last occurrence of a value.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Finding the Closest Value

Deb: In this lesson, we're going to use a few Excel functions, combine them together to create a formula
that's going to help us find the closest value to a specific number. And the example that we're doing here
is how many sweets are in the jar?

So, maybe this is a game that we play at the office Christmas party, we're presented with a jar that has a
number of sweets in it. And we invite all of our team members to guess how many sweets are in the jar.
And then the person who is the closest wins a prize. So we've collated all of the results for the different
team members, we've collated their guesses, and now we need to produce the winner. And you can see
here that the actual number of sweets in the jar is 180, and the winner is Ming. And if we click on cell
F5, you're going to see the formula that I've used to get this result.

Now most of the functions in this formula we've used in previous lessons. But again, there is one in here
that we haven't come across as yet. So let's quickly stop for a moment to take a quick look at the ABS
Function. Now, ABS basically stands for ABSOLUTE. And what it does is it returns an absolute value,
regardless of the number formatting that's been applied, and regardless of if it's positive or negative. It's
always going to return a positive absolute value.

So, let me show you an example of that. If I have 69% in a cell, and if I just run that through the ABS
Function, so let's type ABS, select the cell, you can see it's given me a result of 0.69. So it's giving me
the absolute number that lies underneath that Percentage formatting. So that's basically what the ABS
Function does, I'm going to use it in our formula. So let's talk through what this formula is doing. And
I'm also going to show you another handy little utility that you can use to check what each part of your
formula is calculating.

So, let's delete out where we have Ming. Now the first thing we need to do here, again, because we are
effectively doing a Lookup, we're going to use INDEX. Our array is what we want to return. Well we
want to return a winner, so we want to index the Names column. We then want to find the row number
that's closest to 180. So, we're going to do a MATCH in here. And we're basically going to construct a
little formula, that's going to work out the difference between the actual number which is 180, and all of
the guesses. And we want to find the minimum difference between the actual number and the guess.

So, our Lookup value, well, we want to go straight into MIN, we're then going to use the ABS Function
because we want an absolute number. And then we want to say E5 - the guess range (B5:B19), let's
close our bracket. Now, if you're not 100% sure as to what this is doing, as I said, it's working out the
difference between the actual number and each of these guesses, and it's going to find the minimum.

So, once it's found the value with the minimum difference, we then want to basically look it up in the
same range. So, we're gonna go straight into another ABS because we want an absolute number. And

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

we're going to do the same thing. So we're going to say E5 – (B5:B19). Let's close off our ABS
Function, comma. What type of MATCH do we want to do? Well, we're going to do an Exact Match.
We can then close off MATCH, close off INDEX, and hit Enter. And there you can see it's producing
the result of Ming.

Now another little trick that you can do if you want to see what each part of your formula is evaluating
to, is you can select a section of your formula, and press the F9 key and it's going to show you the
results of this part of the formula. Now I can't press my F9 key when I'm recording because it relates to
the recorder that I'm using. But what I could do as an alternative is going to Evaluate Formula which
will help me understand what this formula is doing a little bit better.

So if we jump up to Formulas, let's go into Evaluate Formula, and I can now step through each part. So,
if I click on Evaluate, you can see here the results of the MIN ABS part of the formula. This is where it's
working out the difference between the actual number and each of the guesses. So you can see the first
result there is 70. And if I take a look at the first guess for Sarah, that's 110. So, 180 - 110 gives us a
result of 70. The next one is 35, 180 - 145 is 35.

And it basically goes through and does that for each of the different guesses. And then because we have
a MIN before that, it's going to work out what the minimum of this value is. So, that's pretty much what
this formula is doing. Now what about if the winner has to get the exact number of sweets in the jar? So,
let's say this time that the actual number is 149. So let's type that in. What if they need to guess 149
exactly to win not the closest to? Well, we can do a slightly different formula.

Now we're going to do an INDEX again, we still want to return the name. So we're going to index the
name array. This time we're doing a MATCH, our Lookup value is going to be 149. We want to look it
up in the guests array, and we want to do an Exact Match. Close off MATCH, close off INDEX, we
basically have just a very simple straightforward INDEX and MATCH formula. So now, I can see that
Vin guessed exactly 149. And so, he is going to be the winner.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Extract Data from the Middle of a String

Deb: In this lesson, we're gonna see how we can use Excel TEXT Functions to extract text from the
middle of a string. Because, while this seems like a fairly straightforward task, it can get quite complex.
So I wanted to run through this with you and also showcase a few of Excels TEXT Functions. Now,
what we have on the screen here is a fairly simple data set, we just have a few email addresses.

Now it might be that I've been asked by my manager to basically break up these email addresses, we
want a column that contains the first name, so everything before the @ symbol, and then maybe we want
to know the domain that these people are using. So we want to extract, Yahoo, Gmail, Hotmail, Outlook
from this string.

Now, the types of TEXT Functions that we can use to extract text from a string are things like LEFT,
RIGHT, and MID. So, let's just quickly remind ourselves what these do. If I type in LEFT, we can
basically extract text from the left-hand side of the cell. So my two arguments are text and number of
characters. So if I want to extract the word, Adam from this first email address, my text is in cell A4.
And then I can just specify how many characters from the left I want to extract.

So, if I want to extract the word, Adam, that would be four characters, close the bracket, hit Enter, and
I've done it. Now this is fine if you're just doing one. But what about if I want to extract the name from
all of these. Because if I was to copy this formula down, it doesn't quite work out correctly, because it's
extracting four characters each time. And because the email addresses or the names are of differing
lengths, each time, it's extracting four characters, not necessarily the entire name or everything before
that @ symbol. So, we can't use the LEFT Function to get this done effectively.

So, what we need to do is do this in a slightly different way. Now, we're still going to use the LEFT
Function, we're going to select the cell. But now when it comes to the number of characters that we want
to extract, we're going to do this in a slightly different way. So, we're going to look for something that's
common between all of these email addresses. And I can see that every single one of them contains an
@ symbol. So, this would be a really good reference point for me to use.

I could tell the formula to find the @ symbol, and then extract everything before it. So when we get to
the number of characters argument, we want to do a FIND. What text do we want to find? Well, we
want to find the @ symbol. So I'm going to put that in quote marks, comma. Where do we want to find
it? Where we're looking for it in cell A4. The last argument is start number. This is an optional
argument. And in this case, we don't need it. Let's close the FIND, close LEFT, and hit Enter.

Now look what has happened here. If I copy this down, it's giving me the entire name, but it's also
giving me the @ symbol. Because basically, it's found the @ symbol, and it's extracted the symbol as
well as everything before it. So, I need to add something else into my formula. Let's go up to the

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Formula Bar, and we're just going to say -1 character. And that's going to emit that @ symbol. So just
there, we've managed to construct a really nice dynamic formula to extract those first names no matter
what the length of the first names.

So with that in mind, let's move on to something that is quite a bit more complex. And that is extracting
something that exists in the middle of a string. And in this case, I want to extract the domains, so Yahoo,
Gmail, Hotmail, so on, and so forth. Now, to do this, we're gonna work along a similar principle, we're
going to use a TEXT Function, we're not going to use LEFT, we're not going to use RIGHT, we're going
to use MID. Because, what we want to extract is in the middle.

So let's take a look at that MID Function, let's see the arguments. So if we type in =MID, we have three
arguments here; text, start number, and number of characters. So my text is going to be the cell reference
A4, but I need to provide a start number and the number of characters. Now what I could do if I wanted
to find the start number, let's just look at that specifically.

Again, if I want to extract Yahoo from this first one, I could find the @ symbol and +1 to extract
everything from that point forward. So, that again, would be another FIND. We could find the @ symbol
in cell A4, close the bracket, and this time, we could add 1, that gives us the starting number. Because if
we count across, the Y of Yahoo is character number 6. And if I was to copy this down and take a look
at the next one, the start number of Gmail is 5. So, that formula is going to provide us with the start
number which we can use in our MID calculation.

Now, how do we find out the number of characters that is the next argument in MID? Now, it's not
talking about the number of characters in the entire string, it's talking about the number of characters of
what you want to extract. Well, a good starting point would be to find something else that's common to
all of these email addresses, which is the.com part. And what I could do is find the position of where
Yahoo ends.

So to do that, we could say FIND, and this time, we want to find the text.com within cell A4, hit Enter.
So now, this is telling us the position where we have the .com in each of these strings. So, I have the
start number, the beginning of what you want to extract, and I have the end number, effectively the end
of what we want to extract. So, we can combine these two together in our MID formula.

So, let's type in =MID, the text is in cell A4, the start number, well, we want to do our FIND. We want
to find the @ symbol within text A4, and we want to +1, comma. We now move on to the number of
characters. So again, we're going to do our FIND. This time, we're looking for .com within the text in
A4. And if we close off MID, let's take a look at what this gives us. Well, it's going to give us
yahoo.com.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

So, the final thing we need to add to this formula is we just need to basically remove the .com part. Now
if we go up and start editing this formula, what do you think I could do here? Maybe I could minus 4
characters. What does that give me? Well, that's not quite right. What about if I minus 6 characters?
What's that going to give me? That's going to give me the correct answer.

If I copy this down one cell, that's not working out correctly, it's minusing too many if I leave this on -6.
Now, what you might notice is that the start number is actually the value that we need to minus off of
each of these to get the correct answer. So what we're going to say here, if we go up to the Formula Bar
is we're going to -FIND, and we're basically going to repeat that first formula. FIND the @ symbol in
cell A4, and we're going to -1, take a look at that.

Now if we copy it down, we get exactly the result that we're looking for. So, quite a bit of work there in
order to extract something from the middle of a text string. But hopefully, we've worked through that in
a fairly logical manner, and you can understand how all of this ties together.

Now what I could have done instead of typing this big long formula is that I could have used the
numbers that we've generated with these other formulas in Columns D and E. And that would make this
formula quite a bit shorter. But, I just wanted to show you how you can write it out in its entirety as well
because I think it helps you understand it a little bit better. And it also means that you can then freely
delete Columns D and E and it's not going to affect the formulas that you have in Column F.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Video: Exercise 12

Deb: In this exercise, we're going to practice some of the skills that we've learned in this section. And
I'd like to start out this by practicing how to separate text using TEXT Functions. So I'd like you to take
the tags that we have in Column A, and I'd like you to separate the name and the department into two
separate columns, and the department is the second item that you can see in that string after the comma.
If you need to add any helper columns in order to do this, then please feel free to do so.

And in the second part of this exercise, I'd like you to find the closest guess to 82 from the table. Once
you've found the closest guess, and you've returned it in cell G5, I'd like you to then construct a formula
to tell us who the winner is. See how you get along with those. And if you'd like to see my answer, then
please keep watching.

So the first thing we need to do here is we need to separate the text in Column A into name in Column
B, and department in Column C. So to separate out the name, we're looking for something that's
common between all of these strings, and I can see that the comma is common. So we're going to use
that as our reference point. Now we're going to use the LEFT Function here, we're extracting from the
text in cell A3.

Now when it comes to the number of characters, because the names are of differing lengths, we need to
do something a bit different. So we're going to say FIND, and we're going to find the comma within this
text string. Now, we don't want it to return the comma, so we need to minus one character on the end
here. Let's close off LEFT, hit Enter, and if we copy this down, we should find that we get exactly what
we're looking for.

Now when we're trying to extract the department, because that's in the middle, that's a little bit more
complicated. But we aren't going to use the MID Function. We're still using the text in cell A3, but again
here, we need to do a FIND. Now this time, we're still going to look for that comma within A3, but we
want to +1. So effectively, we're on the first character of the department name.

We're then going to go straight into another FIND. And this time, we're going to look for the other thing
that's common between all of these strings, and that is the dash, the thing that appears directly after what
we're trying to extract. So we're going to look for the dash, again within the text in cell A3. But to find
the number of characters, we need to minus our first FIND.

So, our first FIND was where we were looking for the comma in cell A3, and we need to -1. Let's close
the bracket, hit Enter. And let's drag this down, and everything seems to be working perfectly. Let's
move on to the next part of this exercise.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

So on this worksheet, we have Column A where we have some names, then we have Column B with
some guesses. Now the correct guess is 82. So, we want to find two pieces of information here; we want
to find the closest guess, and we also want to find the winner. So let's go to cell G5, and let's do an
INDEX. Now our INDEX is what we want to return.

Now in this case, I'm just looking to find out what the closest guess is. So, my answer is going to come
from somewhere within this array. I then need to go into a MATCH. And I basically want to find what
the minimum difference is between the correct guess and all of the guesses. So I'm going to make sure
that this is an absolute number. And we're going to say G3 – (B4:B28). Let's close off ABS, close off
MIN, comma. What is our lookup array for our MATCH?

Well again, we want to work with absolute numbers. So, I'm going to go with ABS. And we're going to
do the same thing. We're going to say G3 – (B4:B28). Let's close our ABS, specify our MATCH type
which is an Exact Match, close off MATCH, and close off INDEX. Let's hit Enter. Take a look at that.
The closest guess is 84.

So now, all I need to do is perform another INDEX and MATCH to find out who 84 relates to in the
table. So, this is reasonably straightforward. We can go into INDEX. This time we want to return a
name. So, we're choosing that column. And we want to MATCH this value in this range, and we want to
do an Exact Match. Let's close off MATCH, close off INDEX, and I can see that Carl Lynch is the
winner of this contest. Now if I take a look down this table, let's find 84. I can see that, yes, that relates
to Carl.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

Section 13 – Course Close


Video: Course Close

Deb: A huge congratulations everybody, for making it all the way to the end of this course on Excel
2021 Advanced. I hope you enjoyed running through this course as much as I enjoyed hosting it for you.
And when you think back across the 12 sections of this course, it's crazy to think exactly how much
we've learnt.

We've been through Dynamic Arrays, all of those brand new features of Excel 2021. We took a look at
Advanced Lookup and Reference Function. So how we can use Index and Match and XLOOKUP in
different ways. We took a look at Advanced Statistical Functions and Math Functions like rounding an
aggregate.

And, we blew our minds with two new functions, LET and LAMBDA the latter of which allows us to
create our own functions. We had a browse through some of the advanced options when it comes to
working with PivotTables, the single most useful tool in Excel when it comes to data analysis. And we
saw how we can construct Pivot Charts in a slightly different way, and start to think a little bit outside of
the box.

I showed you how you can add interaction to your reports or your dashboards using different types of
form controls. And then we saw how we can import different types of data into Excel and clean that data
up using Power Query. We had a little bit of a look at Forecasting, I showed you some manual methods
that you can use, and also a quick way of forecasting using Forecast Sheets.

We saw how we can automate our tedious tasks, things we do all the time, using Macros. And we had a
brief look at how we can make minor edits to those Macros by jumping into the VBA Editor. We
finished out with just some practical examples of useful formulas where we combined different
functions together in order to complete a specific task. And that's really where we're going to end this
course.

Because, at this stage, you have all of the knowledge there. But to truly become an Advanced Excel
user, it's really knowing and recognizing which formulas and functions are useful for which situations,
and how you can combine functions together in order to complete specific tasks.

Now, the only way that this is going to come is by practicing, practicing, practicing. As the old phrase
says, ‘Practice makes perfect’. So, I encourage you to use all of the new skills that you've learned on lots
of different types of data. If you want to run through this course again, or maybe go back to specific
sections, then please feel free to do that.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.


Microsoft Excel 2021 Advanced Training

But I truly hope that at the end of this course, you feel you've learned things that are going to benefit you
in your daily work and your career going forward. So, this is the point where I leave you to carry on
your Excel journey on your own. It's been an absolute pleasure hosting this course for you. And, I hope
to see you again on another one of our courses. Once again, my name is Deb. Bye for now.

© Copyright 2022 Simon Sez IT, INC. All Rights Reserved.

You might also like