Download as pdf or txt
Download as pdf or txt
You are on page 1of 73

Basic and Intermediate Computer

Basic and Intermediate Computer Application Training Manual

Application Microsoft Excel


Learners’ Material

Compiled By
Addis Ababa City Administration
Innovation and Technology
Development Bureau

March, 2023
Addis Ababa
CONTENTS

Overview of formulas in Excel ............................................................................................................... 3


Create a formula that refers to values in other cells ............................................................................ 3
See a formula ....................................................................................................................................... 3
Enter a formula that contains a built-in function ................................................................................. 4
Formulas in-depth ............................................................................................................................... 4
The parts of an Excel formula ............................................................................................................. 4
Using constants in Excel formulas ...................................................................................................... 4
Using references in Excel formulas..................................................................................................... 5
Look up values with VLOOKUP, INDEX, or MATCH........................................................................ 10
Using INDEX and MATCH instead of VLOOKUP ............................................................................. 11
Give it a try........................................................................................................................................ 12
VLOOKUP Example at work ............................................................................................................ 12
HLOOKUP Example ............................................................................................................................ 13
INDEX and MATCH Examples............................................................................................................ 14
Learn more about SUM ........................................................................................................................ 16
Quick Sum with the Status Bar ......................................................................................................... 16
Using the AutoSum Wizard ............................................................................................................... 17
Using SUM with non-contiguous cells ............................................................................................. 18
Using SUM with other functions....................................................................................................... 19
Using SUM across multiple worksheets............................................................................................ 20
Use SUM and other functions to add, subtract, multiply and divide with Excel .............................. 21
Other Examples ................................................................................................................................. 23
SUMIF function .................................................................................................................................... 24
Examples ........................................................................................................................................... 25
Example 1 ...................................................................................................................................... 25
Example 2 ...................................................................................................................................... 26
COUNTIF function ............................................................................................................................... 27
Syntax ................................................................................................................................................ 27
Examples ........................................................................................................................................... 28
Common Problems ............................................................................................................................ 29
Best practices..................................................................................................................................... 30
Create a PivotTable to analyze worksheet data ..................................................................................... 32
Create a PivotTable in Excel for Windows........................................................................................ 32
PivotTables from other sources ......................................................................................................... 33
Building out your PivotTable ............................................................................................................ 34
Refreshing PivotTables...................................................................................................................... 35
Working with PivotTable Values ....................................................................................................... 36
Use the Field List to arrange fields in a PivotTable .............................................................................. 38
Use the Field List .............................................................................................................................. 38
Add, rearrange, and delete fields in the Field List ............................................................................ 40
Sort data in a PivotTable or PivotChart................................................................................................. 43
Before you sort .................................................................................................................................. 43
Sort row or column labels ................................................................................................................. 44
Sort on a column that doesn't have an arrow button .......................................................................... 45
Set custom sort options...................................................................................................................... 46
Group or ungroup data in a PivotTable ................................................................................................. 49
Group data ......................................................................................................................................... 49
Group selected items...................................................................................................................... 49
Group by date and time.................................................................................................................. 49
Name a group................................................................................................................................. 50
Ungroup grouped data ................................................................................................................... 50
Filter data in a PivotTable ..................................................................................................................... 50
Filter data in a PivotTable with a slicer ............................................................................................. 50
Filter data manually ........................................................................................................................... 51
Show the top or bottom 10 items....................................................................................................... 52
Use a report filter to filter items ........................................................................................................ 54
Filter by selection to display or hide selected items only .................................................................. 55
Turn filtering options on or off .......................................................................................................... 55
Create a PivotChart ............................................................................................................................... 56
Create a PivotChart ........................................................................................................................... 56
Create a chart from a PivotTable ....................................................................................................... 56
Create a chart from start to finish.......................................................................................................... 57
Create a chart ..................................................................................................................................... 57
Add a trendline .............................................................................................................................. 57
Add or remove titles in a chart .............................................................................................................. 57
Add a chart title ................................................................................................................................. 58
Remove a chart title........................................................................................................................... 58
Show or hide a chart legend or data table ............................................................................................. 58
Show a chart legend .......................................................................................................................... 58
Hide a chart legend ............................................................................................................................ 58
Show or hide a data table .................................................................................................................. 58
Add or remove a secondary axis in a chart in Excel ............................................................................. 59
Add or remove a secondary axis in a chart in Office 2010 ............................................................... 59
Add a trend or moving average line to a chart ...................................................................................... 60
Add a trendline .................................................................................................................................. 60
Format a trendline ............................................................................................................................. 60
Add a moving average line................................................................................................................ 61
Instant charts using Quick Analysis ...................................................................................................... 61
Protection and security in Excel............................................................................................................ 63
Which level of protection should I use? ............................................................................................ 64
Protect a worksheet ............................................................................................................................... 65
Choose what cell elements to lock .................................................................................................... 66
Enable worksheet protection ............................................................................................................. 66
Given below are the steps to protect your sheet. ........................................................................... 67
How can I tell if a sheet is protected? ............................................................................................... 70
Unprotect an Excel worksheet ........................................................................................................... 70
Protect an Excel file .............................................................................................................................. 70
OVERVIEW OF FORMULAS IN EXCEL

Get started on how to create formulas and use built-in functions to perform calculations and
solve problems.

CREATE A FORMULA THAT REFERS TO VALUES IN OTHER CELLS

1. Select a cell.
2. Type the equal sign =.

Note: Formulas in Excel always begin with the equal sign.

3. Select a cell or type its address in the selected cell.

4. Enter an operator. For example, – for subtraction.


5. Select the next cell, or type its address in the selected cell.

6. Press Enter. The result of the calculation appears in the cell with the formula.

SEE A FORMULA

When a formula is entered into a cell, it also appears in the Formula bar.

 To see a formula in the formula bar, select a cell.

Addis Ababa City Administration Innovation and Technology Development Bureau 3


ENTER A FORMULA THAT CONTAINS A BUILT-IN FUNCTION

1. Select an empty cell.


2. Type an equal sign = and then type a function. For example, =SUM for getting
the total sales.
3. Type an opening parenthesis (.
4. Select the range of cells, and then type a closing parenthesis).

5. Press Enter to get the result.

FORMULAS IN-DEPTH

You can browse through the individual sections below to learn more about specific formula
elements.

THE PARTS OF AN EXCEL FORMULA

A formula can also contain any or all of the following: functions, references, operators,
and constants.

Parts of a formula

1. Functions: The PI() function returns the value of pi: 3.142...

2. References: A2 returns the value in cell A2.

3. Constants: Numbers or text values entered directly into a formula, such as 2.

4. Operators: The ^ (caret) operator raises a number to a power, and the * (asterisk) operator
multiplies numbers.

USING CONSTANTS IN EXCEL FORMULAS

A constant is a value that is not calculated; it always stays the same. For example, the date
10/9/2008, the number 210, and the text "Quarterly Earnings" are all constants. An expression

Addis Ababa City Administration Innovation and Technology Development Bureau 4


or a value resulting from an expression is not a constant. If you use constants in a formula
instead of references to cells (for example, =30+70+110), the result changes only if you modify
the formula. In general, it's best to place constants in individual cells where they can be easily
changed if needed, then reference those cells in formulas.

USING REFERENCES IN EXCEL FORMULAS

A reference identifies a cell or a range of cells on a worksheet, and tells Excel where to look
for the values or data you want to use in a formula. You can use references to use data contained
in different parts of a worksheet in one formula or use the value from one cell in several
formulas. You can also refer to cells on other sheets in the same workbook, and to other
workbooks. References to cells in other workbooks are called links or external references.

 The A1 reference style

By default, Excel uses the A1 reference style, which refers to columns with letters
(A through XFD, for a total of 16,384 columns) and refers to rows with numbers
(1 through 1,048,576). These letters and numbers are called row and column
headings. To refer to a cell, enter the column letter followed by the row number.
For example, B2 refers to the cell at the intersection of column B and row 2.

To refer to Use

The cell in column A and row 10 A10

The range of cells in column A and rows 10 through 20 A10:A20

The range of cells in row 15 and columns B through E B15:E15

All cells in row 5 5:5

All cells in rows 5 through 10 5:10

All cells in column H H:H

All cells in columns H through J H:J

Addis Ababa City Administration Innovation and Technology Development Bureau 5


To refer to Use

The range of cells in columns A through E and rows 10 through 20 A10:E20

 Making a reference to a cell or a range of cells on another worksheet in the


same workbook

In the following example, the AVERAGE function calculates the average value for the range
B1:B10 on the worksheet named Marketing in the same workbook.

1. Refers to the worksheet named Marketing

2. Refers to the range of cells from B1 to B10

3. The exclamation point (!) separates the worksheet reference from the cell range reference

Note: If the referenced worksheet has spaces or numbers in it, you need to add apostrophes
(') before and after the worksheet name, like ='123'!A1 or ='January Revenue'!A1.

 The difference between absolute, relative and mixed references

a. Relative references A relative cell reference in a formula, such as A1,


is based on the relative position of the cell that contains the formula and
the cell the reference refers to. If the position of the cell that contains the
formula changes, the reference is changed. If you copy or fill the formula
across rows or down columns, the reference automatically adjusts. By
default, new formulas use relative references. For example, if you copy
or fill a relative reference in cell B2 to cell B3, it automatically adjusts
from =A1 to =A2.

Copied formula with relative reference

Addis Ababa City Administration Innovation and Technology Development Bureau 6


b. Absolute references An absolute cell reference in a formula, such as
$A$1, always refer to a cell in a specific location. If the position of the
cell that contains the formula changes, the absolute reference remains
the same. If you copy or fill the formula across rows or down columns,
the absolute reference does not adjust. By default, new formulas use
relative references, so you may need to switch them to absolute
references. For example, if you copy or fill an absolute reference in cell
B2 to cell B3, it stays the same in both cells: =$A$1.

Copied formula with absolute reference

c. Mixed references A mixed reference has either an absolute column


and relative row, or absolute row and relative column. An absolute
column reference takes the form $A1, $B1, and so on. An absolute row
reference takes the form A$1, B$1, and so on. If the position of the cell
that contains the formula changes, the relative reference is changed, and
the absolute reference does not change. If you copy or fill the formula
across rows or down columns, the relative reference automatically
adjusts, and the absolute reference does not adjust. For example, if you
copy or fill a mixed reference from cell A2 to B3, it adjusts from =A$1
to =B$1.

Copied formula with mixed reference

 The 3-D reference style

Conveniently referencing multiple worksheets If you want to analyze data in


the same cell or range of cells on multiple worksheets within a workbook, use a 3-
D reference. A 3-D reference includes the cell or range reference, preceded by a

Addis Ababa City Administration Innovation and Technology Development Bureau 7


range of worksheet names. Excel uses any worksheets stored between the starting
and ending names of the reference. For example, =SUM(Sheet2:Sheet13!B5) adds
all the values contained in cell B5 on all the worksheets between and including
Sheet 2 and Sheet 13.

 You can use 3-D references to refer to cells on other sheets, to define
names, and to create formulas by using the following functions: SUM,
AVERAGE, AVERAGEA, COUNT, COUNTA, MAX, MAXA, MIN,
MINA, PRODUCT, STDEV.P, STDEV.S, STDEVA, STDEVPA, VAR.P,
VAR.S, VARA, and VARPA.

 3-D references cannot be used in array formulas.

 3-D references cannot be used with the intersection operator (a single


space) or in formulas that use implicit intersection.

What occurs when you move, copy, insert, or delete worksheets The
following examples explain what happens when you move, copy, insert, or delete
worksheets that are included in a 3-D reference. The examples use the formula
=SUM(Sheet2:Sheet6!A2:A5) to add cells A2 through A5 on worksheets 2
through 6.

 Insert or copy If you insert or copy sheets between Sheet2 and Sheet6
(the endpoints in this example), Excel includes all values in cells A2
through A5 from the added sheets in the calculations.

 Delete If you delete sheets between Sheet2 and Sheet6, Excel removes
their values from the calculation.

 Move If you move sheets from between Sheet2 and Sheet6 to a location
outside the referenced sheet range, Excel removes their values from the
calculation.

 Move an endpoint If you move Sheet2 or Sheet6 to another location in


the same workbook, Excel adjusts the calculation to accommodate the new
range of sheets between them.

Addis Ababa City Administration Innovation and Technology Development Bureau 8


 Delete an endpoint If you delete Sheet2 or Sheet6, Excel adjusts the
calculation to accommodate the range of sheets between them.

 The R1C1 reference style

You can also use a reference style where both the rows and the columns on the
worksheet are numbered. The R1C1 reference style is useful for computing row
and column positions in macros. In the R1C1 style, Excel indicates the location of
a cell with an "R" followed by a row number and a "C" followed by a column
number.

Reference Meaning

R[-2]C A relative reference to the cell two rows up and in the same column

R[2]C[2] A relative reference to the cell two rows down and two columns to the right

R2C2 An absolute reference to the cell in the second row and in the second column

R[-1] A relative reference to the entire row above the active cell

R An absolute reference to the current row

When you record a macro, Excel records some commands by using the R1C1
reference style. For example, if you record a command, such as selecting
the AutoSum button to insert a formula that adds a range of cells, Excel records
the formula by using R1C1 style, not A1 style, references.

You can turn the R1C1 reference style on or off by setting or clearing the R1C1
reference style check box under the Working with formulas section in
the Formulas category of the Options dialog box. To display this dialog box,
select the File tab.

Addis Ababa City Administration Innovation and Technology Development Bureau 9


LOOK UP VALUES WITH VLOOKUP, INDEX, OR MATCH

Tip: Try using the new XLOOKUP and XMATCH functions, improved versions of the
functions described in this article. These new functions work in any direction and return exact
matches by default, making them easier and more convenient to use than their predecessors.

Suppose that you have a list of office location numbers, and you need to know which employees
are in each office. The spreadsheet is huge, so you might think it is challenging task. It's actually
quite easy to do with a lookup function.

The VLOOKUP and HLOOKUP functions, together with INDEX and MATCH, are some of
the most useful functions in Excel.

Note: The Lookup Wizard feature is no longer available in Excel.

Here's an example of how to use VLOOKUP.

=VLOOKUP(B2,C2:E7,3,TRUE)

In this example, B2 is the first argument—an element of data that the function needs to work.
For VLOOKUP, this first argument is the value that you want to find. This argument can be a
cell reference, or a fixed value such as "smith" or 21,000. The second argument is the range of
cells, C2-:E7, in which to search for the value you want to find. The third argument is the
column in that range of cells that contains the value that you seek.

The fourth argument is optional. Enter either TRUE or FALSE. If you enter TRUE, or leave
the argument blank, the function returns an approximate match of the value you specify in the
first argument. If you enter FALSE, the function will match the value provide by the first
argument. In other words, leaving the fourth argument blank—or entering TRUE—gives you
more flexibility.

This example shows you how the function works. When you enter a value in cell B2 (the first
argument), VLOOKUP searches the cells in the range C2:E7 (2nd argument) and returns the
closest approximate match from the third column in the range, column E (3rd argument).

Addis Ababa City Administration Innovation and Technology Development Bureau 10


The fourth argument is empty, so the function returns an approximate match. If it didn't, you'd
have to enter one of the values in columns C or D to get a result at all.

When you're comfortable with VLOOKUP, the HLOOKUP function is equally easy to use.
You enter the same arguments, but it searches in rows instead of columns.

USING INDEX AND MATCH INSTEAD OF VLOOKUP

There are certain limitations with using VLOOKUP—the VLOOKUP function can only look
up a value from left to right. This means that the column containing the value you look up
should always be located to the left of the column containing the return value. Now if your
spreadsheet isn't built this way, then do not use VLOOKUP. Use the combination of INDEX
and MATCH functions instead.

This example shows a small list where the value we want to search on, Chicago, isn't in the
leftmost column. So, we can't use VLOOKUP. Instead, we'll use the MATCH function to find
Chicago in the range B1:B11. It's found in row 4. Then, INDEX uses that value as the lookup
argument, and finds the population for Chicago in the 4th column (column D). The formula
used is shown in cell A14.

Addis Ababa City Administration Innovation and Technology Development Bureau 11


GIVE IT A TRY

If you want to experiment with lookup functions before you try them out with your own data,
here's some sample data.

VLOOKUP EXAMPLE AT WORK

Copy the following data into a blank spreadsheet.


Tip: Before you paste the data into Excel, set the column widths for columns A through C to 250 pixels,
and click Wrap Text (Home tab, Alignment group).

Density Viscosity Temperature

0.457 3.55 500

0.525 3.25 400

0.606 2.93 300

0.675 2.75 250

0.746 2.57 200

0.835 2.38 150

0.946 2.17 100

1.09 1.95 50

1.29 1.71 0

Addis Ababa City Administration Innovation and Technology Development Bureau 12


Density Viscosity Temperature

Formula Description Result

=VLOOKUP(1,A2:C10,2) Using an approximate match, searches for the value 2.17


1 in column A, finds the largest value less than or
equal to 1 in column A which is 0.946, and then
returns the value from column B in the same row.

=VLOOKUP(1,A2:C10,3,TRUE) Using an approximate match, searches for the value 100


1 in column A, finds the largest value less than or
equal to 1 in column A, which is 0.946, and then
returns the value from column C in the same row.

=VLOOKUP(0.7,A2:C10,3,FALSE) Using an exact match, searches for the value 0.7 in #N/A
column A. Because there is no exact match in
column A, an error is returned.

=VLOOKUP(0.1,A2:C10,2,TRUE) Using an approximate match, searches for the value #N/A


0.1 in column A. Because 0.1 is less than the
smallest value in column A, an error is returned.

=VLOOKUP(2,A2:C10,2,TRUE) Using an approximate match, searches for the value 1.71


2 in column A, finds the largest value less than or
equal to 2 in column A, which is 1.29, and then
returns the value from column B in the same row.

HLOOKUP EXAMPLE

Copy all the cells in this table and paste it into cell A1 on a blank worksheet in Excel.

Tip: Before you paste the data into Excel, set the column widths for columns A through C to 250 pixels,
and click Wrap Text (Home tab, Alignment group).

Axles Bearings Bolts

4 4 9
5 7 10

6 8 11

Formula Description Result

=HLOOKUP("Axles", A1:C4, 2, Looks up "Axles" in row 1, and returns the value from row 2 4
TRUE) that's in the same column (column A).

=HLOOKUP("Bearings", A1:C4, Looks up "Bearings" in row 1, and returns the value from 7
3, FALSE) row 3 that's in the same column (column B).

Addis Ababa City Administration Innovation and Technology Development Bureau 13


Axles Bearings Bolts

=HLOOKUP("B", A1:C4, 3, Looks up "B" in row 1, and returns the value from row 3 5
TRUE) that's in the same column. Because an exact match for "B" is
not found, the largest value in row 1 that is less than "B" is
used: "Axles," in column A.
=HLOOKUP("Bolts", A1:C4, 4) Looks up "Bolts" in row 1, and returns the value from row 4 11
that's in the same column (column C).

=HLOOKUP(3, Looks up the number 3 in the three-row array constant, and c


{1,2,3;"a","b","c";"d","e","f"}, 2, returns the value from row 2 in the same (in this case, third)
TRUE) column. There are three rows of values in the array constant,
each row separated by a semicolon (;). Because "c" is found
in row 2 and in the same column as 3, "c" is returned.

INDEX AND MATCH EXAMPLES

This last example employs the INDEX and MATCH functions together to return the earliest
invoice number and its corresponding date for each of five cities. Because the date is returned
as a number, we use the TEXT function to format it as a date. The INDEX function actually
uses the result of the MATCH function as its argument. The combination of the INDEX and
MATCH functions are used twice in each formula – first, to return the invoice number, and
then to return the date.

Copy all the cells in this table and paste it into cell A1 on a blank worksheet in Excel.

Tip: Before you paste the data into Excel, set the column widths for columns A through D to 250 pixels,
and click Wrap Text (Home tab, Alignment group).

Invoic City Invoic Earliest invoice by city, with date


e e Date

3115 Atlanta 4/7/12 ="Atlanta =


"&INDEX($A$2:$C$33,MATCH("Atlanta",$B$2:$B$33,0),1)& ",
Invoice date: " &
TEXT(INDEX($A$2:$C$33,MATCH("Atlanta",$B$2:$B$33,0),3),"m/d/y
y")
3137 Atlanta 4/9/12 ="Austin =
"&INDEX($A$2:$C$33,MATCH("Austin",$B$2:$B$33,0),1)& ", Invoice
date: " &
TEXT(INDEX($A$2:$C$33,MATCH("Austin",$B$2:$B$33,0),3),"m/d/y
y")
3154 Atlanta 4/11/1 ="Dallas =
2 "&INDEX($A$2:$C$33,MATCH("Dallas",$B$2:$B$33,0),1)& ", Invoice
date: " &
TEXT(INDEX($A$2:$C$33,MATCH("Dallas",$B$2:$B$33,0),3),"m/d/yy
")
3191 Atlanta 4/21/1 ="New Orleans = "&INDEX($A$2:$C$33,MATCH("New
2 Orleans",$B$2:$B$33,0),1)& ", Invoice date: " &

Addis Ababa City Administration Innovation and Technology Development Bureau 14


Invoic City Invoic Earliest invoice by city, with date
e e Date

TEXT(INDEX($A$2:$C$33,MATCH("New
Orleans",$B$2:$B$33,0),3),"m/d/yy")

3293 Atlanta 4/25/1 ="Tampa =


2 "&INDEX($A$2:$C$33,MATCH("Tampa",$B$2:$B$33,0),1)& ", Invoice
date: " &
TEXT(INDEX($A$2:$C$33,MATCH("Tampa",$B$2:$B$33,0),3),"m/d/y
y")
3331 Atlanta 4/27/1
2
3350 Atlanta 4/28/1
2
3390 Atlanta 5/1/12

3441 Atlanta 5/2/12

3517 Atlanta 5/8/12

3124 Austin 4/9/12

3155 Austin 4/11/1


2
3177 Austin 4/19/1
2
3357 Austin 4/28/1
2
3492 Austin 5/6/12

3316 Dallas 4/25/1


2
3346 Dallas 4/28/1
2
3372 Dallas 5/1/12

3414 Dallas 5/1/12

3451 Dallas 5/2/12

3467 Dallas 5/2/12

3474 Dallas 5/4/12

3490 Dallas 5/5/12

3503 Dallas 5/8/12

3151 New 4/9/12


Orlean
s

Addis Ababa City Administration Innovation and Technology Development Bureau 15


Invoic City Invoic Earliest invoice by city, with date
e e Date

3438 New 5/2/12


Orlean
s
3471 New 5/4/12
Orlean
s
3160 Tampa 4/18/1
2
3328 Tampa 4/26/1
2
3368 Tampa 4/29/1
2
3420 Tampa 5/1/12

3501 Tampa 5/6/12

LEARN MORE ABOUT SUM


QUICK SUM WITH THE STATUS BAR

If you want to quickly get the Sum of a range of cells, all you need to do is select the range
and look in the lower right-hand side of the Excel window.

This is the Status Bar, and it displays information regarding whatever you have selected,
whether it's a single cell or multiple cells. If you right-click on the Status Bar a feature dialog

Addis Ababa City Administration Innovation and Technology Development Bureau 16


box will pop out displaying all of the options you can select. Note that it also displays values
for your selected range if you have those attributes checked.

USING THE AUTOSUM WIZARD

The easiest way to add a SUM formula to your worksheet is to use the AutoSum Wizard. Select
an empty cell directly above or below the range that you want to sum, and on the Home or
Formula tabs on the Ribbon, press AutoSum > Sum. The AutoSum Wizard will automatically
sense the range to be summed and build the formula for you. It can also work horizontally if
you select a cell to the left or right of the range to be summed. Note it’s not going to work on
non-contiguous ranges, but we'll go over that in the next section.

The AutoSum dialog also lets you select other common functions like:

 Average

 Count numbers

 Max

 Min

 More functions

AutoSum vertically

Addis Ababa City Administration Innovation and Technology Development Bureau 17


The AutoSum Wizard has automatically detected cells B2:B5 as the range to be summed. All
you need to do is press Enter to confirm it. If you need add/exclude more cells, you can hold
the Shift Key > Arrow key of your choice until your selection matches what you want, and
press Enter when you're done.

Intellisense function guide: the SUM(number1,[number2], …) floating tag beneath the


function is its Intellisense guide. If you click the SUM or function name, it will turn into a blue
hyperlink, which will take you to the Help topic for that function. If you click the individual
function elements, their representative pieces in the formula will be highlighted. In this case
only B2:B5 would be highlighted since there is only one number reference in this formula. The
Intellisense tag will appear for any function.

AutoSum horizontally

USING SUM WITH NON-CONTIGUOUS CELLS

Addis Ababa City Administration Innovation and Technology Development Bureau 18


The AutoSum Wizard will generally only work for contiguous ranges, so if you have blank
rows or columns in your sum range, Excel is going to stop at the first gap. In that case you’d
need to SUM by selection, where you add the individual ranges one by one. In this example if
you had data in cell B4, Excel would generate =SUM(C2:C6) since it would recognize a
contiguous range.

You can quickly select multiple, non-contiguous ranges with Ctrl+Left Click. First, enter
“=SUM(“, then select your different ranges and Excel will automatically add the comma
separator between ranges for you. Press enter when you’re done.

TIP: you can use ALT+ = to quickly add the SUM function to a cell. Then all you need to do
is select your range(s).

Note: you may notice how Excel has highlighted the different function ranges by color, and
they match within the formula itself, so C2:C3 is one color, and C5:C6 is another. Excel will
do this for all functions, unless the referenced range is on a different worksheet or in a different
workbook. For enhanced accessibility with assistive technology, you can use Named Ranges,
like “Week1”, “Week2”, etc. and then reference them in your formula:

=SUM(Week1,Week2)

USING SUM WITH OTHER FUNCTIONS

1. You can absolutely use SUM with other functions. Here’s an example that creates
a monthly average calculation:

Addis Ababa City Administration Innovation and Technology Development Bureau 19


 =SUM(A2:L2)/COUNTA(A2:L2)

2. Which takes the SUM of A2:L2 divided by the count of non-blank cells in A2:L2
(May through December are blank).

USING SUM ACROSS MULTIPLE WORKSHEETS

1. Sometimes you need to sum a particular cell on multiple worksheets. It may be


tempting to click on each sheet and the cell you want and just use “+” to add the
cell values, but that’s tedious and can be error prone.

 =Sheet1!A1+Sheet2!A1+Sheet3!A1

You can accomplish this much easier with a 3D or 3-Dimensional SUM:

 =SUM(Sheet1:Sheet3!A1)

Which will sum the cell A1 in all sheets from Sheet 1 to Sheet 3.

This is particularly helpful in situations where you have a single sheet for each
month (January-December) and you need to total them on a summary sheet.

Addis Ababa City Administration Innovation and Technology Development Bureau 20


 =SUM(January:December!A2)

Which will sum cell A2 in each sheet from January through December.

Notes: If your worksheets have spaces in their names, like “January Sales”, then
you need to use an apostrophe when referencing the sheet names in a formula.
Notice the apostrophe BEFORE the first worksheet name, and again AFTER the
last.

 =SUM(‘January Sales:December Sales’!A2)

The 3D method will also work with other functions like AVERAGE, MIN, MAX,
etc:

 =AVERAGE(Sheet1:Sheet3!A1)

 =MIN(Sheet1:Sheet3!A1)

 =MAX(Sheet1:Sheet3!A1)

USE SUM AND OTHER FUNCTIONS TO ADD, SUBTRACT, MULTIPLY


AND DIVIDE WITH EXCEL

You can easily perform mathematical operations with Excel on their own, and in conjunction
with Excel functions like SUM. The following table lists the operators that you can use, along
with some related functions. You can input the operators from either the number row on your
keyboard, or the 10-key pad if you have one. For instance, Shift+8 will enter the asterisk (*)
for multiplication.

Operator Operation Examples

Addis Ababa City Administration Innovation and Technology Development Bureau 21


+ Addition =1+1

=A1+B1

=SUM(A1:A10)+10

=SUM(A1:A10)+B1

- Subtraction =1-1

=A1-B1

=SUM(A1:A10)-10

=SUM(A1:A10)-B1

* Multiplication =1*1

=A1*B1

=SUM(A1:A10)*10

=SUM(A1:A10)*B1

=PRODUCT(1,1) - PRODUCT function

/ Division =1/1

=A1/B1

=SUM(A1:A10)/10

=SUM(A1:A10)/B1

=QUOTIENT(1,1) - QUOTIENT function

Addis Ababa City Administration Innovation and Technology Development Bureau 22


^ Exponentiation =1^1

=A1^B1

=SUM(A1:A10)^10

=SUM(A1:A10)^B1

=POWER(1,1) - POWER function

OTHER EXAMPLES

1. Let’s say you want to apply a Percentage Discount to a range of cells that you’ve
summed.

 =SUM(A2:A14)*-25%

Would give you 25% of the summed range, however that hard-codes the 25% in
the formula, and it might be hard to find later if you need to change it. You’re much

Addis Ababa City Administration Innovation and Technology Development Bureau 23


better off putting the 25% in a cell and referencing that instead, where it’s out in
the open and easily changed, like this:

 =SUM(A2:A14)*E2

To divide instead of multiply you simply replace the “*” with


“/”: =SUM(A2:A14)/E2

2. Adding or Subtracting from a SUM

i. You can easily Add or Subtract from a Sum using + or - like this:

 =SUM(A1:A10)+E2

 =SUM(A1:A10)-E2

SUMIF FUNCTION

You use the SUMIF function to sum the values in a range that meet criteria that you specify.
For example, suppose that in a column that contains numbers, you want to sum only the values
that are larger than 5. You can use the following formula: =SUMIF(B2:B25,">5")

Tips:

 If you want, you can apply the criteria to one range and sum the corresponding
values in a different range. For example, the formula =SUMIF(B2:B5, "John",
C2:C5) sums only the values in the range C2:C5, where the corresponding cells in
the range B2:B5 equal "John."
 To sum cells based on multiple criteria, see SUMIFS function.

Important: The SUMIF function returns incorrect results when you use it to match strings
longer than 255 characters or to the string #VALUE!.

Syntax

SUMIF(range, criteria, [sum_range])

The SUMIF function syntax has the following arguments:

 range Required. The range of cells that you want evaluated by criteria. Cells in
each range must be numbers or names, arrays, or references that contain numbers.

Addis Ababa City Administration Innovation and Technology Development Bureau 24


Blank and text values are ignored. The selected range may contain dates in standard
Excel format (examples below).
 criteria Required. The criteria in the form of a number, expression, a cell
reference, text, or a function that defines which cells will be added. Wildcard
characters can be included - a question mark (?) to match any single character, an
asterisk (*) to match any sequence of characters. If you want to find an actual
question mark or asterisk, type a tilde (~) preceding the character.

For example, criteria can be expressed as 32, ">32", B5, "3?", "apple*", "*~?", or
TODAY().

Important: Any text criteria or any criteria that includes logical or mathematical
symbols must be enclosed in double quotation marks ("). If the criteria is numeric,
double quotation marks are not required.

 sum_range Optional. The actual cells to add, if you want to add cells other than
those specified in the range argument. If the sum_range argument is omitted,
Excel adds the cells that are specified in the range argument (the same cells to
which the criteria is applied).

Sum_range should be the same size and shape as range. If it isn't, performance
may suffer, and the formula will sum a range of cells that starts with the first cell
in sum_range but has the same dimensions as range. For example:

range sum_range Actual summed cells


A1:A5 B1:B5 B1:B5
A1:A5 B1:K5 B1:B5

EXAMPLES

EXAMPLE 1

Copy the example data in the following table, and paste it in cell A1 of a new Excel worksheet.
For formulas to show results, select them, press F2, and then press Enter. If you need to, you
can adjust the column widths to see all the data.

Addis Ababa City Administration Innovation and Technology Development Bureau 25


Property Value Commission Data
$100,000 $7,000 $250,000
$200,000 $14,000

$300,000 $21,000

$400,000 $28,000

Formula Description Result


=SUMIF(A2:A5,">160000",B2:B5) Sum of the commissions for property values $63,000
over $160,000.
=SUMIF(A2:A5,">160000") Sum of the property values over $160,000. $900,000
=SUMIF(A2:A5,300000,B2:B5) Sum of the commissions for property values $21,000
equal to $300,000.
=SUMIF(A2:A5,">" & C2,B2:B5) Sum of the commissions for property values $49,000
greater than the value in C2.

EXAMPLE 2

Copy the example data in the following table, and paste it in cell A1 of a new Excel worksheet.
For formulas to show results, select them, press F2, and then press Enter. If you need to, you
can adjust the column widths to see all the data.

Category Food Sales


Vegetables Tomatoes $2,300
Vegetables Celery $5,500
Fruits Oranges $800
Butter $400

Vegetables Carrots $4,200


Fruits Apples $1,200
Formula Description Result
=SUMIF(A2:A7,"Fruits",C2:C7) Sum of the sales of all foods in the "Fruits" $2,000
category.
=SUMIF(A2:A7,"Vegetables",C2:C7) Sum of the sales of all foods in the $12,000
"Vegetables" category.

Addis Ababa City Administration Innovation and Technology Development Bureau 26


Category Food Sales
=SUMIF(B2:B7,"*es",C2:C7) Sum of the sales of all foods that end in "es" $4,300
(Tomatoes, Oranges, and Apples).

=SUMIF(A2:A7,"",C2:C7) Sum of the sales of all foods that do not have $400
a category specified.

COUNTIF FUNCTION

Use COUNTIF, one of the statistical functions, to count the number of cells that meet a
criterion; for example, to count the number of times a particular city appears in a customer list.

In its simplest form, COUNTIF says:

 =COUNTIF(Where do you want to look?, What do you want to look for?)

For example:

 =COUNTIF(A2:A5,"London")
 =COUNTIF(A2:A5,A4)

SYNTAX

COUNTIF(range, criteria)

Argument name Description

range (required) The group of cells you want to count. Range can
contain numbers, arrays, a named range, or
references that contain numbers. Blank and text
values are ignored.

Learn how to select ranges in a worksheet.

criteria (required) A number, expression, cell reference, or text string


that determines which cells will be counted.

Addis Ababa City Administration Innovation and Technology Development Bureau 27


Argument name Description

For example, you can use a number like 32, a


comparison like ">32", a cell like B4, or a word
like "apples".

COUNTIF uses only a single criteria.


Use COUNTIFS if you want to use multiple
criteria.

EXAMPLES

To use these examples in Excel, copy the data in the table below, and paste it in cell A1 of a
new worksheet.

Data Data

apples 32

oranges 54

peaches 75

apples 86

Formula Description

=COUNTIF(A2:A5,"apples") Counts the number of cells with apples in


cells A2 through A5. The result is 2.

=COUNTIF(A2:A5,A4) Counts the number of cells with peaches (the


value in A4) in cells A2 through A5. The
result is 1.

=COUNTIF(A2:A5,A2)+COUNTIF(A2:A5,A3) Counts the number of apples (the value in


A2), and oranges (the value in A3) in cells
A2 through A5. The result is 3. This formula
uses COUNTIF twice to specify multiple

Addis Ababa City Administration Innovation and Technology Development Bureau 28


Data Data

criteria, one criteria per expression. You


could also use the COUNTIFS function.

=COUNTIF(B2:B5,">55") Counts the number of cells with a value


greater than 55 in cells B2 through B5. The
result is 2.

=COUNTIF(B2:B5,"<>"&B4) Counts the number of cells with a value not


equal to 75 in cells B2 through B5. The
ampersand (&) merges the comparison
operator for not equal to (<>) and the value
in B4 to read =COUNTIF(B2:B5,"<>75").
The result is 3.

=COUNTIF(B2:B5,">=32")- Counts the number of cells with a value


COUNTIF(B2:B5,"<=85") greater than (>) or equal to (=) 32 and less
than (<) or equal to (=) 85 in cells B2
through B5. The result is 1.

=COUNTIF(A2:A5,"*") Counts the number of cells containing any


text in cells A2 through A5. The asterisk (*)
is used as the wildcard character to match
any character. The result is 4.

=COUNTIF(A2:A5,"?????es") Counts the number of cells that have exactly


7 characters, and end with the letters "es" in
cells A2 through A5. The question mark (?)
is used as the wildcard character to match
individual characters. The result is 2.

COMMON PROBLEMS

Addis Ababa City Administration Innovation and Technology Development Bureau 29


Problem What went wrong

Wrong value returned for The COUNTIF function returns incorrect results when you
long strings. use it to match strings longer than 255 characters.

To match strings longer than 255 characters, use


the CONCATENATE function or the concatenate operator
&. For example, =COUNTIF(A2:A5,"long string"&"another
long string").

No value returned when Be sure to enclose the criteria argument in quotes.


you expect a value.

A COUNTIF formula This error occurs when the formula that contains the function
receives a #VALUE! error refers to cells or a range in a closed workbook and the cells
when referring to another are calculated. For this feature to work, the other workbook
worksheet. must be open.

BEST PRACTICES
Do this Why
Be aware that Criteria aren't case sensitive. In other words, the string "apples"
COUNTIF ignores and the string "APPLES" will match the same cells.
upper and lower
case in text strings.

Addis Ababa City Administration Innovation and Technology Development Bureau 30


Do this Why
Use wildcard Wildcard characters —the question mark (?) and asterisk (*)—can
characters. be used in criteria. A question mark matches any single character.
An asterisk matches any sequence of characters. If you want to find
an actual question mark or asterisk, type a tilde (~) in front of the
character.

For example, =COUNTIF(A2:A5,"apple?") will count all instances


of "apple" with a last letter that could vary.
Make sure your data When counting text values, make sure the data doesn't contain
doesn't contain leading spaces, trailing spaces, inconsistent use of straight and
erroneous curly quotation marks, or nonprinting characters. In these cases,
characters. COUNTIF might return an unexpected value.

Try using the CLEAN function or the TRIM function.

For convenience, COUNTIF supports named ranges in a formula (such as


use named ranges =COUNTIF(fruit,">=32")-COUNTIF(fruit,">85"). The named
range can be in the current worksheet, another worksheet in the
same workbook, or from a different workbook. To reference from
another workbook, that second workbook also must be open.

Addis Ababa City Administration Innovation and Technology Development Bureau 31


CREATE A PIVOTTABLE TO ANALYZE WORKSHEET DATA
A PivotTable is a powerful tool to calculate, summarize, and analyze data that lets you see
comparisons, patterns, and trends in your data. PivotTables work a little bit differently
depending on what platform you are using to run Excel.

CREATE A PIVOTTABLE IN EXCEL FOR WINDOWS

1. Select the cells you want to create a PivotTable from.

Note: Your data should be organized in columns with a single header row. See
the Data format tips and tricks section for more details.

2. Select Insert > PivotTable.

3. This creates a PivotTable based on an existing table or range.

Note: Selecting Add this data to the Data Model adds the table or range being
used for this PivotTable into the workbook’s Data Model. Learn more.

Addis Ababa City Administration Innovation and Technology Development Bureau 32


4. Choose where you want the PivotTable report to be placed. Select New
Worksheet to place the PivotTable in a new worksheet or Existing
Worksheet and select where you want the new PivotTable to appear.

5. Select OK.

PIVOTTABLES FROM OTHER SOURCES

By clicking the down arrow on the button, you can select from other possible sources for your
PivotTable. In addition to using an existing table or range, there are three other sources you
can select from to populate your PivotTable.

Note: Depending on your organization's IT settings you might see your organization's name i
ncluded in the list. For example, "From Power BI (Microsoft)."

Get from External Data Source

Addis Ababa City Administration Innovation and Technology Development Bureau 33


Get from Data Model

Use this option if your workbook contains a Data Model, and you want to create a PivotTable
from multiple tables, enhance the PivotTable with custom measures, or are working with very
large datasets.

Get from Power BI

Use this option if your organization uses Power BI and you want to discover and connect to
endorsed cloud datasets you have access to.

BUILDING OUT YOUR PIVOTTABLE

Addis Ababa City Administration Innovation and Technology Development Bureau 34


1. To add a field to your PivotTable, select the field name checkbox in
the PivotTables Fields pane.

Note: Selected fields are added to their default areas: non-numeric fields are added
to Rows, date and time hierarchies are added to Columns, and numeric fields are
added to Values.

2. To move a field from one area to another, drag the field to the target area.

REFRESHING PIVOTTABLES

If you add new data to your PivotTable data source, any PivotTables that were built on that
data source need to be refreshed. To refresh just one PivotTable, you can right-click anywhere
in the PivotTable range, and then select Refresh. If you have multiple PivotTables, first select

Addis Ababa City Administration Innovation and Technology Development Bureau 35


any cell in any PivotTable, then on the ribbon go to PivotTable Analyze > select the arrow
under the Refresh button, and then select Refresh All.

WORKING WITH PIVOTTABLE VALUES

Summarize Values By

By default, PivotTable fields placed in the Values area are displayed as a SUM. If Excel
interprets your data as text, the data is displayed as a COUNT. This is why it's so important to
make sure you don't mix data types for value fields. You can change the default calculation by
first selecting the arrow to the right of the field name, and then select the Value Field
Settings option.

Next, change the calculation in the Summarize Values By section. Note that when you change
the calculation method, Excel automatically appends it in the Custom Name section, like "Sum
of FieldName", but you can change it. If you select Number Format, you can change the
number format for the entire field.

Addis Ababa City Administration Innovation and Technology Development Bureau 36


Tip: Since changing the calculation in the Summarize Values By section changes the
PivotTable field name, it's best not to rename your PivotTable fields until you're finished
setting up your PivotTable. One trick is to use Find & Replace (Ctrl+H) >Find what > "Sum
of", and then Replace with > leave blank to replace everything at once instead of manually
retyping.

Show Values As

Instead of using a calculation to summarize the data, you can also display it as a percentage of
a field. In the following example, we changed our household expense amounts to display as
a % of Grand Total instead of the sum of the values.

Addis Ababa City Administration Innovation and Technology Development Bureau 37


Once you've opened the Value Field Setting dialog box, you can make your selections from
the Show Values As tab.

Display a value as both a calculation and percentage.

Simply drag the item into the Values section twice, and then set the Summarize Values
By and Show Values As options for each one.

USE THE FIELD LIST TO ARRANGE FIELDS IN A PIVOTTABLE

After you create a PivotTable, you'll see the Field List. You can change the design of the
PivotTable by adding and arranging its fields. If you want to sort or filter the columns of data
shown in the PivotTable, see Sort data in a PivotTable and Filter data in a PivotTable.

USE THE FIELD LIST

The Field List should appear when you click anywhere in the PivotTable. If you click inside
the PivotTable but don't see the Field List, open it by clicking anywhere in the PivotTable.
Then, show the PivotTable Tools on the ribbon and click Analyze> Field List.

Addis Ababa City Administration Innovation and Technology Development Bureau 38


The Field List has a field section in which you pick the fields you want to show in your
PivotTable, and the Areas section (at the bottom) in which you can arrange those fields the way
you want.

Tip: If you want to change how sections are shown in the Field List, click

the Tools button and then pick the layout you want.

Addis Ababa City Administration Innovation and Technology Development Bureau 39


ADD, REARRANGE, AND DELETE FIELDS IN THE FIELD LIST

Use the field section of the Field List to add fields to your PivotTable, by checking the box
next to field names to place those fields in the default area of the Field List.

Note: Typically, nonnumeric fields are added to the Rows area, numeric fields are added to
the Values area, and Online Analytical Processing (OLAP) date and time hierarchies are added
to the Columns area.

Use the areas section (at the bottom) of the Field List to rearrange fields the way you want by
dragging them between the four areas.

Fields that you place in different areas are shown in the PivotTable as follows:

 Filters area fields are shown as top-level report filters above the PivotTable, like
this:

Addis Ababa City Administration Innovation and Technology Development Bureau 40


 Columns area fields are shown as Column Labels at the top of the PivotTable,
like this:

Addis Ababa City Administration Innovation and Technology Development Bureau 41


Depending on the hierarchy of the fields, columns may be nested inside columns that are
higher in position.

 Rows area fields are shown as Row Labels on the left side of the PivotTable,
like this:

Depending on the hierarchy of the fields, rows may be nested inside rows that are higher in
position.

 Values area fields are shown as summarized numeric values in the PivotTable, like
this:

Addis Ababa City Administration Innovation and Technology Development Bureau 42


If you have more than one field in an area, you can rearrange the order by dragging the fields
into the precise position you want.

To delete a field from the PivotTable, drag the field out of its areas section. You can also
remove fields by clicking the down arrow next to the field and then selecting Remove Field.

SORT DATA IN A PIVOTTABLE OR PIVOTCHART

Sorting data is helpful when you have large amounts of data in a PivotTable or PivotChart.
You can sort in alphabetical order, from highest to lowest values, or from lowest to highest
values. Sorting is one way of organizing your data so it’s easier to find specific items that need
more scrutiny.

Before you sort

Here are a few things to remember about sorting data:

Addis Ababa City Administration Innovation and Technology Development Bureau 43


 Sort orders vary by locale setting. Ensure that you have the proper locale setting in Regional
Settings or Regional and Language Options in Control Panel on your computer. For
information about changing the locale setting, see the Windows Help system.

 Data that has leading spaces will affect the sort results. For optimal results, remove any leading
spaces before you sort the data.

 You can’t sort case-sensitive text entries.

 You can’t sort data by a specific format, such as cell color or font color. Nor can you sort by
conditional formatting indicators, such as icon sets.

SORT ROW OR COLUMN LABELS

1. In a PivotTable, click the small arrow next to Row Labels and Column
Labels cells.

2. Click a field in the row or column you want to sort.

3. Click the arrow on Row Labels or Column Labels, and then click the sort
option you want.

Addis Ababa City Administration Innovation and Technology Development Bureau 44


4. To sort data in ascending or descending order, click Sort A to Z or Sort Z to A.

Text entries will sort in alphabetical order, numbers will sort from smallest to largest (or vice
versa), and dates or times will sort from oldest to newest (or vice versa).

SORT ON A COLUMN THAT DOESN'T HAVE AN ARROW BUTTON

You can sort on individual values or on subtotals by right-clicking a cell, choosing Sort, and
then choosing a sort method. The sort order applies to all the cells at the same level in the
column that contains the cell.

In the example shown below, the data under the category level (Helmet, Travel bag) has an
alphabetical sort from A to Z.

Addis Ababa City Administration Innovation and Technology Development Bureau 45


To see a sort of the grand totals for products—from largest to smallest—choose any number in
the Grand Total column, and sort on it.

Tip: To quickly find what you need, you can group, filter, or apply conditional formatting to the
PivotTable or PivotChart.

SET CUSTOM SORT OPTIONS

To sort specific items manually or change the sort order, you can set your own sort options:

1. Click a field in the row or column you want to sort.

2. Click the arrow on Row Labels or Column Labels, and then click More Sort
Options.

Addis Ababa City Administration Innovation and Technology Development Bureau 46


3. In the Sort dialog box, pick the type of sort you want:

 Click Manual to rearrange items by dragging them. Hover the cursor over the
item's border until you see the four-pointed arrow, then drag.

 You can't drag items that are shown in the Values area of the PivotTable Field List.

 Click Ascending (A to Z) by or Descending (A to Z) by, and then choose the


field you want to sort.

Addis Ababa City Administration Innovation and Technology Development Bureau 47


 For additional options, click More Options, and then pick the option you want in
the More Sort Options dialog box:

 In AutoSort, check or uncheck the box for Sort automatically every time the
report is update— either to permit or stop automatic sorting whenever the
PivotTable data updates.

 Under First key sort order, choose the custom order you want to use. This option
is available only when there is no check in the box for Sort automatically every
time the report is updated.

Note: A custom list sort order is not retained when you update (refresh) data in
your PivotTable.

 In Sort By, click Grand Total or Values in selected columns to sort by these
values. This option is not available when you set sorting to Manual.

Addis Ababa City Administration Innovation and Technology Development Bureau 48


Tip: Click Data source order to return items to their original order. This option
is available for Online Analytical Processing (OLAP) source data only.

GROUP OR UNGROUP DATA IN A PIVOTTABLE

Grouping data in a PivotTable can help you show a subset of data to analyze. For example, you
may want to group an unwieldy list date and time fields in the PivotTable into quarters and
months

GROUP DATA

1. In the PivotTable, right-click a value and select Group.

2. In the Grouping box, select Starting at and Ending at checkboxes, and edit the
values if needed.

3. Under By, select a time period. For numerical fields, enter a number that
specifies the interval for each group.

4. Select OK.

GROUP SELECTED ITEMS

1. Hold Ctrl and select two or more values.

2. Right-click and select Group.

GROUP BY DATE AND TIME

With time grouping, relationships across time-related fields are automatically detected and
grouped together when you add rows of time fields to your PivotTables. Once grouped
together, you can drag the group to your Pivot Table and start your analysis.

Addis Ababa City Administration Innovation and Technology Development Bureau 49


NAME A GROUP

1. Select the group.

2. Select Analyze > Field Settings. In the PivotTable Analyze tab under Active
Field click Field Settings.

3. Change the Custom Name to something you want and then select OK.

UNGROUP GROUPED DATA

1. Right-click any item that is in the group.

2. Select Ungroup.

FILTER DATA IN A PIVOTTABLE

PivotTables are great for taking large datasets and creating in-depth detail summaries.

FILTER DATA IN A PIVOTTABLE WITH A SLICER

Addis Ababa City Administration Innovation and Technology Development Bureau 50


You can insert one or more slicers for a quick and effective way to filter your data. Slicers have
buttons you can click to filter the data, and they stay visible with your data, so you always
know what fields are shown or hidden in the filtered PivotTable.

1. Select any cell within the PivotTable, then go to Pivot Table Analyze > Insert

Slicer .

2. Select the fields you want to create slicers for. Then select OK.

3. Excel will place one slicer on the worksheet for each selection you made, but it's
up to you to arrange and size them however is best for you.

4. Click the slicer buttons to select the items you want to show in the PivotTable.

FILTER DATA MANUALLY

Manual filters use AutoFilter. They work in conjunction with slicers, so you can use a slicer to
create a high-level filter, then use AutoFilter to dive deeper.

1. To display AutoFilter, select the Filter drop-down arrow , which varies depending on the
report layout.

Compact Layout

Addis Ababa City Administration Innovation and Technology Development Bureau 51


The Value field is in the Rows area The Value field is in the Columns area

2. Outline/Tabular Layout

Displays the Values field name in the top left corner

3. To filter by creating a conditional expression, select Label Filters, and then create
a label filter.

4. To filter by values, select Values Filters and then create a values filter.

5. To filter by specific row labels (in Compact Layout) or column labels


(in Outline or Tabular Layout), uncheck Select All, and then select the check
boxes next to the items you want to show. You can also filter by entering text in
the Search box.

6. Select OK.

SHOW THE TOP OR BOTTOM 10 ITEMS

You can also apply filters to show the top or bottom 10 values or data that meets the certain
conditions.

Addis Ababa City Administration Innovation and Technology Development Bureau 52


1. To display AutoFilter, select the Filter drop-down arrow , which varies
depending on the report layout.

Compact Layout

The Value field is in the Rows area The Value field is in the Columns area

2. Outline/Tabular Layout

Displays the Values field name in the top left corner

3. Select Values Filters > Top 10.

4. In the first box, select Top or Bottom.

5. In the second box, enter a number.

6. In the third box, do the following:

 To filter by number of items, pick Items.

 To filter by percentage, pick Percentage.

 To filter by sum, pick Sum.

7. In the fourth box, select a Values field.

Addis Ababa City Administration Innovation and Technology Development Bureau 53


USE A REPORT FILTER TO FILTER ITEMS

By using a report filter, you can quickly display a different set of values in the PivotTable.
Items you select in the filter are displayed in the PivotTable, and items that are not selected
will be hidden. If you want to display filter pages (the set of values that match the selected
report filter items) on separate worksheets, you can specify that option.

Add a report filter

1. Click anywhere inside the PivotTable.

The PivotTable Fields pane appears.

2. In the PivotTable Field List, click on the field in an area and select Move to
Report Filter.

You can repeat this step to create more than one report filter. Report filters are displayed
above the PivotTable for easy access.

 To change the order of the fields, in the Filters area, you can either drag the fields to the
position that you want, or double-click on a field and select Move Up or Move Down. The
order of the report filters will be reflected accordingly in the PivotTable.

Display report filters in rows or columns

1. Click the PivotTable or the associated PivotTable of a PivotChart.

2. Right-click anywhere in the PivotTable, and then click PivotTable Options.

3. In the Layout tab, specify these options:

a. In Report Filter area, in the Arrange fields list box, do one of the
following:

 To display report filters in rows from top to bottom,


select Down, Then Over.

 To display report filters in columns from left to right,


select Over, Then Down.

Addis Ababa City Administration Innovation and Technology Development Bureau 54


b. In the Filter fields per column box, type or select the number of fields to
display before taking up another column or row (based on the setting
of Arrange fields you specified in the previous step).

Select items in the report filter

1. In the PivotTable, click the dropdown arrow next to the report filter.

2. Select the checkboxes next to the items that you want to display in the report. To
select all items, click the checkbox next to (Select All).

The report filter now displays the filtered items.

Display report filter pages on separate worksheets

1. Click anywhere in the PivotTable (or the associated PivotTable of a PivotChart )


that has one or more report filters.

2. Click PivotTable Analyze (on the ribbon) > Options > Show Report Filter
Pages.

3. In the Show Report Filter Pages dialog box, select a report filter field, and then
click OK.

FILTER BY SELECTION TO DISPLAY OR HIDE SELECTED ITEMS


ONLY

1. In the PivotTable, select one or more items in the field that you want to filter by
selection.

2. Right-click an item in the selection, and then click Filter.

3. Do one of the following:

 To display the selected items, click Keep Only Selected Items.

 To hide the selected items, click Hide Selected Items.

Tip: You can display hidden items again by removing the filter. Right-click another item in the
same field, click Filter, and then click Clear Filter.

TURN FILTERING OPTIONS ON OR OFF

Addis Ababa City Administration Innovation and Technology Development Bureau 55


If you want to apply multiple filters per field, or if you don’t want to show Filter buttons in
your PivotTable, here’s how you can turn these and other filtering options on or off:

1. Click anywhere in the PivotTable to show the PivotTable tabs on the ribbon.

2. On the PivotTable Analyze tab, click Options.

a. In the PivotTable Options dialog box, click the Totals & Filters tab.

b. In the Filters area, check or uncheck the Allow multiple filters per
field box depending on what you need.

c. Click the Display tab, and then check or uncheck the Display Field
captions and filters check box, to show or hide field captions and filter
drop downs.

CREATE A PIVOTCHART

Sometimes it's hard to see the big picture when your raw data hasn’t been summarized. Your
first instinct may be to create a PivotTable, but not everyone can look at numbers in a table and
quickly see what's going on. PivotCharts are a great way to add data visualizations to your data.

CREATE A PIVOTCHART

1. Select a cell in your table.

2. Select Insert > PivotChart .


3. Select where you want the PivotChart to appear.
4. Select OK.
5. Select the fields to display in the menu.

Household expense data Corresponding PivotChart

CREATE A CHART FROM A PIVOTTABLE

1. Select a cell in your table.


2. Select PivotTable Tools > Analyze > PivotChart.

Addis Ababa City Administration Innovation and Technology Development Bureau 56


3. Select a chart.
4. Select OK.

CREATE A CHART FROM START TO FINISH

Charts help you visualize your data in a way that creates maximum impact on your audience.
Learn to create a chart and add a trendline. You can start your document from a recommended
chart or choose one from our collection of pre-built chart templates.

CREATE A CHART

1. Select data for the chart.


2. Select Insert > Recommended Charts.
3. Select a chart on the Recommended Charts tab, to preview the chart.
4. Select a chart.
5. Select OK.

Note: You can select the data you want in the chart and press ALT + F1 to create a chart
immediately, but it might not be the best chart for the data. If you don’t see a chart you like,
select the All Charts tab to see all chart types.

ADD A TRENDLINE

1. Select a chart.
2. Select Chart Design > Add Chart Element.
3. Select Trendline and then select the type of trendline you want, such
as Linear, Exponential, Linear Forecast, or Moving Average.

ADD OR REMOVE TITLES IN A CHART

To make a chart easier to understand, you can add chart title and axis titles, to any type of chart.
Axis titles are typically available for all axes that can be displayed in a chart, including depth
(series) axes in 3-D charts. Some chart types (such as radar charts) have axes, but they cannot
display axis titles. You can’t add axis titles to charts that don’t have axes (like pie or doughnut
charts).

Addis Ababa City Administration Innovation and Technology Development Bureau 57


ADD A CHART TITLE

1. In the chart, select the "Chart Title" box and type in a title.
2. Select the + sign to the top-right of the chart.
3. Select the arrow next to Chart Title.
4. Select Centered Overlay to lay the title over the chart, or More Options for
additional choices.
5. Right-click the chart title to format it with options like Fill or Outline.

REMOVE A CHART TITLE

1. Click on the chart.


2. Select the + sign to the top-right of the chart.
3. Uncheck the checkbox next to Chart Title.

SHOW OR HIDE A CHART LEGEND OR DATA TABLE

You can show or hide the legend of a chart. Showing a legend can give readers more
information about the chart, while hiding a legend can give your chart a cleaner look.

SHOW A CHART LEGEND

1. Select a chart and then select the plus sign to the top right.
2. Point to Legend and select the arrow next to it.
3. Choose where you want the legend to appear in your chart.

HIDE A CHART LEGEND

1. Select a legend to hide.


2. Press Delete.

SHOW OR HIDE A DATA TABLE

1. Select a chart and then select the plus sign to the top right.
2. To show a data table, point to Data Table and select the arrow next to it, and
then select a display option.
3. To hide the data table, uncheck the Data Table option.

Addis Ababa City Administration Innovation and Technology Development Bureau 58


ADD OR REMOVE A SECONDARY AXIS IN A CHART IN EXCEL
When the numbers in a chart vary widely from data series to data series, or when you have
mixed types of data (price and volume), plot one or more data series on a secondary vertical
(value) axis. The scale of the secondary vertical axis shows the values for the associated data
series. A secondary axis works well in a chart that shows a combination of column and line
charts. You can quickly show a chart like this by changing your chart to a combo chart.

1. Select a chart to open Chart Tools.


2. Select Design > Change Chart Type.
3. Select Combo > Cluster Column - Line on Secondary Axis.
4. Select Secondary Axis for the data series you want to show.
5. Select the drop-down arrow and choose Line.
6. Select OK.

ADD OR REMOVE A SECONDARY AXIS IN A CHART IN OFFICE 2010

When the values in a 2-D chart vary widely from data series to data series, or when you have
mixed types of data (for example, price and volume), you can plot one or more data series on
a secondary vertical (value) axis. The scale of the secondary vertical axis reflects the values for
the associated data series.

After you add a secondary vertical axis to a 2-D chart, you can also add a secondary horizontal
(category) axis, which may be useful in an xy (scatter) chart or bubble chart.

Addis Ababa City Administration Innovation and Technology Development Bureau 59


To help distinguish the data series that are plotted on the secondary axis, you can change their
chart type. For example, in a column chart, you could change the data series on the secondary
axis to a line chart.

ADD A TREND OR MOVING AVERAGE LINE TO A CHART

Add a trendline to your chart to show visual data trends.

ADD A TRENDLINE

1. Select a chart.
2. Select the + to the top right of the chart.
3. Select Trendline.
4. In the Add Trendline dialog box, select any data series options you want, and
click OK.

FORMAT A TRENDLINE

Addis Ababa City Administration Innovation and Technology Development Bureau 60


1. Click anywhere in the chart.
2. On the Format tab, in the Current
Selection group, select the trendline option in
the dropdown list.
3. Click Format Selection.
4. In the Format Trendline pane, select
a Trendline Option to choose the trendline
you want for your chart. Formatting a
trendline is a statistical way to measure data:

5. Set a value in
the Forward and Backward fields to project
your data into the future.

ADD A MOVING AVERAGE LINE

You can format your trendline to a moving average line.

1. Click anywhere in the chart.


2. On the Format tab, in the Current Selection group, select the trendline option in
the dropdown list.
3. Click Format Selection.
4. In the Format Trendline pane, under Trendline Options, select Moving
Average. Specify the points if necessary.

INSTANT CHARTS USING QUICK ANALYSIS

Quick Analysis takes a range of data and helps you pick the perfect chart with just a few
commands.

1. Select a range of cells.


2. Select the Quick Analysis button that appears at the bottom right corner of the
selected data.

Or, press Ctrl + Q.

3. Select Charts.

Addis Ababa City Administration Innovation and Technology Development Bureau 61


4. Hover over the chart types to preview a chart, and then select the chart you want.
5. Select More > All Charts to all available see all charts available. Preview and
select OK when done to insert the chart.

Addis Ababa City Administration Innovation and Technology Development Bureau 62


PROTECTION AND SECURITY IN EXCEL

Excel gives you the ability to protect your work, whether it’s to prevent someone from opening
a workbook without a password, granting Read-Only access to a workbook, or even just
protecting a worksheet so you don’t inadvertently delete any formulas. In this topic we’ll
discuss the various ways you can utilize the primary options to protect and distribute your Excel
files.

Warning:

 If you forget or lose your password, Microsoft can’t retrieve it for you.
 You should not assume that just because you protect a workbook or worksheet
with a password that it is secure - you should always think twice before distributing
Excel workbooks that could contain sensitive personal information like credit card
numbers, Social Security Number, employee identification, to name a few.
 Worksheet level protection is not intended as a security feature. It simply prevents
users from modifying locked cells within the worksheet.

Following are the different options available for protecting your Excel data:

 File-level: This refers to the ability to lock down your Excel file by specifying a
password so that users can’t open or modify it. You have two choices here:
 File encryption: When you choose this option, you specify a password and
lock the Excel file. This prevents other users from opening the file. For
more information, see Protect an Excel file.
 Setting a password to open or modify a file: You specify a password to
open or modify a file. Use this option when you need to give Read-only or
edit access to different users. For more information, see Protect an Excel
file.
 Mark as Final: Use this option if you want to mark your Excel file as the
final version and want to prevent any further changes by other users. For
more information, see Add or remove protection in your document,
workbook, or presentation.
 Restrict Access: If your organization has permissions set up using
Information Rights Management (IRM), you can apply any of the available

Addis Ababa City Administration Innovation and Technology Development Bureau 63


IRM permissions to your document. For more information, see Add or
remove protection in your document, workbook, or presentation.
 Digital signature: You can add digital signatures to your Excel file. For
more information, see Add or remove a digital signature in Office files.

Note: To add a digital signature, you need a valid certificate from a


certificate authority (CA).

 Workbook-level: You can lock the structure of your workbook by specifying a


password. Locking the workbook structure prevents other users from adding,
moving, deleting, hiding, and renaming worksheets. For more information on
protecting workbooks, see Protect a workbook.
 Worksheet-level: With sheet protection, you can control how a user can work
within worksheets. You can specify what exactly a user can do within a sheet,
thereby making sure that none of the important data in your worksheet are affected.
For example, you might want a user to only add rows and columns, or only sort
and use AutoFilter. Once sheet protection is enabled, you can protect other
elements such as cells, ranges, formulas, and ActiveX or Form controls. For more
information on protecting worksheets, see Protect a worksheet.

WHICH LEVEL OF PROTECTION SHOULD I USE?

 To control the level of access users should have to an Excel file, use file-level
protection. Let’s say you have a weekly status report of your team members in an
Excel file. You don’t want anyone outside your team to be even able to open the
file. There are two options available:
 If you don’t want others to open your file: You can encrypt the Excel
file, which is the most common technique used. This basically means you
lock it with a password and nobody except you can open it.
 If you want to enable Read-only or editing access to different
users: Maybe, you want the managers in your team to be able to edit the
weekly status report, but team members should only have Read-only
access. You can protect the Excel file by specifying two passwords: one to
open, and the other to modify. You can later share the appropriate
passwords with the team depending on the access they should be given.

Addis Ababa City Administration Innovation and Technology Development Bureau 64


 To control how users should work with worksheets inside a your workbook’s
structure, use workbook-level protection. Let’s say your status report workbook
has multiple worksheets, and each worksheet is named after a team member. You
want to make sure each team member can add data to their own worksheet, but not
be able to modify any of the worksheets in the workbook, whether it be adding a
new worksheet, or moving worksheets around within the workbook.
 To control how users should work within an individual worksheet, use
worksheet-level protection. Let’s say each worksheet in your status report
workbook contains data that is common to all worksheets, like header rows or a
specific report layout, and you really don’t want anyone to change it. By protecting
your worksheet, you can specify that users can only perform specific functions in
a sheet. For example, you can give users the ability to enter data, but keep them
from deleting rows or columns, or only insert hyperlinks or sort data.

You can use one or more levels of protection for your Excel data depending on your/your
organization’s needs. You can choose to use all of the available options or a combination of
options—it’s completely up to the level of security you want for your Excel data. For example,
you may choose to encrypt a shared Excel file, as well as enable workbook and worksheet
protection, while only using worksheet protection on a personal workbook just so you don’t
accidentally delete any formulas.

PROTECT A WORKSHEET

To prevent other users from accidentally or deliberately changing, moving, or deleting data in
a worksheet, you can lock the cells on your Excel worksheet and then protect the sheet with a
password. Say you own the team status report worksheet, where you want team members to
add data in specific cells only and not be able to modify anything else. With worksheet
protection, you can make only certain parts of the sheet editable and users will not be able to
modify data in any other region in the sheet.

Important: Worksheet level protection isn't intended as a security feature. It simply prevents
users from modifying locked cells within the worksheet. Protecting a worksheet is not the
same as protecting an Excel file or a workbook with a password. See below for more
information:

Addis Ababa City Administration Innovation and Technology Development Bureau 65


 To lock your file so that other users can’t open it, see Protect an Excel file.
 To prevent users from adding, modifying, moving, copying, or hiding/unhiding
sheets within a workbook, see Protect a workbook.
 To know the difference between protecting your Excel file, workbook, or a
worksheet see Protection and security in Excel.

The following sections describe how to protect and unprotect a worksheet in Excel for
Windows.

CHOOSE WHAT CELL ELEMENTS TO LOCK

Here's what you can lock in an unprotected sheet:

 Formulas: If you don’t want other users to see your formulas, you can hide them
from being seen in cells or the Formula bar. For more information, see Display or
hide formulas.

 Ranges: You can enable users to work in specific ranges within a protected sheet.
For more information, see Lock or unlock specific areas of a protected worksheet.

ENABLE WORKSHEET PROTECTION

Worksheet protection is a two-step process: the first step is to unlock cells that others can
edit, and then you can protect the worksheet with or without a password.

Step 1: Unlock any cells that needs to be editable

1. In your Excel file, select the


worksheet tab that you want to
protect.

2. Select the cells that others can edit.

3. Right-click anywhere in the sheet and


select Format Cells (or use Ctrl+1,
or Command+1 on the Mac), and
then go to the Protection tab and
clear Locked.

Addis Ababa City Administration Innovation and Technology Development Bureau 66


Step 2: Protect the worksheet

Next, select the actions that users should be allowed to take on the sheet, such as insert or delete
columns or rows, edit objects, sort, or use AutoFilter, to name a few. Additionally, you can
also specify a password to lock your worksheet. A password prevents other people from
removing the worksheet protection—it needs to be entered to unprotect the sheet.

GIVEN BELOW ARE THE STEPS TO PROTECT YOU R SHEET.

1. On the Review tab, click Protect Sheet.

2. In the Allow all users of this worksheet to list, select the elements you want
people to be able to change.

Option Allows users to

Select Move the pointer to cells for which the Locked box is checked on
locked cells the Protection tab of the Format Cells dialog box. By default, users are
allowed to select locked cells.

Addis Ababa City Administration Innovation and Technology Development Bureau 67


Option Allows users to

Select Move the pointer to cells for which the Locked box is unchecked on
unlocked the Protection tab of the Format Cells dialog box. By default, users can
cells select unlocked cells, and they can press the TAB key to move between the
unlocked cells on a protected worksheet.

Format cells Change any of the options in the Format Cells or Conditional
Formatting dialog boxes. If you applied conditional formatting before you
protected the worksheet, the formatting continues to change when a user
enters a value that satisfies a different condition.

Note: Paste now correctly honors the Format cells option. In older versions
of Excel, paste always pasted with formatting regardless of the Protection
options.

Format Use any of the column formatting commands, including changing column
columns width or hiding columns (Home tab, Cells group, Format button).

Format Use any of the row formatting commands, including changing row height or
rows hiding rows (Home tab, Cells group, Format button).

Insert Insert columns.


columns

Insert rows Insert rows.

Insert Insert new hyperlinks, even in unlocked cells.


hyperlinks

Delete Delete columns.


columns
Note: If Delete columns is protected and Insert columns is not protected, a
user can insert columns but cannot delete them.

Delete rows Delete rows.

Note: If Delete rows is protected and Insert rows is not protected, a user
can insert rows but cannot delete them.

Addis Ababa City Administration Innovation and Technology Development Bureau 68


Option Allows users to

Sort Use any commands to sort data (Data tab, Sort & Filter group).

Note: Users can't sort ranges that contain locked cells on a protected
worksheet, regardless of this setting.

Use Use the drop-down arrows to change the filter on ranges when AutoFilters
AutoFilter are applied.

Note: Users cannot apply or remove AutoFilter on a protected worksheet,


regardless of this setting.

Use Format, change the layout, refresh, or otherwise modify PivotTable reports,
PivotTable or create new reports.
reports

Edit objects Doing any of the following:

 Make changes to graphic objects including maps, embedded


charts, shapes, text boxes, and controls that you did not
unlock before you protected the worksheet. For example, if a
worksheet has a button that runs a macro, you can click the
button to run the macro, but you cannot delete the button.

 Make any changes, such as formatting, to an embedded chart.


The chart continues to be updated when you change its
source data.

 Add or edit notes.

Edit View scenarios that you have hidden, making changes to scenarios that you
scenarios have prevented changes to, and deleting these scenarios. Users can change
the values in the changing cells, if the cells are not protected, and add new
scenarios.

3. Optionally, enter a password in the Password to unprotect sheet box and


click OK. Reenter the password in the Confirm Password dialog box and
click OK.

Important:

 Use strong passwords that combine uppercase and lowercase letters,


numbers, and symbols. Weak passwords don't mix these elements.

Addis Ababa City Administration Innovation and Technology Development Bureau 69


Passwords should be 8 or more characters in length. A passphrase that
uses 14 or more characters is better.

 It is critical that you remember your password. If you forget your


password, Microsoft cannot retrieve it.

HOW CAN I TELL IF A SHEET IS PROTECTED?

The Protect Sheet option on the ribbon changes to Unprotect Sheet when a sheet is protected.
To view this option, click the Review tab on the ribbon, and in Changes, see Unprotect Sheet.

UNPROTECT AN EXCEL WORKSHEET

To unprotect a sheet, follow these steps:

1. Go to the worksheet you want to unprotect.

2. Go to File > Info > Protect > Unprotect Sheet, or from the Review tab
> Changes > Unprotect Sheet.

3. If the sheet is protected with a password, then enter the password in the Unprotect
Sheet dialog box and click OK.

PROTECT AN EXCEL FILE

To prevent others from accessing data in your Excel files, protect your Excel file with a
password.

1. Select File > Info.


2. Select the Protect Workbook box and choose Encrypt with Password.
3. Enter a password in the Password box, and then select OK.

Addis Ababa City Administration Innovation and Technology Development Bureau 70


4. Confirm the password in the Reenter Password box, and then select OK.

Addis Ababa City Administration Innovation and Technology Development Bureau 71

You might also like