You are on page 1of 197

Table of Contents

Section 1: Cell formats and their contents


Lesson 1.1: Excel environment
Lesson 1.2: Manage the sheets of the book (pages)
Lesson 1.3: Formatting of cells
Lesson 1.4: Border format
Lesson 1.5: Content format
Lesson 1.6: Custom content format
Lesson 1.7: Clipboard group
Lesson 1.8: Auto fill
Lesson 1.9: Tricks and shortcuts

Section 2: Conditional Formatting


Lesson 2.1: Predefined formats for highlighting cells
Lesson 2.2: Predefined data bars
Lesson 2.3: Predefined color scales
Lesson 2.4: Predefined icon sets
Lesson 2.5: Detect conditional formats on a sheet
Lesson 2.6: Edit predefined conditional formats
Lesson 2.7: Create custom conditional formats

Section 3: Data Tables and Filters


Lesson 3.1: Format as a predefined table
Lesson 3.2: Apply filters to one and several columns
Lesson 3.3: Sort table elements
Lesson 3.4: Filter by text
Lesson 3.5: Advanced filter
Lesson 3.6: Statistical functions related to tables
Lesson 3.7: Mathematical and trigonometric functions related to tables

Section 4: Charts
Lesson 4.1: Select data to create a chart
Lesson 4.2: Recommended charts
Lesson 4.3: Explaining all graphs and recommended situations
Lesson 4.4: Combining chart types
Lesson 4.5: Chart elements
Lesson 4.6: Format Axis
Lesson 4.7: Predefined design styles
Lesson 4.8: Change the selected data
Lesson 4.9: 3D charts

Section 5: Data Validation


Lesson 5.1: Select data from drop-down list
Lesson 5.2: Limit the data entered
Lesson 5.3: Custom limits
Lesson 5.4: Protecting a worksheet
Lesson 5.5: Input and error messages in a cell with validation
Lesson 5.6: Type of error message: Stop, warning and information
Lesson 5.7: Circle invalid data
Lesson 5.8: Other commands of the "Data tools" group

Section 6: Other Groups in the Insert and Page Layout Tabs


Lesson 6.1: Inserting and modifying shapes and illustrations
Lesson 6.2: Sparklines
Lesson 6.3: Text and Links groups
Lesson 6.4: Symbols group
Lesson 6.5: Print area and display forms
Lesson 6.6: Window options
Lesson 6.7: Page layout tab, print titles

Section 7: Working with functions


Lesson 7.1: Use of the $ symbol in the formula bar
Lesson 7.2: Using the $ accurately
Lesson 7.3: Name manager
Lesson 7.4: Use of Lookup & Reference functions
Lesson 7.5: Use of logical functions
Lesson 7.6: Nested functions
Lesson 7.7: Use of math & trig functions
Lesson 7.8: Use of text functions
Lesson 7.9: Use of date and time functions
Lesson 7.10: Use of information functions

Section 8: Pivot Tables and Charts


Lesson 8.1: Convert a table into a pivot table
Lesson 8.2: Design of a pivot table
Lesson 8.3: Subsequent modifications to the table
Lesson 8.4: Pivot charts
Section 1: Cell formats and their contents
To begin this first chapter of the book, let's look at the Excel screen as
we open the program, naming all the elements you see, and making a
brief description of them, which will serve as a small glossary of the
Excel environment.

Once we have identified the elements with which we are going to


interact the most in the use of the program, we will use them to
perform one of the most basic, simple and fundamental functions of
Excel: to apply formats to a cell or several cells and their contents.

Applying a specific format to the cells is only done to highlight their


content over the others, so it does not affect the functionality of the
program or its formulas, but helps greatly in the visual aspect,
especially if the file ends up being shared with more people who have
not participated in its creation.

Finally, we will go on to see some keyboard shortcuts, tricks and


combinations of keys that make the user who knows how to use them
gain enormously in efficiency.
Lesson 1.1: Excel environment
Let's look at the image to learn how to recognize and properly name
the elements of the Microsoft Excel screen.:

Elements of the screen

1. Title bar: shows the name of the book and sometimes some
additional information (e.g., whether the book is networked with
other people, whether it is being saved).

2. File tab: is used to access the file information options, open or


create files, save, print, etc.

3. Menu tabs: the tabs are sets of commands, i.e. actions that can be
performed with Excel, which are grouped logically according to
their functionality. Each tab is related to a type of activity.

4. Home tab: is composed of all the groups that are observed, and
from here you can perform the most common actions of Excel.
5. "Alignment" group: each tab is made up of different groups,
containing commands that act similarly. This group is used to act
on the alignment of the cell contents, indentations, height...

6. "Merge & Center" command: the commands are the elements that
perform the actions on the selected cells. This command merges
the selected cells, going from having several cells to only one,
where the content is centered.

7. Formula bar: in Excel you can type either on the selected cell itself
or in the formula bar. When the content is a formula, only the
result will be shown in the cell, while the formula leading to the
result will be shown in the bar.

8. Scroll bar: is used to scroll the sheet up and down (vertical scroll
bar), and the bottom scroll bar to scroll left and right (horizontal
scroll bar).

9. Zoom: it is used to enlarge or reduce the size of the active sheet on


the screen. You can use the bar, buttons or click on the numeric
value to enter a value manually.

10. Worksheets: each of the sheets that make up an Excel book. For
example, to avoid having to save 12 different books (Excel files)
for each month of a year, we can create a single book of the year
and create 12 worksheets in that book.

11. Active cell: is the cell we have selected, the one on which the
commands we press are applied or the one we write on if we write
in the formula bar.

12. Minimize/Restore/Close: as in any program, we have the options


to minimize the book, close it or modify the size of the sale
(restore).

13. Ribbon Display Options: displays different window display


options, such as hiding commands, tabs, both, or showing them
back.
14. Rows: each of the 1,048,576 rows that make up an Excel
worksheet. They are named with a number from 1 to 1,048,576.

15. Columns: each of the 16,384 columns that make up an Excel


worksheet. They are named with a letter starting with A and
continuing to Z, after which the column AA, AB, AC... AZ, BA...
continues to XFD.

16. Name box: displays the name of the active cell.

17. Cells: an Excel sheet is composed of a multitude of cells, which are


the intersections of rows and columns. To name them, first
indicate the column (letter) and the row (number) where they
intersect.
Lesson 1.2: Manage the sheets of the book (pages)
It is crucial to maintain clarity in our Excel books to know how to
properly manage the sheets (or pages) that make up the book. For this
it is important to know how to perform all these actions on them:

Renaming the sheets:

This can be done in two ways: either by right-clicking (right-click for


right-handed people) on the tab and then clicking on "Rename", or
directly by double-clicking on the current sheet name. After this we
simply type, press Enter on the keyboard and we have already changed
the name of the sheet.

Change the color of the worksheet tab:

Clicking with the right button on the name of the worksheet and then
moving the mouse to where it says "Tab Color" displays a palette of
colors, where we can choose one of the colors that appear here or click
on "More Colors ..." to open an advanced color menu.
Delete worksheets:

To delete a worksheet, right-click on the sheet you want to delete and


then click on "Delete". If the sheet contains any data, a message will
appear asking if we are sure we want to delete the sheet, because when
we delete a sheet there is no way to recover it (unless we had saved the
file with that sheet).
Inserting worksheets:

At the bottom of the screen, to the right of the page labels and to the
left of the scroll bar is a "+" symbol. Clicking on this symbol creates a
new blank sheet to the right of the selected sheet.

Move/Duplicate worksheets:

If we press with the right button on a sheet and then on "Move or


Copy" a new window appears, where we can indicate where we want to
move the sheet (the sheet will appear to the left of the sheet we select).
If we do this same thing but checking the box at the bottom of the
"Create a copy" window, we will add a sheet equal to the one selected
where we have indicated.

To make this easier we can simply click with the left button on the
name of the sheet and drag (without releasing the left button) to where
we want to move the sheet. If we do the same but pressing and keeping
the "Ctrl" key on the keyboard, we will duplicate the sheet.

Insert/Delete rows, columns and cells

When we are working with an Excel sheet with a lot of data it is


sometimes necessary to introduce new data in the middle of the data
we already had introduced. To do this, instead of moving all the
previous data, it is easier to insert a range of blank cells, displacing the
previous cells without deleting them.

This can be done from the "Cells" group on the "Home" tab, where we
can insert or delete cells, rows, columns and sheets. To do this it is
necessary to select the cell or range of cells where we want to position
the new cells and press the button of the desired command.

A quicker way to insert cells or ranges is to select where you want the
new cells to be positioned (as before) and press "Ctrl" and "+"
simultaneously on the keyboard. To delete, do exactly the same thing
but pressing "Ctrl" and "-" simultaneously.

Cell size

By default, all columns in Excel come with a width of 8.43, and rows
with a height of 15. In some cases, the size of cells is automatically
modified when we perform actions (increasing the size of text in a cell
increases the height of the row to fit the height of the text), but we can
also change it manually with the "Format" command in the "Cells"
group on the "Home" tab. By pressing this command, we can manually
enter the height or width of the row or column of the selected cell, as
well as “AutoFit” the height or width of the column so that the largest
content of the row or column fits right into the row or column without
leaving empty space.

Another way to manually enter the width or height is to right click on


the letter of the column or row number and select "Column Width..."
or "Row Height...". To autofit the size you can also do it faster by
double-clicking on the right edge that delimits the width of the column
or on the bottom edge that delimits the row number (right image).
Lesson 1.3: Formatting of cells
Excel cells are fully customizable in the way they display content
(colors, text size, text effects, font...), as well as the alignment of cell
content (centered, right, indented...).

The "Font" and "Alignment" groups, both on the "Home" tab, are used
to edit the formatting of the cells.

The "Font" group groups the commands to edit cell color, font, size,
style (bold, italic...) etc.

The "Alignment" group is used to define the alignment and orientation


of the cell contents, and other related commands such as "Merge and
Center" and "Wrap Text".

All the font and alignment modification options are accessible from
the normal Excel view in the "Home" tab (the groups shown in the
previous images). However, if you click on the button in the lower
right corner of any of the groups (arrow marked in the previous image)
you can access the cell format menu, from which you can view, by tabs,
each of the groups referring to the format of the cells, for a clearer
view of what we are modifying thanks to the previewer.
Within the "Alignment" group are two of Excel's most useful
visualization commands: "Merge and Center" and "Wrap Text".

Merge and Center:

When several cells are selected, and this button is pressed, all the
selected cells are merged and become one larger cell.

Writing on this combined cell is equivalent to writing on the top left


cell (cell B2 in the case of the image), changing only the visual aspect
of the sheet, and therefore any reference you want to make to this
combined cell should be done as if you referenced the top left cell.
Wrap text:

When you type a text in a cell and it is too long to be shown in the cell
two things can happen: if the cells on the right contain nothing the text
will be shown "invading" the cells on the right, while if the cells on the
right are occupied the text in our cell will be shown only as far as it fits
in the cell.

The "Wrap Text" command automatically adjusts the height of the row
so that the text fits completely in the cell without changing the width
of the column (B2 is wrapped, while C2 is not).

Manual line breaks in a cell.

In addition to the "Wrap Text" command there is another manual way


to type on several lines in a cell. This is done by pressing "Alt" and
"Enter" simultaneously on the keyboard when typing in a cell.
Lesson 1.4: Border format
Continuing with the customization of the format we arrive at the
format of the borders. As we already know, an Excel sheet is made up
of a multitude of cells. Each cell is delimited by 4 borders (top, bottom,
left and right), which can be marked in different ways or removed
completely..

When we create an Excel sheet it appears by default with all the


borders marked softly (these borders appear in our Excel sheet, but
when printing no border will appear).

If we want to remove the borders to give an image as it will appear


when printing what we will do is select the target cells and use the "Fill
Color" command from the "Font" group by selecting the white color.

In the "Font" group is the "Borders" command, which is used to apply


borders to selected cells. Clicking on the center of the button will apply
the last type of border we used to the selected cells. To change the type
of border we have to press the downward pointing arrow next to the
button, and the options will be displayed as shown in the image:
If we click on any of the options under the heading "Borders" the type
of border pressed will be applied directly to the selected cells.

At the bottom of the drop-down, under the heading "Draw borders"


are these options, useful for drawing "irregular" shaped borders:

Draw border: we can draw borders by hand wherever we want,


without having to select the cells first. You can only draw borders
in a straight line or in a grid. It is useful to draw borders to several
non-consecutive cells without wasting time selecting, choosing the
type of border, etc.

Draw border grid: acts in a similar way to the previous command,


with the difference that it also draws the internal lines of the
marked grid.

Erase border: clicking on the border of a cell it disappears without


affecting the rest of the borders of the same cell.

Line Color: to change the default black color to the border color.

Line style: if we draw borders with the "Draw border" or "Draw


border grid" tools these will appear by default with a continuous
thin line. If we want to change the line style we have to select the
line style we want from this option.

More borders: from here we can see all the borders of the selected
cells and edit them in the most precise and faster way. When we
click on it the following menu appears in a new window:
Following the order of the screen, we select the style of the border
(normal, discontinuous, thick, double...), the color and we keep on
clicking in the window where it puts "Text" drawing ourselves the
border with each click.
Lesson 1.5: Content format
The content of a cell can be of different types: numbers, text, dates,
currency, percentage ... By default, the cells come with the format
"General", and if you enter any data that detects as some specific
format automatically changes its format to the detected. For example,
if we select an empty cell that is in "General" format and write a date
in it (12/25/2017), it will automatically become a date type.

The format of the cells can be checked in the "Number" group within
the "Home" tab.

Each format comes by default with a type of alignment, number of


decimals and graphical representation. For example, the "General"
format aligns content to the left, while the "Date" format aligns
content to the right. All formats related to number line up on the right,
the format "Currency" puts 2 decimals to the number, in addition to
the symbol of the represented currency, and the format "Percentage"
multiplies the number that was before in the cell by 100 and adds the
symbol of the percentage (%) after the number.

With all this is intended to make understand that the format of a cell,
both the format of form, as the border and the content, does not
influence anything in the use of its content, all format changes are
made solely for visual reasons on the worksheet. Even if a number is
entered as a text format, when performing mathematical operations
on the cell, Excel will perform them correctly.
There is therefore no correct way to apply the formats, each user will
do it in a different way, according to the visual criteria that he
considers.

As in almost all groups, pressing the lower right corner opens the
window with format information, in this case with the tab "Number"
selected, where we can view and manage in an advanced way all the
categories of content offered by Excel:
Lesson 1.6: Custom content format
If we open the window with information about the format as just seen
in the previous section we can see that the last of the categories of
number format is "Custom".

With this category we can create the format of the content as we want,
changing the number of decimals, the form of representation of the
data, the color...

To use the custom format, it is essential to understand the use of these


characters (read the description and then look at the table to see an
example of how it works):

# (Hash) - Presents only significant digits; does not present zeroes


with no value.
0 (Zero) - Displays zeros with no value if a number has fewer
digits than zeros in the format.

? (Interrogation) - Adds the spaces of the zeroes to each side of


the separator to align the decimals. This symbol can also be used
for fractions that have a variable number of digits.

/ (Diagonal Bar) - Used to show a number in the form of a


fraction.

. (Point) - Used to show the thousands separator on numbers


greater than 1000.

[COLOR] - To define the color of the text from the custom format,
write the name of the color in square brackets.

The custom format is a very advanced tool to which we could dedicate


several chapters, but it is something that almost no one uses (I in my
years of experience have not yet known anyone who uses it, although
they know how to do it) since it can be completely replaced with other
commands of the various commands (from the "Home" tab almost
all). For example, the color can be defined from the "Font" group, the
number format from the "Number" group itself with other predefined
categories, the conditional format from the "Styles" group (we'll see it
in the next section), and so on.

Therefore, my personal recommendation about the personalized


category is: learn the basic characters to apply personalized formats
but do not invest too much time trying to remember them from
memory, because you can always return to this table to refresh the
memory, or understand how all combinations of personalized formats
work, because it is much easier to use colors, styles, conditional
formats, etc. from other commands that putting codes like the
following to display in green color all numbers with 2 decimals whose
values greater or equal to 0, and if not display it in red.

[GREEN][>=0]#,00;[RED] #,00

Use of the apostrophe (')

Apart from the personalized format, but related to the content


formats, it is important to know how to use the apostrophe " ' ".

This character is used to cancel the default Excel formatting of a cell


when entering data. For example, if we type in any cell "1/5" we might
get "01-may" or "0.20". If what we want to show is "1/5", what we have
to do is write an apostrophe (') and then write "1/5", and the cell will
show exactly what we have written.

Another situation where apostrophe is useful is if we are making a list


starting each element with "-" or "+", since Excel can detect it as an
addition or subtraction and give error. To avoid it we write apostrophe
(') and then the symbol "-" or "+".
Lesson 1.7: Clipboard group
It is the first of all the groups in the "Home" tab (i.e. the one on the
left). This in itself shows that it must be one of the groups most used
by users in general. And indeed it is, although almost never this
commands are accessed through the group in the top bar of the screen,
but through combinations of keys on the keyboard.

This is the group that allows you to copy or cut cells and paste them,
with several alternative options to each of these actions.

Copy ("Ctrl" + "c") and Paste ("Ctrl" + "v")

When we want to duplicate the contents of a cell in another cell we


select the source cell as an active cell, press the command "Copy" or
the key combination "Ctrl" and "c" simultaneously, select the target
cell as an active cell and press the command "Paste" or the key
combination "Ctrl" and "v" simultaneously.

If the content of the source cell is a text, then the target cell will have
that same text. If the content of the source cell was a formula with all
the numbers entered manually, then the target cell will also have
exactly the same formula. However, if the source cell is a formula with
references to other cells (from the same sheet or from a different
sheet), the target cell will not refer to the same cells, but to the cells in
the position relative to the offset. Let's see it better with an example:
The source cell is C2, which is a formula that adds cells A1+A2. When
the cell is pasted to position C5, then the formula does not add cells
A1+A2, but A4+A5. This is because we have moved the origin cell 3
rows down, so the cells it refers to also move 3 rows down.

The same thing would happen if we had changed the cell of destination
not only of row but of column, the references would move to the left or
right as many columns as there are difference between the origin and
destination.

In the section dedicated to functions we will see how to use this


displacement of references in our favor and how we can lock it so that
the reference to the cells is the same when pasting a cell with formulas
in another position.

Cut ("Ctrl" + "x")

Cutting works exactly the same as copying, with the difference that
once the cut cells are pasted, the source cells are deleted. The keyboard
shortcut is the combination of keys "Ctrl" and "x" simultaneously.

Copy format

It works in a similar way to copying, but only copies the format of the
selected cells, not their contents. It doesn't have a keyboard shortcut,
and once the command is pressed the format is pasted in the selected
target cell, there is no need to press any more commands.

An important feature of this command (which not many people know)


is to double-click on the button. By doing this we permanently select
the format to copy, pasting it in all the cells we select, without having
to click on the button several times if we want to copy a format to
several cells. To stop pasting the format just press the Escape key.

Other copying options

The "Copy" command alternatively has the option to copy the selected
cells as an image.

By doing this and using paste in this or another program are pasted
the copied cells (in content and form) in image form, as if we had
made a screenshot, without being able to modify this data in any way
(other than with an image editing program).

Other pasting options

When pasting cells we can use different types of "Paste". We can


access the options from the "Clipboard" group command, clicking on
the down arrow just below the "Paste" button, or we can paste the cells
in a normal way and in the lower left corner a button appears where it
says (Ctrl).
Click and the following drop-down appears:

In order from left to right and from top to bottom the options are
these:

Paste: pastes the selected cells, the standard option when pasting,
which is done by doing "Crtl" + "v".

Formulas: pastes only the formulas, with no formatting of any


kind, moving the references to other cells as we just saw.

Formulas & Number Formatting: pastes the formulas and their


content format, not the cell format.

Keep Source Formatting: pastes the format of the original cells


and their contents.

No Borders: pastes everything but the edges.

Keep Source Column Widths: pastes everything and sets the width
of the column where the target cell is equal to the width of the
column in the original cell.

Transpose: pastes the rows into a column and the columns into a
row. References in cells are also modified in the same way.

Values: pastes the result of the original formulas, without formula


or formatting.

Values & Number Formatting: it is like pasting values, but also


maintains the formatting of the contents of the source cells.

Values & Source Formatting: it is like pasting values but keeps the
formatting of the source cells completely.

Formatting: it is the same as using the "copy formatting"


command.

Paste Link: a formula is pasted that references each target cell


with each source cell (target cell = source cell). It does not copy
formats.

Picture: like copy image, pastes the selection as an image not


modifiable by the program.
Linked Picture: a mixture of the two above, pastes the selection as
an image, but changes made to the original cells are reflected in
the pasted image.
Lesson 1.8: Auto fill
This Excel function automatically detects a series of data and
continues it along all the cells that are indicated to it. For example,
with writing in two consecutive cells 1 and 2 respectively, with autofill
we can continue the series putting 3, 4, 5... without having to write
them manually. The same happens with skipped numbers, dates, and
any series that Excel can identify as such.

Selecting a cell or set of cells we can see that the lower right corner is
different from the others. If we click on it and drag to the right or
down, the autofill will start.
The same happens if we do it with a string of text and numbers:

Or with days of the week

If clicking on the bottom right corner and dragging does not work the
autofill is because it is not in "Fill Series" mode but in "Copy Cells".
This usually happens when you try to make a series with a single cell
initially filled. The quickest way to switch between these two modes is
to hold down the "Ctrl" key while clicking and dragging.

The most accurate way to set to Excel what we want to do when using
the autofill option is to click on the button at the bottom right after
making an autofill.
Copy cells: is like making copy and paste but dragging instead of
using the command.

Fill Series: it is the autofill itself, it completes the series that


detects.

Fill Formatting Only: copies the formatting of the initial cells.

Fill Without Formatting: like autofill, but without copying the


formatting of the initial cells.

Flash Fill: Detects a pattern that relates several cells and


continues it. For example, if in column A you have 10 names, in
column B 10 surnames and in column C1 you write the name of A1
and the surname of B1 all together, the quick fill will write in
column C the name and surname together with all the other rows
(it is hardly used).
Lesson 1.9: Tricks and shortcuts
To finish section 1 we're going to look at some of the best known
keyboard shortcuts and some not so well known that will save us a lot
of time working with our worksheets:

“Ctrl” + D: copies over the selected cell the contents of the cell on
the right. If a range is selected it will copy to the whole range the
contents of the cell or cells in the leftmost column of the selection.

“Ctrl” + J: the same as the previous command, copying the value


from the cells above to the cells below.

“Ctrl” + “Enter”: if we select a range of cells and type something,


the content will appear in the top left cell. If we press "Ctrl" +
"Enter" what we have written will be written over all the cells we
had selected.

If what we write is a formula the references to other cells will move as


they would when copying and pasting normally.

“Ctrl” + N: changes the font style of the selected cells to bold.

“Ctrl” + K: changes the font style of the selected cells to italics.

“Ctrl” + S: changes the font style of the selected cells to underline.


“Ctrl” + 5: changes the font style of the selected cells to crossed
out.

“Ctrl” + “+”: enter a cell, row, or column. If at the moment of


pressing this combination we have a cell selected it will ask us if
we want to move the cells down or to the right, or if we want to
introduce a whole row or column. If at the moment of pressing we
have selected a whole row or column it will introduce a row or
column moving the previous ones down or right respectively.

“Ctrl” + “-“: deletes a cell, row or column. It works the same as the
previous command.

“Ctrl” + “↓” / “→” / “↑” / “←” (keyboard arrows): when we are


moving through a table of contents, we can advance to the last cell
with content with these commands. If we are in the upper left cell
and press "Ctrl" + "↓", the active cell will move to the lower left
cell of the table (if there is no data in the selection column we will
move to the last row of the sheet, row 1.048.576). With "Ctrl" +
"→" we will move to the right of everything, "Ctrl" + "↑" takes us
up and "Ctrl" + "←" to the left.

“Shift” + “↓” / “→” / “↑” / “←” (keyboard arrows): the "Shift" key
together with the keyboard arrows allows us to select a range of
cells while moving the active cell position. For example, our active
cell is A1, we press and hold the "Shift" key and press "→", "→",
"↓", "↓" and release "Shift", we will have selected the range of cells
from A1 to C3.

“Ctrl” + “Shift” + “↓” / “→” / “↑” / “←”: This adds up the effects of
the two keyboard shortcuts named above, so it's not hard to figure
out what the result will be: it's the fastest way to select the whole
range of a table. To start, we position ourselves in the upper left
cell of a table, press and hold "Ctrl" and press and hold "Shift";
now we press "↓", so we have moved to the lower cell with data,
selecting also all the cells in between; then we press "→", moving
to the rightmost cell with data, and also selecting all the cells in
between, so we already have the whole table selected (release
"Ctrl" and "Shift").

“Ctrl” + “;”: enters today's date in the active cell. The value is
static, so if we open this same sheet tomorrow will still appear the
date of the original day.

“F4”: repeats the last action performed. If for example we have


just put a font in one cell and we want to do the same in another,
we can select the target cell and press "F4".

“F9”: updates the sheet. By doing this Excel recalculates all the
formulas in the sheet. The best way to check its operation is to
type in a cell the function "=random()". This function puts a
random number in the cell between 0 and 1 (with decimals), and
the number only changes if the sheet is recalculated (you can force
it by pressing F9).

“F1”: the most important of all named commands, opens the Excel
help. It is impossible to know all the shortcuts and combinations
that exist in Excel, nor to remember all the functionalities,
formulas, formats, etc. This is why it is important to know how to
access the help menu.

Paste special: allows you to perform mathematical operations on a


cell or set of cells using the copied value, such as add, subtract,
multiply or divide, among others.
Section 2: Conditional Formatting
In the previous section we learned how to use cell formats and their
contents. This is done mainly to highlight content (such as coloring
titles), or to draw attention to some data (e.g., mark periods of loss in
red instead of profit). However, once we set the format of a cell, it
always remains the same (unless we change it again manually).

Mainly, conditional formatting is used to define a format for a cell or


group of cells (so far as we have seen), with the particularity that this
format is applied to cells only if a previously defined condition is met,
for example, setting a green background if the value is greater than 0
and red-letter color font if the value is less than 0.

Therefore, to apply a conditional format such as this to a cell or range


of cells it is necessary to define these two elements:

1. Condition that Excel will check if it is true or false.

2. Format to apply to the cells in the range if the previous condition


is to be true.

Another type of conditional formats are those that don't need a


condition to be applied, but are applied over a group of cells, and the
format of each one of them depends on its own value in relation to the
value of all the others (don't worry if you don't understand it yet, you
will understand it as soon as you see an example).

Excel offers the possibility of applying conditional formats to the


selected cells with the use of predefined conditional formats, which
besides being simple is very quick to do, and for occasions that require
specific formats, we can modify the predefined ones or create our own
formats from scratch.
Lesson 2.1: Predefined formats for highlighting cells
Suppose you are working in Excel with a data table with many rows. In
this table there is a column titled "income", but since there is so much
data it is not easy to distinguish which lines are profitable and which
are loss-making.

To facilitate the visual identification of the lines with benefits we could


use a conditional format that puts a green background to the cell if the
value is greater than 0.

We can do this quite quickly if we use a predefined conditional format


on the cells we have selected. To do this we look at the "Styles" group
of the "Home" tab, specifically at the "Conditional Formating"
command. Clicking displays a menu, where we see the different
options of conditional formatting, and leave the mouse on "Hhighlight
Cells Rules".
In the last displayed menu it asks us to select what kind of condition
we are going to introduce, in our case "Greater Than…".

All the options to highlight cells work practically the same way, we
select the type of condition that we are going to check, in the new
window we introduce the value that makes the condition be fulfilled
and the format that the cell will have if the condition is fulfilled.
The two slightly different conditions are "A Date Ocurring" (in which
you have to choose the date from a drop-down list) and "Duplicate
Values" (in which you have to choose from the drop-down list whether
to mark duplicate or unique values).

The other conditional formatting option to highlight cells is


"Top/Bottom Rules".

From here we can apply a conditional format that applies the format to
the 10 highest values (the title says 10, but when you enter you can
modify the number), to the 10% higher (you can also modify the 10%
to the percentage you want), to the lower (in number or percentage)
and to those who are above or below the average of the values to which
we are applying the format.
Lesson 2.2: Predefined data bars
This format is used to see at a glance which are the major values of the
selection. When this format is applied to a set of cells, all of them are
filled with bars of one color. The cell with the highest value of all cells
in the selection will be completely occupied by the bar, cells with zero
value (0) have no bar, and intermediate values are filled in proportion
to the maximum value.
This type of conditional formatting is the type we mentioned in the
introduction to the chapter that does not require an initial condition to
apply the format or not to apply it, but always applies it, and does so in
relation to the value of the selected cells.

To apply this type of conditional format we will use the command


"Conditional Formating", "Data bars", and select the type we want.

All types of data bars are the same, changing only the color of the bars,
and solid color (all the bar has the same color) or gradient fill (like the
previous image, the color becomes whitish to the right of the bar).
Lesson 2.3: Predefined color scales
Its operation is very similar to that of data bars. It does not require an
initial condition to apply the formatting if it is fulfilled, but it always
applies the formatting and does so depending on the value of each cell
in relation to the value of the other cells of the selection, with the
difference that this type of formatting uses colors instead of bars to
differentiate the highest values from the lowest.
To apply this type of conditional format we will use the command
"Conditional Formatting", "Color Scales", and select the type we want.

To determine which color to apply to each cell we must select the color
that the cell will have with the upper value, the one that the cell will
have with the lower value, and in some cases the color that the cell will
have with the intermediate value. If we choose only 2 colors it will be
called 2-color scale and if we choose 3 colors it will be a 3-color scale.
Lesson 2.4: Predefined icon sets
The last type of predefined conditional formats is the icon sets, which
work in a very similar way to the two previous ones, the cells to which
they apply are selected and based on their value in relation to the value
of the other cells of the selection one icon or another is applied.

To apply this type of conditional format we will use the command


"Conditional format", "Icon Sets", and select the type we want.
The higher of the values of the selection will have the most favorable
icon, the lower will have the most unfavorable, and the intermediates
are distributed according to how many types of icons there are in the
chosen set. For example, in a selection with a minimum value of 0 and
a maximum of 100, if we choose a set with 3 icons, the values from 0
to 33 will have the most unfavorable, from 34 to 66 will have the
intermediate, and from 67 to 100 will have the most favorable. If we
had chosen 5 icons the distribution would be 0-20, 21-40, 41-60, 61-
80 and 81-100.
Lesson 2.5: Detect conditional formats on a sheet
Once we have finished putting conditional formats to our sheet, it is
equally important to know which cells have conditional formats, of
which type and which ones have conditional formats as a whole
(important in the bars, scales and icons, since the group is
indispensable to know which is the maximum).

Detection is the intermediate step between using a predefined


conditional format and modifying them: you cannot modify a format
that you cannot locate.

To see the conditional formats applied to a range of cells, select it and


go to the "Conditional Formatting" command, to the "Manage rules"
option in the drop-down menu.

The following window opens, in which we see the formats applied to


the selected cells. In the upper part of the window we see that it says
"Show formatting rules for:" and "Current selection" is selected. If we
change this to "This Worksheet" it will show all the conditional
formats that there are in the whole sheet, and in the column "Applies
to" we can check to which cells or range of cells it applies the
formatting.
Lesson 2.6: Edit predefined conditional formats
The first modification we need to know (and the simplest of all) is to
modify the range to which a conditional format applies. To do this,
click in the text box of the column "Applies to" of the rule you want to
modify and type in the new range to which you want to apply it, or
click on the right button (↑) and select the range.

The modifications in the conditional format itself (the conditions and


the applied formats) are done by clicking on a condition and clicking
on "Edit rule". Doing so opens a window with information about the
format.

Format all cells based on their values


The first type are conditional formats that do not need an initial
condition: data bars, color scales (2 or 3 colors) and icon sets. From
here we can change the colors with total freedom, change how the
highest and lowest data are chosen (for example, in a data bar, that the
bar does not begin to appear from the value 0, but from the lowest
number, or in a scale of 3 colors that the intermediate color is not the
average of all data, but 80% with respect to the maximum), choose
whether to show the numerical values in the cell or only the graphical
representation of the conditional format, and so on.

Format only cells that contain

Each cell is evaluated against a specified condition, and if it is met, the


specified format is applied.

Here we could set as a condition that the cell is larger than the cell on
its left, for example. In this case, if we want to apply the formatting to
a set of cells (that each cell is marked if it is bigger than the one on its
left) we have to take into account that by default when typing the
condition, the cell is locked, so the formatting will refer all the time to
the cell initially marked). If we want to mark the cells larger than the
ones on the left and not have to enter all the conditions one by one we
will have to know how to use the $ symbol, which we will see later in
the chapter on functions.

Format only top or bottom ranked values

It works exactly the same as the predefined "Top/Bottom Rules", you


choose whether to mark the highest or the lowest and whether to mark
a specific amount or a percentage of the selection.

Format only values that are above or below average

The first 4 options are the same as the predefined ones, mark
according to the value above or below (or equal to) the average of the
range. The rest of the options are to mark according to the relationship
with the deviation.

Format only unique or duplicate values

We only have to choose in the drop-down list if we want to mark the


values that are unique in the range or those that are duplicated in the
range.

Use a formula to determine which cells to format

This is not a modification, but a creation from scratch, which we will


see in the next class.

In any of the last 5 cases, once we define the condition, all we have to
do is click on "Format" and select all the characteristics that we want
our format to have (content format, text and cell color, borders...).
When accepting, in the "Preview" box we can see what the format will
look like when it is applied.
From the same window that we have opened to detect and modify the
formats we can create a new format on the cells that we have selected,
pressing "New rule" and choosing a condition and a format as we have
just seen that is done to edit.
Lesson 2.7: Create custom conditional formats
We just saw that the last of the types of rules for applying conditional
formats is " use a formula to determine which cells to format ". This
means that we can enter our own rule as a function to mark the cells
that meet the condition. Therefore, these custom formats do not
include bars, color scales, or sets of icons, but are only for highlighting
cells.

Since we haven't started talking about functions yet, we're going to


move quickly through these formats, but let's see a concrete example
of a simple function:

=OR($G7>$G$17,$E7>AVERAGE($E$7:$E$15))
What we are seeing is an “OR” logical function, so the format will be
applied if the first condition is met OR the second condition is met,
and those conditions are:

Cell G7 is larger than cell G17

Cell E7 is larger than the average for cells E7 to E15.

This can be a bit confusing if you don't know about functions yet, but
once you know how to use functions it will be very easy to understand
how this formula works and create your own to meet your needs for
conditional formats beyond the basic options offered by Excel.
Section 3: Data Tables and Filters
As we said in chapter 1, it is very important to organize the data in the
form of ordered tables so that we can quickly recognize what we are
looking at, and emphasize the important parts so that a person who
has not made the table knows where to look, and even ourselves as
well.

In this chapter we are going to learn to quickly give a predefined


format to the data tables, we are going to see what the filters are, what
they are used for, how they are used, we are going to learn to use
advanced filters and finally we are going to learn to use functions
related to the data tables, such as subtotals, calculate the maximum
value of a range, the minimum, fashion, add a range if a specific
condition is fulfilled, etc.
Lesson 3.1: Format as a predefined table
Although in the first chapter we have seen how to format a table
completely manually and from scratch, there is a much faster way to
do it: with the formats predefined by Excel to format tables.

This is done by selecting a data table and pressing the "Format as


Table" command in the "Styles" group of the "Home" tab. When we
select the type we want we get a message asking if the table has
headers, ie if the top row of the table has the names of each column.

Once we press accept the data take the form of the table we have
chosen, and at the top of the program appears a new tab that was not
before, the "Design" tab (this tab only appears when the active cell is a
cell in the table).

In this tab we will look only at the groups "Table Style Options" and
"Table Styles". The first one is used to modify the visual aspect of the
rows and columns, add a row of totals, etc. (the best way to know what
each option is used for is to press them all and see what happens). The
second one is used to change the type of table (the colors) that we
initially choose.
If you still haven't tried applying a table format to a data table, it
would be a good idea to do so before reading the next question:

When you pressed the "Format as table" command, did you do it by


selecting the whole table or were you only with the active cell on a
single table cell?

To give a quick table format you don't need to select the whole sheet,
having the active cell in one of its cells is enough, although if you have
selected the whole sheet think about this question: Have you selected
the whole table with the mouse, having to move the screen down if the
table was long enough, or have you done it with the key combination
"Ctrl" + "Shift" + "↓"? Which of the two ways is faster?
Lesson 3.2: Apply filters to one and several columns
If you are somewhat observant, you will have noticed that, when
applying the table format, a button with a downward arrow has
automatically appeared in all the cells of the titles.

This is the filter button. A filter is used to establish which elements we


want to be shown in a data table, hiding the rows where there are data
we are not interested in.
When we click on a filter button a menu is displayed, where all the
elements (without showing duplicates) that are in that column appear.
The elements that have the box checked are those that are going to be
shown, so if we leave all selected the table will be shown as it is, and as
we uncheck the boxes, the rows that have values that are unchecked in
the filter will be hidden.

If we first apply a filter to one column and then to another the filters
are added together. For example, if we first filter by color, and we hide
all the purple colors, and then we filter by garment, it could be that
there are garments that do not appear, because when filtering by color
they have already been hidden: if all the socks are purple, when we put
the color filter (hiding the purple ones) and then go to the garment
filter, the last one will no longer show socks, because they are all
already hidden.

The color of the cells can also be used as a filter, if they have one.
Lesson 3.3: Sort table elements
Another option we have when pressing the filter button is to sort the
column data. Depending on whether the column detects text or
numbers, the option to sort from greater to lesser or from A-Z (or vice
versa) will appear, and again we have the option of the color of the
cells (if they have it).

Obviously, if we sort a column and then do the same with a second


column, the first sort will disappear.

When there is a filter applied over a column the shape of the filter
button changes to what it looks like in the image (the right column is
the one with the filter applied), just as it also changes when the rows
are sorted (the middle column is the one that is sorted).

All the actions of putting a filter, sorting, etc. can also be done from
the "Sort & Filter" command in the "Editing" group of the "Home" tab.
Lesson 3.4: Filter by text
The last of the filter options we still have to see is the one that says
"Text Filters". This displays a menu with several options, of which we
have to select one, although all take us to the same screen, where we
can edit the condition without any problem.

When we press, the "Custom AutoFilter" window always opens, and


the option we have chosen to enter is selected.
If the column we are filtering is of numbers we will have to choose
between the first options (greater, smaller, equal...) and if it is text we
will have to choose between the last ones (text that begins with, that
contains...).

We can put a second condition, and associate it to the first with a


logical condition "And" or with a logical condition "Or":

“And" function: only cells that simultaneously meet the two


specified conditions are displayed.

“Or" function: the cells that meet either of the two conditions are
displayed. In the case of the image, if we put ">100" OR "<5000"
no row will be hidden, as all real numbers meet either of the two
conditions.
Lesson 3.5: Advanced filter
To use an advanced filter we have to go to the "Data" tab, group "Sort
& Filter", command "Advanced".

To apply an advanced filter, we have to create an additional table with


the titles of the columns and underneath the values that we want to
filter, we press on the command and a screen appears that asks us to
select the table of data and the table of filters.

The filter table does not necessarily have to be above the data table,
but it is recommended for the following reasons:

1. If we put it on the side, it will be hidden when the filters act.

2. It is more visible than if we put it underneath the table.


The first line is the first condition (shows all rows where the color is
"Blue" and the size is "S"). The second line is the second condition
(shows all rows where the color is "Green").

With this example we can verify the fundamental difference with the
normal filters: in a normal filter if we had filtered these two colors
("Blue" and "Green") and this size ("S") only the lines of color "Blue"
and size "S" and the lines of color "Green" and size "S" would be
shown. With the advanced filter we have been able to distinguish in
specific to show the lines of color "Blue" and size "S" and all the lines
of color "Green", regardless of size.

We can add as many filters as we want (adding more lines to the filter
table, if you run out of lines where to write remember how we inserted
rows in chapter 1), but every time we modify the filter table we will
have to use the "Advanced" command again.
Lesson 3.6: Statistical functions related to tables
When we deal with tables with a large number of data there are certain
mathematical and statistical functions that greatly facilitate the
obtaining of data from these tables, therefore, although we have not
yet gone through the chapter of functions, we will begin to deal with
some of the most important functions in the treatment of tables.

A function is a predefined formula in the program that performs


specific calculations based on parameters in a specific order entered
by the user. It consists of 3 fundamental parts:

The "=" symbol, which is always placed at the beginning of all


functions and formulas.

The name of the function (e.g. "SUM", "MAX" or "IF")

The parameters of the function. Each function requires specific


parameters in a specific order. The program itself shows the
necessary parameters of the function so that you don't have to
learn anything by heart.

To see all the functions in Excel we can click on the “fx” icon next to
the formula bar, and the following window appears:
Here we can choose which category we want (mathematics, logic,
statistics...) or see them all at once. If we are not sure how the function
we want to use is called, it is quite useful, since all the functions are
grouped according to their category, but if we know how the function
we want to use is called, it will be enough to start typing in the active
cell an equal symbol ("=") and when we start typing the name of the
function, the names of the functions that start like this will appear.

Function “MAX”, “MIN”, “MODE”, “AVERAGE”, “COUNT”, “FREQUENCY”

The first function we are going to deal with in this lesson is a very easy
to understand function with very simple input parameters: the "MAX"
function, which, as you can imagine, compares the value of all the cells
in a range and returns the maximum of all of them. We write in the
active cell "=MAX" and as we write Excel will show us the functions
whose name begins in the same way. We can use the up and down
arrows of the keyboard to choose the function we want if it is not the
first one that appears in the list. Once our function is marked in blue
we press the "tabulator" key of our keyboard so that it self-completes.

At the end of writing the Excel function asks us to enter the


parameters of the function.

At this point, it is advisable to press the "fx" icon next to the formula
bar and the window opens explaining which parameters are necessary
for the function and what each of them means, especially useful if we
are not very sure of the parameters needed to use the function.
Here we can read the description of the function, and as we go
positioning the cursor in each parameter will show us the data that we
have to introduce.

In this case is asking us to enter the numbers to evaluate to find the


maximum between them. To do this we can enter the range of cells by
hand, or we can click on the right button with an up arrow and select
the range as we would normally do.

When introducing the data we see to the right the first values of those
that we have been selected, and just above the description we see the
result of the formula if we press "OK" at this moment.

All the functions named in the previous title have as parameters the
same as the "MAX" function: a range (or several) of cells to evaluate
and return the result.

Function “COUNTIF”, “MAXIFS”, “MININF”, “AVERAGEIF”…

A somewhat more complicated function, but one that is absolutely


necessary for working with tables, is the "COUNT.IF" function, which
is a variation of the "COUNT" function.

The "COUNT" function returns as a result the number of non-empty


cells in a range, while the "COUNT.IF" function counts only the cells
that meet a certain condition set by the user.

Parameter 1, Range: “is the range of cells from which you want to
count nonblank cells”.

Parameter 2, Criteria: “is the condition in the form of a number,


expression, or text that defines which cells will be counted”.

Therefore, in the first parameter we will have to select the cells we


want to count, and in the second the condition for them to be counted.
We can use this function to count how many different elements there
are in the warehouse in Boston, using as first parameter all the cells
under the title "warehouse" (we can write the range in the box or click
the right button with an arrow up and select the range normally) and
as second parameter we write in the name of the city, "Boston".

In this case the criterion is a text, since the column we want to count
contains texts. If we wanted to count sales over $5000, we would have
to select the sales column and as the criteria put ">5000".

All the functions named in the title require the same input parameters:
the range of cells to be evaluated and the condition for performing the
function.

The condition can be from something as simple as the ones we have


used from example to nested functions (functions within functions, we
will see it in the chapter destined to functions), that the value is
greater than that of the cell on the right, that the text of the cell does
not have more than 10 characters, that it begins with a vowel, or
practically anything we can imagine.

Some of the mentioned functions also have the option to end the name
with "IFS", which gives us the possibility to set even more conditions,
not just one (e.g. COUNTIFS).

As we have not yet really arrived at the chapter of functions it may be


somewhat difficult to understand, so we still do not focus too much on
the part of the conditions, for now it is enough to know that there is
the possibility of applying conditionals to these functions, but all this
will end up being much clearer in a few chapters.
Lesson 3.7: Mathematical and trigonometric functions related to
tables
Function “SUM” y “SUMIF”

They both work very similarly to the function seen above. The first
asks for a range of cells as an input parameter and returns as a result
the sum of all of them, and the second does the same, but adding only
the cells that meet a certain condition.

The small difference is that here there are 3 input parameters, the
range of cells to evaluate to check whether or not the condition is met,
the condition itself, and the range to be summed if the condition is
met. There is one more parameter since it can be, as in this case, that
the cells we want to evaluate are not the same ones we want to add. We
want to calculate the total sales in Boston, so that's the criteria, and
the range to evaluate is the column with the name of the city, but what
we want to sum is the total sales, which is in a third column. In this
way, we have defined the three arguments of the function.

Function “SUBTOTAL”

Another of the most useful functions dealing with tables when filters
have been applied is that of SUBTOTALS, which performs different
functions (the operation to be performed is one of the input
parameters of the function) on the data that have not been hidden by
the filter.

This is very useful because, if you make for example a normal sum of
an entire table to calculate a total (sales of all products) and then use a
filter to see only certain elements (sales of all products in the Boston
store), the sum will continue showing you the value of the sum of all
values in the table (total sales), while the subtotal will only show you
the value of the sum of the elements that have not been hidden (sales
in Boston).

The parameters required by this function are:

The operation to be performed (sum, maximum, average...)


entered as a number representing the function (9 for sum, 4 for
maximum, 1 for average...). The numbers representing each
function can be seen by clicking on "Help on this function", or on
the help shown by Excel itself if we are typing the function on the
active cell or formula bar.
The cells on which to perform the selected operation.

If there is no filter applied to the table, the sum of total sales looks like
this:

However, if we apply the filter to the warehouse leaving only "Boston",


the result of the function automatically changes to show only the sum
of Boston sales:

This function is very similar to the ones we have seen before, which
only perform the function if a certain condition is met, and the
subtotals do something very similar, since they perform the function if
the cells are not hidden by the filter (i.e., a condition that we have
introduced in the form of a filter). The difference is that with the
subtotals when we modify the filter we lose the condition, so we could
not use it to fill a table like this, for which we would have to use
functions.

SUBTOTALS HAVE THE ADVANTAGE OF SPEED, WHILE FUNCTIONS


HAVE THE ADVANTAGE OF PRECISION.
Section 4: Charts
So far, we have said that formatting cells and their contents is the best
way to get the attention of a person who has not participated in the
creation of the sheet on some important data. In this way we could
emphasize the titles of the columns, the results of the periods with
profits, the sales totals of a store, etc. But what if we wanted to quickly
see all the data, compare them with each other, and see how they
evolved? The best way to do this would be a chart.

A CHART IS A GRAPHICAL REPRESENTATION OF THE SELECTED


VALUES THAT ALLOWS US TO QUICKLY MAKE A VISUAL COMPARISON
OF THESE VALUES.

The charts can be of multiple types (line, bar, pie, 3D) and can even be
combined among them, usable to represent any value we can imagine,
so by dominating this Excel option and combining it with cell formats,
we have completely gained the visual aspect of Excel sheets.
Lesson 4.1: Select data to create a chart
To create a chart with the world population from 1750 to 2017 we need
to organize the data into two columns containing the following data:

The year

The world population

Once we have the table, we select it in its entirety (including the


column headings) and go to the "Insert" tab, "Charts" group,
"Recommended Charts" command.

In Excel we can use a multitude of different graphs, and several of


them require the data to be organized in a specific way, but in most it
is enough to organize the data by columns as we just did with the
previous example.

If in the same graph we wanted to make a second line representing the


birth rate, and a third line representing the mortality, we would only
have to make a third column called "Birth rate" and put below the
birth rate values, and a fourth column called mortality and put below
the values. Then we select the whole table again (titles included) and
use the same command as before.

Normally the data is put in columns to facilitate the visualization, but


we can verify as if we put them in rows the chart is the same, and to
add new lines is done in exactly the same way.
Lesson 4.2: Recommended charts
Earlier we have seen how to select data from a table and that we have
to use the command "Recommended charts". Now let's see what
happens when we use this command:

Excel detects what type of data we are entering and shows us the types
of graphs that may best suit our needs.

In most cases (either because it is a common graph we are looking for,


or because it is such a specific graph that Excel detects which type of
graph we will need), the graph to use can be selected from this
command and later change (slightly, in most cases) the format,
although we also have the ability to go to the tab "All charts" above the
window and select the type of chart we want.
Lesson 4.3: Explaining all graphs and recommended situations
When we select "All charts", the following screen is displayed:

To the left we see a column with all the charts groups in Excel, at the
top of the right we see the types of charts offered by the selected group,
and just below a preview of how our chart would look (if it can be
done, since there are charts that need data in a specific way and if they
are not so can`t be plotted).

Column: each value is represented in the form of a column. If


there are several different data they can be stacked (their values
are summed). It can also be plotted in 3D.

Line: Similar to the previous one, but seeing only the maximum
points of each data, not the column filled below. It can also be
stacked and viewed in 3D.

Pie: each data is a piece of the pie, according to its value in


percentage over the sum of all values. It can also be plotted in 3D.
As you can see, it is not one of the best types of graphics to use
with these data (world population) .

Bar: Same as columns, but advancing on the "X" axis instead of


the "Y" axis.

Area: the same as the lines, but coloring the gap under the line.
X Y (Scatter): similar to the lines, but marking each point
independently of the others. It also gives the option to join them,
making them equal to the lines.

Map: used to compare values and show categories in geographic


regions. In the example graph the world population by country is
represented.
Stock: used to plot stock price quotes at open, close, high and low.

Surface: this is a 3D graphic used to represent a geography known


for its latitude, longitude and height.
Radar: represents data from a centric axis to an outer ring. A zero
value will be in the center of the graph, while the maximum of the
range will be the one marked on the outside.

Treemap: it represents the values of a main branch as a large


rectangle, and the secondary branches as smaller rectangles
inside.
Sunburst: used to represent hierarchical data. The inner ring
shows the upper level of the hierarchy, and the outer ring shows
the lower level.
Histogram: is a graphical representation of a variable in the form
of bars where the size of each bar is proportional to the frequency
of the value it is representing. It is mainly used to make Pareto
diagrams (80-20 relationship).

Box and Whisker: shows the distribution of data in quartiles,


highlighting the average and outliers. Boxes may have vertically
extending lines called "whiskers”. These lines indicate variability
outside of the upper and lower quartiles and any point outside
those lines or whiskers is considered an outlier.
Waterfall: shows a cumulative total as the values are added or
subtracted depending on whether they are positive or negative.

Funnel: show values in several phases of a process.

Combo: used to customize a chart with more than one data type,
to put each one with a different chart type, and on different axes
(main and secondary) if necessary.
Lesson 4.4: Combining chart types
In this section we are going to extend the use of the last type of charts
we have just seen: the combo.

To make a combo chart we need to have a data table with two columns
of data (at least), of which we are going to represent each one in a
different way in the graph, for example, one with a line and another
with columns.

Let's use this table as an example, which shows the evolution of visits
to a web portal over any year and the benefits generated by such visits.
The first thing is to think about how we want our graphic to be before
starting to make it:

We want to use a combo chart to show each group of data


differently from the other.
We want to show the visits as a line and the benefits as a column.

Since the data have so much difference in value (the benefit


approximately 20 times less than the visits), we will use the two
vertical axes (the primary and the secondary), because if we used
only one the value of income would hardly see it in the graph
because it is so small in comparison.

We select all the data of the table, we use the command to insert a
chart and we select the last option of all: combo. The screen looks like
the image above, and from here we'll have to start changing so that it
appears as we described a few lines ago. In "Visits" we will have to
change the type of graph to "Line" and "Income" we will change it to
"Clustered Column". Finally, in "Secondary Axis" we will mark the box
for "Income".
The chart then appears as shown in the image, where in addition to
seeing the evolution of both sets of data throughout the year, we can
also see the relative difference between visits and income (I encourage
you to check how the chart would look if we had not decided to put the
benefits on the secondary axis, and serve as a reference when to use
the secondary axis and when not).

Not all types of charts look good when combined, for example, it
would not have looked good if in the previous example we had decided
to use a pie chart type to show the benefits, but it would be good to use
an area or scatter plot. The graphs that combine well are those that
share the advance of the axis as the value increases:

Column, line, area, X Y (Scatter): the value grows on the "Y" axis
of the chart.

Bar: the value grows on the "X" axis of the chart.

Pie, radar: they use a circular axis.

Sometimes you could combine graphics that we just said don't go well,
but that can only be decided by the user through his own experience.
Lesson 4.5: Chart elements
If you have been trying to use several types of charts you may have
noticed that in some of them it automatically appears a title for the
chart and not in others, in some appears the legend of what represents
each color of the bars, lines ... and in others not and so on with several
more elements.

A chart, in addition to the values we are representing, consists of


several other elements, which are what we can see if we click on the
chart and press the "+" button that appears in the upper right of the
chart when we have it selected:

All these elements can be activated or deactivated by checking the box


on the left. Also, if an element is activated, we can press the arrow to
the right to show even more options that we can activate or deactivate,
such as secondary axes, axis titles, show legends, include data tables
with the chart, and so on.

The best way to know what each one of these elements does is to
activate and deactivate them and see what happens, since they are very
simple elements that once you see for yourself you will know what they
are for, and you will have to be yourself based on your experience and
level of detail that you require, which must decide which elements to
show and which to hide.
Lesson 4.6: Format Axis
If you click on one of the axes of a chart and then right-click on the
same axis, a menu is displayed in which the last of the options is
"Format Axis":

Clicking on this option opens a menu to the right of the program:


In the axis options we can see four groups:

Axis Options: we can modify the maximum and minimum values


of the axis, as well as the increments from one value to another
and other options that affect the representation of the axis.
Tick Marks: useful if we don't want to show the entire grid lines.

Labels: to display the numeric or text value of the axis.

Number: affects the format of the axis content (if it is number,


text, percentage...).
Lesson 4.7: Predefined design styles
You may have noticed that, when you have a chart selected, two tabs
appear on the menu tabs that do not appear if you do not have a
selected chart: the "Design" tab and the "Format" tab.

This “Design” tab contains the following groups:

Chart Layouts: we can modify the elements of the graphic and


make quick designs of predefined options offered by Excel.

Chart styles: the first command on the left is "Change colors",


which is used to change the color palette of the representation of
the values according to the type of graphic we have chosen. Next,
we have a series of predefined styles that we can use to change the
style of the chart, changing the colors of the chart, background
colors, borders, etc..
Data: we can swap the vertical and horizontal axes in case Excel is
showing the graph the wrong way, and we can modify the data
that make up the graph (we'll see it in the next class)

Type: Used to change the type of chart we had initially chosen, for
example, if we want to move from a chart with several lines to a
combined chart. The screen is the same as the one that opens
when we create the graph for the first time.

Location: to move the selected sheet chart, or create a new sheet.

All these commands are used to quickly change the representation of


the values in the graph, but if we want to use a specific format for our
graph we can also use all these fast formats to leave our graph in the
most similar way to the one we want and then change the elements we
need manually, in the "Format" tab, whose commands work in the
same way as we have already seen in the "Home" tab, but applied to
the graphs.
Lesson 4.8: Change the selected data
Suppose we have finished creating the chart that we have been using
as an example of visits and incomes for a year, we have created the
combo chart to our liking, we have applied the predefined styles and
then we have modified them to our liking, and after all this work we
realize that we should have introduced one more column: the number
of users of the web.

To add this group of data to our graph it is not necessary to recreate it


from the beginning, we can edit the data that make up the graph to
add a new set of data. We can do this by right-clicking on the chart and
pressing "Select data" or from the "Design" tab (only shown if we have
the selected graph) by pressing the "Select data" command.

In the left part we see the series of data that are represented in the
table, and in the right part the divisions of the horizontal axis. In the
case of the divisions of the horizontal axis we can only edit them to
select other different divisions (labels), while on the left we can add
new series (what we want to do in this case), edit the existing series
(for example, if we had added under the table another 12 rows with
data to show the following year), or remove a series (if we want to stop
representing it in the graph).
We create the new column in our data table, click on "Add", select the
title of the column as "Series name" and the range of data as "Series
values".

In this way we have been able to add a new set of data to a graph that
we had already created and formatted without having to create the
entire chart again.

The new series of data, "Users", I've decided to leave it with the line
chart type, but I encourage you to open the chart type editor again and
try the "Combo" options until you find the one that suits you best,
being able to change not only the new series, now you can change the
other two old series to accommodate everything to your liking.
Lesson 4.9: 3D charts
So far we've used various types of charts to represent various
situations, but we haven't come to use any 3D charts. We have done
this so that we can dedicate a lesson just for them.

3D charts have the same elements as the other charts in their


respective categories, but they have an additional visual component:
perspective. I'll show you what I'm talking about with a simple
example:

Apart from data labels, legends, etc., based only on the visual
component, which of the two graphs is more visually clear?

The first of the graphs has too much perspective, and too little rotation
of the "Y" axis. The second one has less perspective and more Y-axis
rotation, as well as having rotated the X-axis to show the month of
January at the bottom.
This rotation of 3D graphics is done by right-clicking on the graphics
and pressing "3-D Rotation", which displays a menu with the special
options of 3D graphics.
The 3 kinds of spin that are fundamental to creating a good 3D graph
are the spin on the X-axis, the spin on the Y-axis, and the perspective.

There are some types of charts that do not allow us to change any of
these values, and we will have to make the most of the possibilities
they allow us.

There is no rule or method to correctly apply the 3D rotation to this


type of graphics, you just have to rely on common sense and the
experience we will acquire as we go making more and more of these
charts.

As a tip, I'll tell you, take advantage of the rotation in your favor. As
you saw in the example above, in the first graph the month of April
seems to have a much larger percentage of the total than any of the
others, but if we look at it with a more realistic perspective we realize
that there is not that much difference with January, that is, we can use
the turn in our favor to focus on the data that interest us, and leave
other less relevant data in the background.
Section 5: Data Validation
Data validation is a tool used to prevent data from being entered that
the sheet creator considers to be "invalid" data in a cell or set of cells.
Invalid data can be fundamentally distinguished between two types:

All data is invalid except that specified in an additional data table,


that is, if you enter any value that is not included in the table, an
error appears.

Data defined through a condition or set of conditions, predefined


from Excel or customized by the user, are invalid.

When you enter invalid values in a cell with data validation, 3 things
can happen:

1. An error message appears and Excel does not let you enter the
data.

2. A warning message appears and Excel gives you the option to


continue ignoring the warning or cancel data entry.

3. An information message appears that the cell has data validation,


but lets you enter the data.

When applying data validation to a cell we have the option of entering


a message to appear when the cell is selected as an active cell, and we
also have the option of customizing the messages that will appear if
invalid data, error, warning or information are entered.

Now you can have the following question in mind: If someone has
entered invalid data on my sheet because I have decided to leave a
warning message or information instead of error, how do I know?
With the corresponding command, we will be able to mark with a red
circle all the cells where invalid data has been introduced, but that we
have allowed to introduce.

During this section we are going to use validation to complete a table


like this, according to specific instructions:
Lesson 5.1: Select data from drop-down list
The first data validation method that we are going to see, and the one
that is most often used, is that of validation through a drop-down list.
As we mentioned in the introduction, this method is based on the use
of a data table in another part of the sheet, or even in another sheet,
which is shown in the form of a drop-down list in the cell to which we
are applying the validation, and if the value we introduce in the cell
does not coincide exactly with one of the values of the table, an error
message will appear.

To understand how this type of validation works, we are going to


create a table like the one in the image, we are going to select the first
cell of the " Customers " column as an active cell, and we are going to
go to the "Data" tab, group "Data Tools", command "Data Validation".

When we click on it, a window like this appears, in which we select


"List" and in the " Source " box we select the range of cells where the
names of the customers are (without including the title "Customers").
Click on accept and the window closes.
If we now select the cell as active cell we can see an arrow down to the
right of the cell, that if we press it shows us the clients that we can
introduce in the cell.

We do the same for the first cell of the "Material" column using as
validation the list of materials, we select the first cell of "Customer"
and "Material" and we use the autofill to apply the validation to all the
rows of the table.
Lesson 5.2: Limit the data entered
Another much less restrictive way to apply data validation is to use the
predefined Excel options to allow you to enter data that meets a simple
condition, such as the content of the cell being an integer (without
decimals), a number between two values, a text with a minimum and
maximum number of characters, and so on.

To do this, again we have to use the command "Data Validation", and


this time we are going to look at all the other options that are neither
"List" nor "Custom".

For all these options, when we click on one of them there are 3 fields to
fill in:
We must choose the limits of the condition we are going to establish
and establish them numerically.

Whole number: the value entered in the cell must be an integer


(without decimals) within the established limits.

Decimal: is the same as the previous one but allowing decimal


numbers.

Date: the value entered in the cell must be a date within the set
limits.

Time: Same as above but allowing hours instead of dates.

Text length: sets the number of characters the content can have.

We are now going to set a length limit for the text in the "Description"
column of our table, so that no text of less than 4 or more than 14
characters can be entered, so that there is a description of the element,
but it is not too long.
Lesson 5.3: Custom limits
Since Excel always offers us the possibility of using predefined options
to facilitate a task, it also offers us the possibility of establishing our
own criteria for data validation through formulas and functions.

To set our own custom limits to data validation, we must use the "Data
Validation" command and in the "Allow" drop-down list select the last
of the options: "Custom".

Some interesting custom data validation:

Protect from writing:

=isblank(A1)

Avoid repeating between cells:

=A1<>B1
Avoid repeating in range:

=countif($A$1,$A$2:$D$4)=1

Limit the date to the current year:

=year(A1)=year(today))

Write only even numbers:

=mod(A1,2)=0

Validate phone number:

=and(len(A1)=9,isnumber(A1))

Write formulas only:

=isformula(A1)

Write the first letter of each word in capital letters:

=exact(A1,proper(A1))

Write everything in lower case

=exact(A1;lower(A1))

Custom limits are based on the use of a formula or function, and as we


have not yet reached the section on functions you may find it a little
difficult to understand, but still read the functions and their
description in the table above, even if at the moment it is only to give
you an idea of the things that can be done with custom limits.

For now, we are going to use one of the functions we saw before to
avoid entering a higher price than any of those in the attached table in
the "Cost" column, the "MAX" function.

Select as active cell the first cell of the "Cost" column, press "Data
validation" and select "Custom". In the formula box write:

Being:

E7: the cell to which we are applying the validation.

L6:L16: the range of cells in the attached table where the price of
the material is.

Obviously, this would have been done much faster using "Decimal"
validation instead of "Custom", this was just an example of how to use
custom validation with current knowledge of functions.
Lesson 5.4: Protecting a worksheet
Sometimes it may be necessary to lock all or part of the cells of a
worksheet or an entire book. This is done mainly for two reasons:
because we are going to send it to someone we don't want to change
anything or because there is a part of the sheet that seems empty, but
is really full of functions, which if modified unintentionally would
affect the behavior of our sheet.

We are going to continue with the table we are using as an example to


see how to use the protection on a specific group of cells:

First, we are going to use a very simple formula to fill in the column
"Total price". The total price is the multiplication of the cost per
square foot by the total square feet, i.e. the fourth column by the fifth
column. To enter this as a formula we select the first cell of the column
"Total price" as the active cell and type:

1. As we have already said, any function or formula begins with a "="


symbol.

2. Click with the mouse on the first cell of the column "Cost".

3. We press the key "*" (mulpiplication) of our keyboard.

4. Click with the mouse on the first cell of the column "Quantity".

In my case, the cost is in column "E" and the first row is 7, so the
formula is "=E7*F7".

We then use the autofill to apply the same formula to the whole
column; so all the "Total Price" cells multiply their unit cost by their
quantity.
At this point is when we have to think: "I've already filled in the
column with the total price, I don't want anyone else to write on it",
and that's when we use cell protection.

To know if a cell is locked we must press the right mouse button and
then "Format Cells". In the tab "Protection" there are two options to
mark:

Locked: Prevents from writing on the cell.

Hidden: the cell looks like it normally does, but nothing appears
in the formula bar. This is useful if we are going to share the book
and the cell is the result of a function or operation that we don't
want anyone to know about.

By default all the cells of a sheet are locked, so we have to select all the
cells of the sheet (clicking on the corner between column "A" and row
1), enter the format and in the protect tab uncheck the option
"Locked".
Next, we select the cells that we are going to protect, those of the
column "Total Price", we enter to the format and we mark the option
"Blocked" (and the hidden one if we want to see how it works). With
this we have marked the cells as locked, but we have not yet protected
the sheet, so you can still write in the cells as usual.

Finally, to protect the sheet we must go to the "Review" tab, group


"Changes" and click on the "Protect sheet" command. When you do
this, a window like this appears:

In this window we have to mark which actions we want to allow to be


carried out once we block the sheet (or the book). The normal thing is
to allow to select the locked and unlocked cells, nothing else, which is
the option that appears by default. We can also set a password so that
we can only unlock the sheet ourselves. Click on accept and the sheet is
locked, so we can no longer write anything in the cells we have locked.

Although we have said that by locking a sheet and setting a password,


no one without a password can unlock it, the truth is that a very
advanced user in Excel with knowledge in the use of macros can
unlock the sheet, even if they have a password, so care must also be
taken to whom Excel books are sent if they contain sensitive
information.
Lesson 5.5: Input and error messages in a cell with validation
When we apply validation to a cell other user don't have to know that
the cell has some kind of restriction, so Excel allows us to enter a
message warning of the validation when the cell is selected as an active
cell.

In addition, we can also enter messages that appear in a new window if


the user has entered erroneous values.

Both the input and error messages are entered in the same way: select
the cell, open the data validation and go to the tabs "Input message"
and "Error alert".
These types of messages are not mandatory when applying data
validation, but they are really useful not only for other users, but for
ourselves as well, since it is quite easy to forget which cells we have
applied validation to and which type of validation.

It is possible to apply an input message without error message and


vice versa, but it is convenient to always put at least one input
message.
Lesson 5.6: Type of error message: Stop, warning and information
When we entered the error message you may have noticed that on the
left there is a dropdown called "Style" with 3 options: Stop, Warning
and Information.

Stop: if an attempt is made to enter the wrong data, an error


message appears and it does not allow us to continue, having the
options of retrying to enter a new value or cancel the entry,
leaving the value that existed before.

Warning: the message that appears tells us that the data we have
entered is invalid, and asks if we are sure we want to continue. If
we click on "Yes", the value we have entered will be entered, even
if it is invalid.

Information: very similar to the previous one, the message


informs that the data are not valid, but when you click on "Accept"
you will introduce them anyway.
Lesson 5.7: Circle invalid data
Suppose I've decided to allow invalid data to be entered into my sheet,
either because I'm using a database that users themselves can update
little by little, or, why not, because someone can find a better way to do
things than I thought of. Well, how do I now quickly locate all the
invalid data that has been entered into my sheet, if any?

In the same "Data validation" command, if we click on the arrow to


display, the command "Data validation" appears, “Circle invalid data"
and "Clear validation circles". If we press on circle, the invalid data are
marked in the whole sheet with a red circle, if there is some cell with
invalid data.

In this way, we can decide whether to leave that value entered or warn
whoever entered that value that he has to change it.
Finally, to delete the circles, click on the third of the commands we
have seen: "Clear validation circles" to leave the sheet clean of circles.
Lesson 5.8: Other commands of the "Data tools" group
Text to columns: there are times when we have to use a data file, but
they give it to us in a text format, and when it is passed to Excel it
looks like this:

We know that it has the form of an Excel file, where the columns are
separated by the tab separator, but we have no way to use the file
because we only have one row of data, where all the columns form a
string separated by tabs.

To pass it to the format we need, we can use this command, which can
be found in the "Data" tab, group "Data Tools". Select all the data and
press the command. In the first screen we choose “Delimited” and
press next, in the second screen we select the type of separation, in
this case it is "Tab". We press next and in the third screen we press
finish.

The result: each piece of data is now in a column.

Flash Fill: Detects a pattern that relates several cells and continues it.
For example, if in column A you have 10 names, in column B 10
surnames and in column C1 you write the name of A1 and the surname
of B1 all followed, the quick fill will write in column C the name and
surname together with all the other rows (it is hardly used).

Remove duplicates: selecting a range of cells and pressing this


command deletes the values that are duplicated, leaving only one. If
we choose only one column, but there is data in the attached columns
asks if we also want to remove the data from the attachments or not.

Consolidate: used to group data from several data sheets into one
data sheet. It is little used as it is a static method (i.e., the results are
from the time the operation was made, if the original data changes the
results will not).
Section 6: Other Groups in the Insert and Page
Layout Tabs
In this section we are not going to deal with a specific topic that we can
divide into different classes, but we are going to see several of the
groups that we have been leaving aside in different cards in the
previous classes, mainly related to the visual aspect, but without
affecting the functionality at all, and practically without modifying any
cell.

We could divide this section in two halves:

1. Insertable visual elements on the sheet (such as images, shapes,


equations, symbols, WordArts with and without hyperlinks, etc.)

2. Forms of visualization of the sheet, as much for the facilitation of


the reading while we work with the program (freeze panels, split
view, etc.) as for its printing (headers, footers, repeat titles, etc.).
Lesson 6.1: Inserting and modifying shapes and illustrations
In the "Insert" tab you will find the "Illustrations" group, from which
you can insert as many shapes, pictures, icons, etc. as you like.

Pictures

The first command, "Pictures", is used to open images that we have in


our own computer and insert them in the sheet in which we are
working.

We can edit the size of the image with the white dots around it,
clicking on them, holding and dragging. We can also rotate the image
with the icon on top of the image.

If we want an edition of the most exact size we can press with the right
button and then in "Size and properties", and it will appear to the right
of the window a tab like the one of the image above. From this menu,
with the 4 tabs above, we can change absolutely all the properties of
the image. From left to right the tabs are:
1. Fill and line: to give background color and outline to the image.

2. Effects: from here you can apply all the effects that modify the
visual aspect of the image, such as shadows, lighting, 3D turns,
etc.

3. Size and properties: to modify the ratio of elongation in the axes,


the size, the ways in which it moves when adding or deleting rows
and columns, etc.

4. Picture: to make image and color corrections.

Online pictures

The operation is identical to that of the images, but these instead of


opening them from your own computer are opened from the Internet.

Shapes

When we click on it, a drop-down list will open showing the different
types of shapes you can introduce: lines, arrows, filled arrows,
rectangles, callouts...
When we introduce a form we have the options to modify it
completely:
As with the images, we have the white dots for the size, and the
rotation icon. In addition, yellow dots appear to modify the shape of
the arrow (use them to see what I mean), which in each shape will
appear in a different position.

As you may have noticed, when you have a form selected, a new tab
appears in the menu tabs: the "Format" tab. From it we can change the
colors, contours, thicknesses, etc. (these options are quite evident by
the name and similar to those of the images).

The interesting thing about shapes is found in the group "Insert


shapes", command " Edit points", within "Edit shape". When you click
on it, all the vertexes of the form appear, and you can modify them
completely, to appear in a totally different form. We can also add new
points by pressing the right button, with which we modify the initial
form even more..
Icons

They're like shapes, but more complex and online. When selecting one
we can convert it into a form (to edit it better) with the "Convert to
form" command of the "Change" group.
Lesson 6.2: Sparklines
Sparklines are really similar to normal charts, with the difference that
it is inserted in a single cell, filling it completely, and the peculiarity
that there are only three types of charts to insert available. These
sparklines are inserted from the "Insert" tab, group "Sparklines".

To use them you can click on one of the commands directly, or select
the group of cells, then click on the command, and when we are in the
box where we select the destination, click on the cell where we want to
insert it.
When you select a sparkline, the "Design" tab appears, which offers
several options, such as changing colors, marking different points on
the sparkline, deleting it, etc.

These types of charts are very rarely used, but they are useful on
specific occasions, where we do not want to show a detailed graph but
a simple evolution, usually not of a single set of data, but of several of
them.
Lesson 6.3: Text and Links groups
In the "Insert" tab, there are two groups which, in most cases, are
usually accompanied by one another: links and text objects.

The links are connections to another part of the document or of


another document, that when you click on it automatically opens this
document.

To insert a hyperlink we have to select a cell with some content or


select a text object and press the "Link" command. When we click it
opens a window in which we can select which document is the one we
want to link and which cell will be selected as the active cell.

From the “Text” group we can:

Introduce a text object (practically the same as a rectangular


shape), which we can then turn into a hyperlink.
Visualize, create and modify the headers and footers of the sheet
(later in this chapter we will see how to create and modify them
from another command that is simpler and more intuitive, from
this command we want to know that it is useful to visualize them).

Introduce WordArts, which are texts with predefined and eye-


catching letter formats (colours, styles...) for titles.

Add signature lines, in case we are going to send the sheet to


another person and we want them to sign it to express their
agreement, consent, etc.

Insert objects: insert a compatible file (Word, Excel, Power


Point...) created from scratch or from a file we have in our
computer.
Lesson 6.4: Symbols group
The last of the "Insert" tab groups is the "Symbols" group, which
consists of two commands:

Equation

From here we can introduce an object in the form of an equation. If we


click on the dropdown list several typical equations appear, and if we
click on the command itself we can write our own equation using
powers, fractions, integrals...

These equations are not solvable by Excel, but are only objects, such as
images or shapes.
Symbol

When we are typing text in a cell we may need to insert a special


character, such as the diameter symbol (Ø), the alpha letter (α) or any
other. This is done from the command "Symbol". Pressing opens a
window, where we choose the character we want and press "Accept",
and will be inserted in the cell where we are typing.
Lesson 6.5: Print area and display forms
Sometimes we create an Excel sheet using the sides, top or other areas
to put information that is relevant to us when working with the sheet,
but we don't want to show when printing it.

The print area is the area of the sheet that will be printed when you
use the print option (in the "File" tab). To set the printing area of a
sheet, select the group of cells you want to print and click the
command "Set print area", within the group "Page setup" in the "Page
layout" tab.) When doing so, no difference can be seen in the sheet,
but if we click on print we will see in the preview that the whole sheet
is no longer printed, but only the selection:

If we are going to modify the printing area several times, we can


change the way the sheet is displayed in the "View" tab, group
"Workbook Views":

Normal: This is the default view of Excel, the one we've been
seeing all along.

Page break preview: In this view we see the display area


surrounded by a dark blue box, and the non-printable areas with a
dark gray background color. We can directly modify the print area
by clicking the mouse on the blue border and dragging.

Page layout: displays headers and footers.


Lesson 6.6: Window options
One of the most useful options to have a clear visualization of our
sheet is the freeze panels commend. This makes part of the columns or
rows of the sheet not move when moving around the sheet with the
scroll bars. Let's look at it with an example:

On my sheet I have this table, with a lot of rows (105 rows), but on my
screen you only see 18 rows at the same time, and the total columns is
8 (A-H), but you only see 6 (A-F). If I want to see row 50 I have to use
the vertical scroll bar, and when I do I stop seeing row 1, so I don't
know what value is represented in each column. In this case, it would
be useful if the top row remained fixed, so that it would always be
seen, even if I scrolled on the sheet.

In the "View" tab, in the "Window" group, there is the "Freeze panels"
command:
Freeze Top Row: row 1 is blocked, so even if we go down on the
sheet with the scroll bar we always see the first row.

Freeze First Column: similar to the previous one, it blocks column


"A", so even if we move to the right with the scroll bar we always
see the first column.

Freeze panels: serves to freeze rows and columns at the same


time. If cell "B2" is selected as active cell, row 1 and column "A"
will be blocked, i.e. the rows and columns will be immobilized one
position lower than the active cell. This is just what we have done
in the image above, lock in cell "B2".

Let's now see the other options of this group less used, but also very
useful:

New Window: opens the same Excel file in a new window so we


can work in parallel with two sheets at the same time. In doing so,
the original file is called with the same name, but ending in ":1",
the second in ":2", and so on with all the sheets we want to open.

Arrange All: when we have used the command "New window", it


allows us to arrange all of them for an optimal visualization.

Freeze panels: blocks the rows and/or columns from moving


when moving around the sheet.

Split: divides the sheet into 4 windows, which move


independently, being able to see several parts of the document at
the same time.

Hide: Hides the Excel book, so it doesn't appear in any of the tabs
on the computer taskbar.

Unhide: if we have hidden a book, it asks us which one we want to


show again.

View Side by Side: opens two different books in parallel so you


can view them simultaneously more comfortably.

Synchronous Scrolling: if we have two books side by side, when


moving one of the sheets the other one does it at the same time.

Reset Window Position: if we have increased the size of one of the


parallel windows (and therefore reduced the other), with this
button we return to the original sizes.

Switch Windows: to move through the different Excel books we


have open. It's like changing tabs on the computer taskbar.
Lesson 6.7: Page layout tab, print titles
In one of the previous classes of this section we have seen how from
the group "Text" we could visualize, create and modify headers and
footers, but we have left it to see it with a much simpler command.
This is the "Print titles" command from the "Page setup" group in the
"Page layout" tab.

If we click "Customize header" (or footer) we get a window like this:


From here we have all the possibilities to create a header or footer,
such as inserting the date, the number of pages, the name of the
document, and so on. We can also insert images, change the
formatting of texts or anything else we could do in a normal cell on the
sheet.

Once we have created the header and footer we don't see it on our
sheet until we print it or switch to "Page Layout" mode of the "View"
tab, from which we could modify both elements.

As you may have noticed when you clicked the "Print titles" command,
a sheet with 4 tabs opens:

Page: to modify print characteristics such as zoom, sheet


orientation, paper size, quality, etc.

Margins: the lateral separations that the content will have in


relation to the limit of the sheet when printing.

Header/Footer: to create or modify these aspects.

Sheet: from here you can set the printing area, have a series of
rows repeated on each of the printed sheets, and other aspects of
the sheet related to printing.
Section 7: Working with functions
In some of the previous chapters we have started working with the
formula bar by introducing simple mathematical formulas, such as
sums and multiplications, of numbers and other cells. Also in section 3
we came to use directly some functions related to tables, such as
"SUM", "SUMIF", "SUBTOTAL" and other mathematical and
statistical functions.

In this section we are going to use functions from all groups and we
are going to use the "$" symbol so that we don't have to write the same
function multiple times.

Before we start, let's remember what a function is and what elements


it is made of:

A function is a predefined formula in Excel that performs specific


calculations based on parameters in a specific order entered by the
user. It consists of 3 key parts:

The "=" symbol, which is always placed at the beginning of all


functions and formulas.

The name of the function (e.g. "SUM", "MAX" or "IF").

The parameters of the function. Each function requires specific


parameters in a specific order. The program itself shows the
necessary parameters of the function so that you don't have to
learn anything by heart.

To see all the functions in Excel we can click on the icon "fx" next to
the formula bar. The formulas are grouped according to their category,
to be able to search them more easily in case of not being sure which
function we need to use.
When you select a function, a window opens where all the information
to use it correctly is shown:

1. Name of the function

2. Description of the function

3. Parameters of the function

4. Description of the selected parameter

5. Result of the function


Lesson 7.1: Use of the $ symbol in the formula bar
Working with Excel it is common to leave in a single cell a value that
will then multiply a large number of cells. For example, if we are
working with a table in euros and we want to move it to pounds, the
normal thing would be to put in a cell the euro-pound exchange rate,
and then multiply all the cells that have some value in euros by the cell
that contains the exchange rate.

Obviously, we are not going to write ourselves in each cell: "=C7*F7",


"=C7*F8", "=C7*F9" ..., the logical option would be to use the autofill,
that introducing the formula in the first row and then dragging down,
appears in all the cells the same formula. But if we do this the result
will not be the one we want, but the multiplications will be like this:
* Each point is a multiplying factor, and the arrow is the result.

The problem, as we saw in classes 1.6 and 1.7 (Clipboard and autofill
groups), is that when you drag one cell that refers to another, the
reference moves as many cells as the original cell, so the formula in the
cell "G8" is "=C8*F8", when we wanted it to be "=C7*F8".

To avoid that the references of the cells with functions move when
dragging the cell with the autofill we have to indicate in the function
which is the cell we want to "block", and this is done using the “$”
symbol. If in the formula of the first cell of the price in pounds (G7) we
introduce the formula in this way "=$C$7*F7", being C7 the cell where
the €-£ change is, and we drag again, this time all the operations will
be as we want: multiply the cell of its left by the value of the €-£
exchange.
What we just did with the "$" symbol was to "lock" the row and
column of cell C7, so when you copy that cell elsewhere, the reference
to cell C7 remains constant, instead of moving as many rows and
columns as there is a difference between the target cell and the source
cell.

The most usual and advisable thing is to write the formula for a single
cell and without blocking anything, that is to say, without including
the symbol "$" in any cell. Once we have verified that the formula or
function returns the expected result we will lock the necessary cells. To
do this, even simpler than typing the "$" in front of the row and
column, is to position the cursor in the formula bar in the name of the
cell we are going to lock and press the "F4" button on the keyboard.
With this the "$" will automatically appear in front of the row and
column. Pressing "F4" again blocks only the row ("$" in front of 7),
pressing it once again blocks the column ("$" in front of the "C"), and
pressing it again removes the "$" symbols.

Track precedents

A very useful tool for viewing graphically the cells referred to by a


function is to select the cell with functions as the active cell and press
the "Track precedents" command in the "Formula auditing" group of
the "Formulas" tab. What it does is show arrows and dots in the cells
on which the result of our function depends, as you could see in the
last two example images.

Clicking "Track Dependents" does something similar, but the cells that
are marked are those that depend on the result of the cell itself.
Lesson 7.2: Using the $ accurately
Let's make a table with the multiplication tables from 1 to 10 to see
how the symbol "$" is used much more precisely than always putting
"$" in front of the row and column. The table we want to fill in is like
this one, where the white boxes multiply the blue factor in the left
column by the blue factor in the top row:

Let's start by making two smaller tables.

If "Factor" is in cell "A1", then the first blank cell will be "=A2*B1"
(remember that first we write the function and then we will lock). Let's
see what happens if we don't put any "$" symbol:

Each cell multiplies the value of the cell above it by the value of the cell
to its left, so the growth is exponential.

We're going to completely block cell "A2": "=$A$2*B1" and use


autofill.
The result is now what we wanted.

The second table we are going to calculate is this one, where as before
cell "B2" will be "=A2*B1", and what we have to block completely this
time is the reference to cell "B1", leaving the formula like this:
"=A2*$B$1", and we use autofill.

Now we are in a problem, since in the first table the cell "B2" was
"=$A$2*B1", while in the second it was "=A2*$B$1". This is how we
realize that we are blocking rows and columns without really having to
do it:

In the first of the tables it is enough to block column "A" of cell


"A2", leaving the formula "=$A2*B1", and the result being exactly
the same.

In the second table it is enough to block row 1 of cell "B1", leaving


the formula "=A2*B$1".

Ahora vemos que si podemos combinar la fórmula de ambas tablas:


“=$A2*B$1”.

This way, if we use autofill to the right, the reference will still be to cell
"A2", because we have blocked the column, while the reference to the
upper cell will be changing, because we have not blocked the column
of "B1".

If we use autofill downwards, the reference will still be to cell "B1",


because we have blocked the row, while the reference to the left cell
will be changed, because we have not blocked the row of "A2".

The formulas written below the table are those of the last row, while
the formulas to the right of the table are those of the last column, and
three checks of formula precedents have been added to easily see that
the result is the one we wanted.
Lesson 7.3: Name manager
We have seen how to leave in a single place of the sheet a value that we
are going to use multiple times in the same sheet. However, what
happens if we want to use that value on multiple sheets?

In principle, the easy answer is: exactly the same way. If we are on the
sheet "Sheet2", and we want to refer in a formula to cell "A1" on sheet
"Sheet1" we can start writing the formula normally and just as we
would select the cell on the sheet itself, we change sheets and click on
the cell. The formula will then look like: "=A1*Sheet1!A1".

We can add to this formula the symbols "$" where it corresponds, but
this solution is only feasible if we do not have to refer too many times
to data from other sheets. The optimal solution to this is to use the
"Name Manager".

As we said in the first chapter of the book, the name of a cell, by


default, is the intersection between its column and its row, and we can
quickly see it in the name box, a box above column "A". We can change
this name in two ways: by typing directly on the name box, or from the
"Define Name" command of the "Defined Names" group in the
"Formulas" tab.

When we refer to a cell we have to type its name ("=A1*10"), although


normally we don't type it because it's easier to click on the cell when
we type the formula. However, if we had renamed a cell with a
meaningful name, it would be much easier to remember that name.

Let's fill in a table like this using the name manager:


We select the exchange rate cell (A2) and enter the "Define name"
command, where we type the following:

We could also have changed the name in the name box, but then we
couldn't comment on the value.

In the first cell to fill (B5) we begin to write the formula, and when we
are going to write the name of the dollar-euro exchange, it appears as
the first option, with the comment that we have introduced in the
previous window.
We finish typing the name or press tabulator to finish entering
automatically. Then we use the autofill to apply the formula to the rest
of the cells, and since the value "E.USD" is not a formula, but a name,
we don't need to use the "$".

What we have done now is a very simple example, and it would not
have been really necessary to use the name manager, but imagine a
book with many pages, in which one of all those pages is dedicated
only to keep these constant values. It would be tremendously difficult
to have to be all the time changing sheets to select the value we want to
choose, and it is in this type of cases where it is really useful the name
manager.
Lesson 7.4: Use of Lookup & Reference functions
Of all the lookup and reference functions we are going to see 4 (ROW,
COLUMN, INDEX and VLOOKUP), and we are going to focus on the
last of them (VLOOKUP).

ROW

It returns the row number of the referenced cell. It is not usually used
alone, but in conjunction with other functions. The only input
parameter is the reference to a cell.

COLUMN

Returns the column of the cell referenced as a number (instead of its


letter). Like ROW, it is not usually used alone, but in conjunction with
other functions. The only input parameter is the reference to a cell.

INDEX

Returns the value in the cell where the row and column specified as
input parameters intersect. It has 3 input parameters: the matrix
(range of cells to search, usually the entire sheet), the row number,
and the column number (it's a number, not a letter).

VLOOKUP

The most important of all lookup and reference functions. Providing a


value to look for and a matrix (range of cells) in which to look for it,
once it locates it it returns us the value in the same row as many
columns to the right as we specify. Let's see it with an example:
Do you remember this table we used in the data validation section? At
that time, we had to introduce a limitation to the description so that it
was not too long, although in the attached table we already had what
the description was, and the same thing happened with the cost.
However, we could easily solve this by using the VLOOKUP function in
the description column and in the cost column.

We begin with the description column thinking before what we want to


look for, where we are going to look for it and what result we want:

We want to look for the material in the array formed by the attached
table, and once found return us the text that is in the same row and in
the second column (the first column is the one that contains the own
searched value). We are going to open the arguments of the function
and introduce the parameters as we have just said:
Lookup_value: the cell with the material reference 111586.

Table array: the attached table in its entirety.

Col_index_num: the column we want is the description of the


material, so it is column 2.

Range_lookup: asks if we want to find the exact match of the


value we are looking for or if an approximate match is useful. In
general, it always says "FALSE" or what is the same: 0.

When we accept the function in the formula bar, it looks like this: "
=VLOOKUP(C7;$K$6:$M$16;2;0)", and in the table we have the
result we expected.

You may have noticed that I didn't write the table as "J5:L16", but as
"$J$5:$L$16". This is because if I drag the cell of the function using
the autofill I don't want the reference to the table to move as well, but
the reference to the table has to be always the same. Most of the time,
the "Table_array" must be locked with "$", but it's always better to
think about it first.

To look for the price and add it to the table you will have to do exactly
the same, with the difference that this time "Col_index_number" will
be 3, since we are looking for the same reference, but the result we
want is in the third column of the attached table.
Lesson 7.5: Use of logical functions
Logic functions are those that evaluate a condition and return one
value or another depending on whether the condition is true or false.
Let's see the 5 most important and used logic functions (AND, OR, IF,
IFS and IFERROR).

AND

Checks if all the arguments entered are true, and if so, the function
returns the value "TRUE". If only one of the arguments is false it will
return the value "FALSE". Arguments are any condition that can be
evaluated as true or false, such as "8*3=24", "A1*7>50", "B2=Boston"
...

OR

Checks if any of the arguments entered is true, and if so, the function
returns the value "TRUE". If none of the arguments in the function is
true, it will return the value "FALSE". As before, arguments must be
evaluable as true or false.

IF

Checks if the entered condition is met, and if the condition is true it


returns a value entered as an argument, and if it is false it returns a
different value (also entered as an argument).
Logical_test: must be a condition evaluable as true or false.

Value_if_true: it is the result that the function will display if the


condition entered is true. It can be a reference to another cell, a
text, a function (we'll see it in the lesson of nested functions), etc.

Value_if_false: it is the result that the function will show if the


entered condition is false. It can be a reference to another cell, a
text, a function, etc.

IFS

Checks whether one or more conditions are met, and returns the value
entered when the first true condition is detected. It is very similar to
the "IF" function, but since there are several conditions, each with a
result if met, care must be taken when entering the conditions, as the
result will be the first condition detected as true.
With this formula I want to check whether a certain task has been
done and whether it has been done on time.

1. The first condition assesses whether the actual end date is less
than the deadline, and then the result would be "On time.

2. The second condition assesses whether the task has been


performed, and the result would be "Delayed".

3. The third condition evaluates if the task has not been performed,
and the result would be "Unfulfilled" (in the screenshot is not
seen because it does not fit on the screen)

IFERROR

This function requires two parameters: an expression (a function, a


formula, a reference...) and a value to show in case the previous
expression returns an error.
The expression in this example is division 1/0, which is a
mathematical impossibility, i.e. Excel returns an error. To avoid that
an error appears in our cell we put as "Value_if_error" the text
"Mathematical impossibility", so that the cell will show "Mathematical
impossibility".
Lesson 7.6: Nested functions
Function nesting consists of using functions as input parameters of
other functions, that is, using functions, within functions, within
functions...

Example (continuing with the table of tasks from the previous class):

If the first task (buy) and the second task (assemble) are completed,
show as a result the number of phase that make up these tasks (1st
stage) followed by the word "completed", if not show "Unfulfilled".

When dealing with nested functions we must think in advance what we


want to do, what functions we are going to need and in what order we
have to use them in the formula bar. In this case the functions we have
to use, in the order we have described, are: "IF”, “AND", "CONCAT".

The first of the functions that we will use is the "IF". In the first
argument (the condition) we will use the function "AND", to check that
both boxes are marked with the X. The second argument, if the
condition is evaluated as true, we want to concatenate (function
"CONCAT") "1st stage" (in cell "E2") and "completed". The third
argument, if the condition is false, will show "Unfulfilled".

While we are beginning to work with nested functions, it is best to


write on paper the pseudo-function derived from the function we want
to perform. A pseudo-function is a function not understandable by the
program, but seeks to be easily understood by a human, assuming the
middle ground between the idea we have of our function and the
function understandable by Excel. In this case our pseudo-function
could be something like this:

IF((“Buy”=”X” AND “Assemble”=”X”) → If_true → CONCAT(“1ª


stage” + “completed”)

→ Si_false → “Unfulfilled”

The more functions we need to nest the greater is the need to make
this decomposition into pseudo-functions, and if we break it down so
much that it is still difficult to compose the function understandable
by Excel nothing happens, we do an intermediate step, two or as many
as necessary.

In this case it is not difficult to compose the whole function from this
pseudo-function, and the result is like this:
Lesson 7.7: Use of math & trig functions
The most important and used mathematical functions are those we
have already seen in the section on data tables:

SUM: totals the selected range of cells.

SUMIF: Selecting a range of cells, evaluates whether a certain


condition is met, and adds up all the cells for which the condition
is true.

SUBTOTAL: this function must be applied to tables with filters,


otherwise it will act exactly the same as the SUM function or the
function code we are using. In the first of the parameters it is
necessary to indicate which operation we want to carry out (sum,
average, maximum...), and in the second parameter we indicate
the range of cells on which to carry out the operation. However,
when filters are applied to the selected range of cells, it performs
the operation defined only on the cells that have not been hidden.

The rest of the mathematical and trigonometric functions are less


used. Some of the most important are:

ABS: calculates the absolute value of the entered value.

RAND and RANDBETWEEN: generates a random number


between 0 and 1 or between the values defined respectively. The
number changes each time the sheet is recalculated, which can be
forced by pressing "F9".

..: several functions starting with this name, to round a number to


the nearest according to the specified values. None of the
functions is too complicated, and it is useless to remember them
all. Simply, when you need some function related to mathematics
you look for it, if not within the category of mathematical
functions in Excel's help by pressing "F1".
In the "Edit" group of the "Home" tab, there is a command called
"AutoSum". This is a very quick way to calculate the summation of an
entire table without having to type the function, simply select as the
active cell the cell just below the range of cells you want to add and
press the command. Excel detects how far the cell values are number
and performs the "SUM" function for all of them. If we want to add a
row we can do the same by positioning ourselves in the cell just to the
right of the last number in the row.

Pressing the drop-down arrow next to "AutoSum" we can see that we


can perform more functions than the sum.
Lesson 7.8: Use of text functions
Text functions are used for two reasons:

Modify a cell that contains text, to adapt it to a more pleasant


visual format.

Get information about the text contained in a cell.

Within the modification functions the most important and used are
these:

UPPER: converts all text to capital letters.

LOWER: converts all text to lowercase letters.

PROPER: converts the text, leaving the first letter of each word
capitalized, and the rest in lower case.

TRIM: eliminates extra spaces between words, if there is more


than one. This is useful if we have imported data from a file not
generated with Excel, and when importing it the data appears in a
strange format.

CONCAT: merges the contents of the selected cells into a


continuous text string. We can write a space between quotation
marks (" ") so that the words are not altogether.

REPLACE: changes the character or text string at the position


indicated by the character or text string entered as an argument.

Within the information functions the most important and used are
these:

LEFT: returns the number of characters specified to the left of a


text string, that is, the first characters of the text. RIGHT does the
same thing but with the last characters.
FIND: returns the position number where a character or text
string is found within another text string, if any.

MID: returns the number of characters specified at a specified


position within a text string.

LEN: returns the number of characters that a text string is


composed of.
Lesson 7.9: Use of date and time functions
The date and time functions are used to enter date data (year, month,
day...) and time not manually and therefore statically (if we want the
date to change we have to change it by hand), but through a function
and therefore dynamic (the data is recalculated from the time of the
computer).

The most important functions are:

NOW: returns the current date and time.

TODAY: returns the current date.

YEAR: returns the year we're in.

MONTH: returns the month in which we are, in number format (1


for January, 2 for February...)

DAY: returns the day of the month we’re in.

HOUR: returns the current time, only a number from 0 to 23.

WEEKNUM: returns the week of the year in which we are in the


form of a number.

DATE: returns the number representing a date.

WEEKDAY: returns the day of the week in which we are in the


form of a number.

NETWORKDAYS: calculates how many workdays there are


between two dates.

WORKDAY: by entering a start date and a number of days to add,


calculate what the end day is, adding only the working days.
DAYS: calculates the days between two dates.
Lesson 7.10: Use of information functions
The information functions, as their name suggests, provide
information about the cell, specifically about its contents.

The most important and used functions are:

CELL: returns the required information of a cell (entered as a


parameter), such as its width, color, formatting, etc.

ISEVEN: checks if the number in a cell is even and returns true or


false.

ISODD: checks if the number in a cell is odd and returns true or


false.

ESBLANK: checks if a cell has content or is empty and returns


true or false.

ISERR / ISERROR: checks if the result of a cell is an error and


returns true or false.

ISFORMULA: checks if a cell is a formula and returns true or


false.

ISNUMBER: checks if a value is a number and returns true or


false.

ISTEXT: checks if a value is a text and returns true or false.

Primarily, these functions are used nested within a conditional IF


function. For example, if a cell is blank or is a text, type "0", if not
leave it as it is.
Section 8: Pivot Tables and Charts
Surely after going through all the previous sections you know the
difference between a static value and a dynamic value: static values are
those that are entered manually, and only change if the user
intentionally replaces them, while dynamic values are those that are
recalculated each time Excel recalculates the formulas in the sheet. For
example, if we write the current date and introduce it by hand
(25/03/2019) it is a static value, while if we use the function
"=TODAY()" it will be recalculated every time we perform an action, so
it will change every time we open the book, modify it, print it ...

We can therefore get an idea of what pivot tables and pivot charts will
be before we even introduce them: they are elements whose
component values do not need to be completely modified by hand each
time we want to remake them, but they will adapt to our needs in a
much faster way.

Pivot tables offer the possibility of selecting, from a table with


many more data, only those that interest us to make a simpler
table, grouping repeated values, and redoing it completely with
just a few clicks.

Pivot charts are those charts that represent a pivot table, allowing
the same filters to be applied to the table.
Lesson 8.1: Convert a table into a pivot table
Suppose you have a table like the one in the image, in which you have
the raw data of the sales units of each type of car in 3 different
countries and in the 4 quarters of the year (the table is actually bigger,
this is just a clipping).

You want to make a table consolidating all these data, so that it can be
understood in a more visual way, since anyone who sees this table
does not understand anything because of the large amount of
unstacked data, but you are not even sure how you want to do it, in
addition to having to use many formulas of "SUMIF", "COUNTIF", etc.
and if in the end the table is not to your liking you have to remake it
whole.

With a table like this, in all cases, whether you know exactly what you
want to do or you're not sure what you want, it's best to create a
dynamic table from this table. To do this, just select a cell in the table
and use the command "Pivot table" from the "Tables" group in the
"Insert" tab.

When pressing, a window appears asking us to select the range of the


table (most of the times it detects it automatically), and to choose if we
want to put the new pivot table in a new sheet or in an existing one (it
is recommended to use a new sheet).
We click OK and a box appears on the sheet with the title
"PivotTableX", being "X" the number of dynamic tables that we have
created and automatically displays to the right of the screen the menu
"PivotTable Fields".
The menu on the right lists all the titles of the columns we had in the
previous table, and underneath there are 4 fields called "Filters",
"Columns", "Rows" and "Values". To create the pivot table we just
have to click on one of the elements of the list above and drag it to one
of the fields below.

Rows: when dragging an item here, all values not repeated under
this title in the original table will appear as rows. If we put
"Country" in "Rows", the table begins to form as in the image
below, and if we add a second field below its values appear under
each of the names of the first element. If we put "Quarter" under
"Country" the table would take the form of the image on the right:
Columns: when dragging an item here, all values not repeated
under this heading in the original table will appear as columns.
For the columns we are going to use the element "Car body",
dragging it to this field.

Values: the element dragged here will be the one shown at the
intersections of the rows and columns, adding if the values are
repeated.
By filling in these 3 fields the table can be considered as finished,
although there is a fourth field that is also useful: the filter. It works
like any of the filters we've used so far, we select the data we want to
show and the table automatically hides all the others.
Lesson 8.2: Design of a pivot table
When we create a pivot table it appears with a default format, but like
any other table, we can change its format completely through the
groups to modify the format of the "Home" tab (" Font", Alignment"
...), or, if we have selected at least one cell of that table, we can open
the "Design" tab and use one of the predefined designs.

From this same tab we can use the commands of the "PivotTable style
options" group to slightly modify the display (the action performed by
each command is explained by reading its name), but more
importantly, we can use the commands of the "Design" group to
modify the way the table is structured:

Subtotals: if we have added more than one element to each field,


as in our case, that in the rows we have "Country" and "Quarter",
we can choose where we want the subtotals of each country to be
displayed.

Grand Totals: to choose whether to display totals for all rows,


columns, both, or neither.
Report layout: to change the way the table is displayed, moving
rows or columns to leave more or less space for titles, repeated
elements, etc. Personally, the one I've used and seen used the
most is "Show in outline form", which shows the titles of rows and
columns in a much clearer way.

Blank Rows: to enter blank rows after each set of values, to


separate them and visually better identify which value
corresponds to each element.
Lesson 8.3: Subsequent modifications to the table
You may have already been checking the functioning of a pivot table,
and you may have seen that, by changing the values of the original
table, the pivot table does not change as we said it should do because it
is pivot table. This happens because, just as for the formulas to change
you have to recalculate the book, for the table to change you also have
to recalculate it, although this has to be done by hand.

To update the table (recalculate it), use the "Refresh" command of the
"Data" group in the "Analyze" tab. This does not require anything else,
you do not have to select the data again, refill the fields of rows and
columns ... Just press the button, wait for Excel to recalculate and it is
done.

In the "Show" group of the same card, we can use these 3 commands
to show or hide these fields. To find out what each one is used for, it's
best to try them and see what changes on the sheet.
The last of the changes after the table was created affects the totals in
the table. If we click on the element that we have put in the "Values"
field, a menu is displayed, in which we can move this field element,
and there is also the option "Configuration of value field". From here
we can modify the function that is made on the totals, which by default
is a sum.

This affects both totals and subtotals, so if we want to put one function
in totals and another in subtotals, we have to do it by hand.

If you've noticed, pivot tables don't use all the data in the table and
hide the ones they don't need like filters, but only use the necessary
data. This means that we can copy and paste the table to modify it to
our liking, adding functions, removing values, inserting rows and
additional columns...
Lesson 8.4: Pivot charts
The pivot charts are exactly the same in their creation as the normal
charts, with the difference that they have filter buttons to be able to
modify the data shown from the chart itself.

To introduce a pivot chart from a pivot table we use the "PivotChart"


command of the "Tools" group in the "Analyze" tab, as long as we have
at least one cell of the selected pivot table.

Clicking opens the same insert charts menu as for normal charts, with
the difference that some of the chart types cannot be used for pivot
charts.

If we create a 100% stacked column pivot chart from the table above it
looks like this:
We can see how the horizontal axis has broken down all the quarters
for each country automatically, and that in several places in the table
we have filter buttons to select the values we want to show. When the
filters are applied they will also be applied to the table, so modifying
the graph means modifying the table, and vice versa.

You might also like