0% found this document useful (0 votes)
109 views

Lecture Notes On Microsoft Excel

The document provides lecture notes on Microsoft Excel that cover topics such as the Excel interface, working with columns, rows and cells, basic formatting, cell handles, and formulas including SUM, SUMIF, SUMIFS, COUNT, and COUNTIF functions. It includes descriptions of each formula's purpose, syntax, arguments, usage notes and examples. The notes are intended to teach students the basic terms and functions of Excel.

Uploaded by

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

Lecture Notes On Microsoft Excel

The document provides lecture notes on Microsoft Excel that cover topics such as the Excel interface, working with columns, rows and cells, basic formatting, cell handles, and formulas including SUM, SUMIF, SUMIFS, COUNT, and COUNTIF functions. It includes descriptions of each formula's purpose, syntax, arguments, usage notes and examples. The notes are intended to teach students the basic terms and functions of Excel.

Uploaded by

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

LECTURE NOTES

of Microsoft Excel

BUITEMS
BUSHRA HAQ
Table of Contents

An Introduction to Microsoft Excel.............................................................................................................. 1

What Is Microsoft Excel?.......................................................................................................................... 1

General Uses for Excel............................................................................................................................. 1

Basic Excel Terms to be Known................................................................................................................ 2

The Excel Tabs and Ribbon....................................................................................................................... 2

Spreadsheet Options............................................................................................................................... 4

Working with Columns, Rows, and Cells in Excel.......................................................................................... 6

Select an Entire Column or Row............................................................................................................... 6

Select a Group of Columns, Rows, or Cells............................................................................................... 6

Select Adjacent Columns, Rows, or Cells.................................................................................................. 6

Select Scattered Columns, Rows, or Cells................................................................................................. 7

Insert or Delete a Column, Row, or Cell................................................................................................... 8

Adjusting the Size of a Column or Row.................................................................................................... 9

Adjusting the Size to Fit Your Data......................................................................................................... 10

Basic Formatting........................................................................................................................................ 11

Fonts, Shading, and Colors..................................................................................................................... 11

Dates, Currency, and Decimals.............................................................................................................. 12

Dates................................................................................................................................................. 12

Currency............................................................................................................................................ 13

Decimals............................................................................................................................................ 14

i
Additional Number Formats.................................................................................................................. 15

Cell Handles............................................................................................................................................... 16

Select Cell Handle.................................................................................................................................. 16

Move Cell Handle................................................................................................................................... 16

Copy Cell Handle.................................................................................................................................... 17

Fill Cell Handle....................................................................................................................................... 17

Using Formulas in Excel............................................................................................................................. 21

The AutoSum Tool................................................................................................................................. 21

Excel SUM Function............................................................................................................................... 23

Summary........................................................................................................................................... 23

Purpose............................................................................................................................................. 23

Return value...................................................................................................................................... 23

Syntax................................................................................................................................................ 23

Arguments......................................................................................................................................... 23

Usage notes....................................................................................................................................... 24

Examples........................................................................................................................................... 24

Notes................................................................................................................................................. 24

Excel SUMIF Function............................................................................................................................ 24

Summary........................................................................................................................................... 25

Purpose............................................................................................................................................. 25

Return value...................................................................................................................................... 25

Syntax................................................................................................................................................ 25

Arguments......................................................................................................................................... 25

ii
Usage notes....................................................................................................................................... 25

Excel SUMIFS Function........................................................................................................................... 26

Summary........................................................................................................................................... 26

Purpose............................................................................................................................................. 26

Return value...................................................................................................................................... 26

Syntax................................................................................................................................................ 26

Arguments......................................................................................................................................... 26

Usage notes....................................................................................................................................... 27

Examples........................................................................................................................................... 27

Notes................................................................................................................................................. 27

Excel COUNT Function........................................................................................................................... 28

Summary........................................................................................................................................... 28

Purpose............................................................................................................................................. 28

Return value...................................................................................................................................... 28

Syntax................................................................................................................................................ 28

Arguments......................................................................................................................................... 29

Usage notes....................................................................................................................................... 29

Excel COUNTIF Function......................................................................................................................... 29

Summary........................................................................................................................................... 29

Purpose............................................................................................................................................. 30

Return value...................................................................................................................................... 30

Syntax................................................................................................................................................ 30

Arguments......................................................................................................................................... 30

iii
Usage notes....................................................................................................................................... 30

Excel COUNTIFS Function....................................................................................................................... 31

Summary........................................................................................................................................... 31

Purpose............................................................................................................................................. 31

Return value...................................................................................................................................... 31

Syntax................................................................................................................................................ 31

Arguments......................................................................................................................................... 31

Usage notes....................................................................................................................................... 32

Examples........................................................................................................................................... 32

Notes:................................................................................................................................................ 32

Excel AVERAGE Function........................................................................................................................ 33

Summary........................................................................................................................................... 33

Purpose............................................................................................................................................. 33

Return value...................................................................................................................................... 33

Syntax................................................................................................................................................ 33

Arguments......................................................................................................................................... 33

Usage notes....................................................................................................................................... 34

Excel AVERAGEIF Function..................................................................................................................... 34

Summary........................................................................................................................................... 34

Purpose............................................................................................................................................. 34

Return value...................................................................................................................................... 35

Syntax................................................................................................................................................ 35

Arguments......................................................................................................................................... 35

iv
Usage notes....................................................................................................................................... 35

Notes:................................................................................................................................................ 35

Excel AVERAGEIFS Function................................................................................................................... 36

Summary........................................................................................................................................... 36

Purpose............................................................................................................................................. 36

Return value...................................................................................................................................... 36

Syntax................................................................................................................................................ 36

Arguments......................................................................................................................................... 37

Usage notes....................................................................................................................................... 37

Examples........................................................................................................................................... 37

Notes................................................................................................................................................. 38

Excel VLOOKUP Function....................................................................................................................... 38

Summary........................................................................................................................................... 38

Purpose............................................................................................................................................. 39

Return value...................................................................................................................................... 39

Syntax................................................................................................................................................ 39

Arguments......................................................................................................................................... 39

Usage notes....................................................................................................................................... 39

Example 1: Exact match..................................................................................................................... 41

Example 2: Approximate match......................................................................................................... 42

Other notes....................................................................................................................................... 43

v
LECTURE NOTES OF MICROSOFT EXCEL | BUITEMS

An Introduction to Microsoft Excel


Microsoft Excel has been around for decades and many have used it since its release. But
there are still others who are just now starting to use it. Whether for work, school, or personal
use, it can be a little intimidating when you first begin. 

This guide to Excel is for those who have never used it before, are struggling with it as a
beginner, or just want the basics to then learn it on their own.

What Is Microsoft Excel?


In the simplest of terms, Excel is a spreadsheet application. It uses grids of cells within
columns and rows to manipulate, organize, and perform calculations with data. You can use
pivot tables, charts, formulas, and functions in a variety of ways.

That being said, the application is not limited to numbers, although that’s where it “excels.”
You can add text, images, videos, objects, and many other items to help track, manage, and
easily view information.

General Uses for Excel


 Budgets for household or business finances
 Invoices and receipts

BUSHRA HAQ
1
LECTURE NOTES OF MICROSOFT EXCEL | BUITEMS

 Tracking for projects, client and customers, and health records


 Planners and calendars
 Checklists and task lists
 Financial, loan, debt, and mortgage calculations
 Inventory management

The list goes on with the many uses for Excel. So, whatever you plan to use it for, let’s look
at a few of the terms you will need to know.

Basic Excel Terms to be Known


Throughout this guide, you will see the same terms used again and again. Getting familiar
with them will help you to understand the guide and the steps you see.

Workbook and Spreadsheet: A workbook is what you actually use when you open Excel.
The workbook contains the spreadsheets. A workbook can hold many spreadsheets and you
can move between those sheets with the tabs on the bottom of the Excel workbook.

Cell: Spreadsheets are made up of rectangular blocks called cells. A cell contains the data
you enter; from numbers to words to images to formulas, cells hold that information. You can
enter data either directly in the cell or in the formula bar (text box) for the cell right below
your ribbon.

You will also notice the name box (cell indicator) to the left of the formula bar. By default,
this displays the corresponding column and row for the cell. For instance, the cell in the top
left corner of the spreadsheet is A1 for column A, row 1.

Formulas and Functions: You can think of a formula as a calculation or equation. With


Excel, you can create formulas or use built-in ones. These formulas can automatically
calculate numbers for you like addition or multiplication.

In addition to calculations, you can use functions for things like counting the number of items
in a column or displaying a minimum or maximum number for a group of cells.

The Excel Tabs and Ribbon


You should take a little time to familiarize yourself with the ribbon in Excel. Just like with
other Microsoft Office applications, the ribbon holds the buttons that you will use inside tabs.
You can customize the ribbon to remove or add both tabs and buttons. But you will likely see
the tabs below by default.

BUSHRA HAQ
2
LECTURE NOTES OF MICROSOFT EXCEL | BUITEMS

Here is a brief explanation of what each one is for and which button sections you can see.

 File: Create a new workbook, open an existing one, save, print, and share books and
sheets.
 Home: Ctrl the clipboard, font, alignment, numbers, style, cells, and editing.
 Insert: Insert tables, charts, illustrations, filters, and links.
 Draw: Use drawing tools such as a lasso selection, eraser, pen, and highlighter.
 Page Layout: Adjust the spreadsheet theme, page setup, scale-to-fit, and sheet
options.
 Formulas: Pick a formula, function from the library, and perform formula auditing.
 Data: Get and transform data, view queries and connections, sort, filter, and use data
tools.
 Review: Use tools for proofreading, accessibility, language, and comments.
 View: Change the workbook view, items to show, zoom in or out, and work with
windows.

Also, note the TELL ME WHAT YOU WANT TO DO BOX. If you need help or want more
information on a feature, just enter the keyword into the box and view your results.

BUSHRA HAQ
3
LECTURE NOTES OF MICROSOFT EXCEL | BUITEMS

Spreadsheet Options

Managing a large number of spreadsheets is no problem for Excel. So, you can use more than
one if your project calls for it. For example, you can use different spreadsheets for months or
years, product warehouse locations, loan or credit card companies, and healthcare facilities.

Along with multiple sheets, you can take advantage of these basic spreadsheet features.

 Add a spreadsheet: Click the plus button at the bottom next to your last sheet.
 Rearrange spreadsheets: Hold the sheet tab and drag to its new spot in the
workbook.
 Name a spreadsheet: Double-click the sheet tab and type the new name. By default,
you will see them named Sheet 1, Sheet 2, and so on.
 Color a spreadsheet tab: Right-click the sheet tab and under Tab Color, just click to
apply a new one.
 Protect a spreadsheet: Right-click the sheet tab and under Protect Sheet, add a
password and select your options.

BUSHRA HAQ
4
LECTURE NOTES OF MICROSOFT EXCEL | BUITEMS

 Move or copy a spreadsheet: Right-click the sheet tab and select Move or Copy.
You can then move the sheet to another spot in the workbook, move it to a different
workbook, and make a copy of it for either case.
 Delete a spreadsheet: Right-click the sheet tab and click Delete. You will need to
confirm this action in the subsequent pop-up window.

BUSHRA HAQ
5
LECTURE NOTES OF MICROSOFT EXCEL | BUITEMS

Working with Columns, Rows, and Cells in Excel


There are some basics such as selecting, inserting, deleting the columns, rows, and cells in
Excel. These are handy actions to keep in mind as you work with your spreadsheets.

Select an Entire Column or Row


You will notice as you move your mouse over the letters for the columns or numbers for the
rows that a small arrow will appear. If you click at that time, the entire column or row will be
selected. You might use this action for applying a function, formatting, or sorting.

Select a Group of Columns, Rows, or Cells


There may be times when you want to select more than one column, row, or cell. You can do
this in a couple of different ways depending on if they are adjacent or scattered.

Select Adjacent Columns, Rows, or Cells


When you want to select columns, rows, or cells that are next to each other, begin by
selecting the first one. Then, hold down your mouse button and drag through the rest. You
will see them highlight as they are selected. Release the mouse button when you finish.

BUSHRA HAQ
6
LECTURE NOTES OF MICROSOFT EXCEL | BUITEMS

Another way to do this is to select the first one, hold down your Shift key, and then select the
last one. If you do this with cells, you can select an entire group across and down.

Select Scattered Columns, Rows, or Cells


If you would like to select columns, rows, or cells that are not adjacent, start by clicking the
first one. Then, hold down the Ctrl key and continue clicking the ones you want. Release
the Ctrl key when you finish.

BUSHRA HAQ
7
LECTURE NOTES OF MICROSOFT EXCEL | BUITEMS

Insert or Delete a Column, Row, or Cell


You can easily add or get rid of a column or row that you no longer need. Again, put your
mouse over the letter or number, but instead of left-clicking your mouse, right-click. In the
context menu that appears, select either Insert or Delete.

You can also simply hide (and unhide) columns or rows by selecting Hide (or Unhide) from
the context menu.

BUSHRA HAQ
8
LECTURE NOTES OF MICROSOFT EXCEL | BUITEMS

You can insert or delete a cell the same way as a column or row. However, with either option,
you will receive a pop-up alert asking how you would like to shift the cells, row, or column.
Just choose an option and click OK.

Adjusting the Size of a Column or Row


You may want all or some of the columns or rows on your spreadsheet to be a specific size
regardless of the data they hold. Adjusting the width or height is simple and can be done in
two different ways.

First, you select and right-click the column or row. In the context menu choose
either Column Width or Row Height, depending on which one you want to change. In the
pop-up window that appears, you will see the current width or height. Replace it with the
number you want and click OK.

BUSHRA HAQ
9
LECTURE NOTES OF MICROSOFT EXCEL | BUITEMS

Another way to adjust the size of a column or row is to first select it. Move your mouse to the
border until you see a two-sided arrow appear. Then, hold down your mouse button and drag
until you reach the size you want.

Adjusting the Size to Fit Your Data


If you would rather have each column and row sized to accommodate your data, you can do
this in a just a few clicks. First, select the entire spreadsheet by clicking the triangle in the
upper left corner between the A and the 1.

Then, move your mouse between two columns until you see the two-sided arrow and double-
click. Next, do the same for the rows. You will notice both columns and rows of the
spreadsheet adjust to fit the data in your cells. It will automatically adjust for the cell with the
longest amount of data.

BUSHRA HAQ
10
LECTURE NOTES OF MICROSOFT EXCEL | BUITEMS

Basic Formatting
Excel offers a variety of ways to format your spreadsheets, from basic to advanced. Since this
is a beginner’s guide, we will go through some simple formatting tips that you would likely
use.

Fonts, Shading, and Colors

No matter what you decide to use Excel for, basic formatting of columns, rows, and cells can
help you view your data easily. For instance, you may use the first row of a spreadsheet to
insert headers. Like in our example for a product sheet, you might use item number, product
name, and price.

To make that top row stand out better from a large amount of data beneath, you can format it
easily. Select the row and then apply your formatting using options on the Home tab. Here,
you may make the font bold, apply a fill shade, and color the font.

1. Select the top row.


2. Click the Bold
3. Click the arrow next to the Fill Color and pick a color.
4. Click the arrow next to the Font Color and pick a color.

BUSHRA HAQ
11
LECTURE NOTES OF MICROSOFT EXCEL | BUITEMS

Keep in mind that these instructions will apply to the entire first row. If you only have a few
columns, you can follow the steps further above to only select certain cells in that row and
apply the formatting to them alone.

Dates, Currency, and Decimals


If you are creating a tracking spreadsheet, automatic formatting for dates, currency, and
decimals is convenient. And you can apply each of these formatting rules in just a few clicks
from the Home tab.

Dates

You may have a Date column on your spreadsheet for many reasons. When you enter the
data, when you make a purchase, or when an item is due are all just examples.

1. Select the column, row, or cell where you will enter the date.
2. Under Number on your ribbon, click the arrow in the General
3. Select either Short Date or Long Date from the dropdown box.

Note that if you use the Long Date, which inserts words and numbers as shown below, you
do not have to type it in manually. For instance, if you apply a Long Date and enter
“2/14/18” it will automatically populate as “Wednesday, February 14, 2018.”

BUSHRA HAQ
12
LECTURE NOTES OF MICROSOFT EXCEL | BUITEMS

Currency

If you have a spreadsheet for your budget, price list, or invoicing, then you can apply the
currency format easily in two different ways.

Method One

1. Select the column, row, or cell where you will enter the currency.
2. Under Number on your ribbon, click the arrow in the General
3. Select Currency from the dropdown box.

Method Two

The second method allows you to choose the type of currency you would like.

1. Select the column, row, or cell where you will enter the currency.
2. Under Number on your ribbon, click the arrow next to the Currency
3. Select the type of currency you wish to apply.

Whichever method you decide to use, any number that you enter into the applied columns,
rows, or cells will automatically be formatted as that currency.

BUSHRA HAQ
13
LECTURE NOTES OF MICROSOFT EXCEL | BUITEMS

Decimals

You can use the decimal formatting to adjust your currency or simple numbers. For instance,
you may be tracking your student’s grades or even your own where you need decimals. You
can apply this formatting with these two steps.

1. Select the column, row, or cell where you will enter the number.
2. Under Number on your ribbon, click either the Increase Decimal or Decrease
Decimal button depending on your current numbering format.

BUSHRA HAQ
14
LECTURE NOTES OF MICROSOFT EXCEL | BUITEMS

Additional Number Formats

You will also notice under Number on your Home tab, many additional ways to format your
numbers. As you progress with Excel, these may come in handy.

These options include times, fractions, percentages, and others. Plus, you can click the More
number formats link at the bottom to see options like ZIP code, phone number, and custom
choices.

BUSHRA HAQ
15
LECTURE NOTES OF MICROSOFT EXCEL | BUITEMS

Cell Handles
First off, let me tell you about the various cell handles that Excel makes use of. You use a cell
handle by hovering the mouse on various parts of the screen. Fire up Excel and try this for
yourself. Nothing beats a little practice.

I’m going to show you this in Excel 2007, but only the most advanced options are version-
specific. You’ll be fine. One thing though. If you don’t use the default Windows mouse
cursors you might see different sorts of shapes. Change it back to the defaults until you get
the hang of this.

Select Cell Handle

You already use this one, if you use a mouse at all. Hold the mouse anywhere within the
confines of a cell in a spreadsheet, and the mouse cursor becomes a small white cross. Hold
the left button down and drag the mouse to select all the cells you slide over, in a rectangular
shape. That’s it.

Move Cell Handle

BUSHRA HAQ
16
LECTURE NOTES OF MICROSOFT EXCEL | BUITEMS

If you hold the mouse over the edge of a cell, then it behaves differently. It’s quite common
for people to do this by mistake, but it’s easy to avoid if you take a look at the cursor. It
should be a thin black cross with arrow-heads on it.

The move handle does exactly what you would think. It moves the current cell, or the current
block of cells if you have more than one selected. It’s smart though. If the cell you are
moving is referenced by formulae in other cells, each formula is automatically adjusted so
everything still works.

One safety tip. Make sure the cursor isn’t over the small black square in the bottom right
corner of the cell. You’ll be doing something completely different. I’ll explain that soon.

Copy Cell Handle

To copy cells instead of moving them, put the mouse in the same place, and hold down the
Control (Ctrl) key. The cursor changes back to a white arrow, with a small black cross beside
it.

The behavior is a little different now. If you drag the mouse to another location, the cell or
cells you have selected will be copied and pasted there. If the cell contains a formula, it will
change its references just the same as it would if you have used copy and paste. The contents
of the cell you are copying from will not be changed.

Fill Cell Handle


Now this is the interesting one – the Excel fill handle.

BUSHRA HAQ
17
LECTURE NOTES OF MICROSOFT EXCEL | BUITEMS

If you hold the mouse over the bottom right corner of the cell or cells selected, the cursor will
change to a simple black cross. That’s the Excel fill handle, and it does some cool stuff.

First off, if you have a formula in the cell, and you want to copy it to some adjacent cells, you
can do that.

Hold the left button” ¦

“¦and drag the mouse down (or to the right).

Release the mouse.

What happens in this case is the same thing as you would have achieved with the copy
example further up. However, if the cells don’t contain formulae then the behavior is
different.

BUSHRA HAQ
18
LECTURE NOTES OF MICROSOFT EXCEL | BUITEMS

If the cells involved have a discernable pattern, then Excel will attempt to extend that pattern
as best it can.

So, imagine the above example again, but pretend, just for fun, that it contains 500 rows,
instead of the four shown. You’re suddenly required to apply numeric codes to the items” ¦

Create the first two, or however many are needed to establish a pattern. Hover over the fill
handle” ¦

“¦ and drag the cursor down over the next two (or 500) cells.

BUSHRA HAQ
19
LECTURE NOTES OF MICROSOFT EXCEL | BUITEMS

Note the indicator to the right of what the final number will be. Release the mouse.

That’s it. The series of numbers is extended down over the other cells. Note that all the cells
contain the actual values, not a formula.

You can use this for much more complex operations, none of which I have room for in this
post, including complex lists, custom lists, and copying a formatting pattern along with
the value pattern.

BUSHRA HAQ
20
LECTURE NOTES OF MICROSOFT EXCEL | BUITEMS

Using Formulas in Excel


The AutoSum Tool
One of the best time-saving features in Excel is the AutoSum tool. It’s easy to use and can
help reduce calculation errors. And if you are using Excel for a project like income and
expenses or loan and debt management, you will appreciate the AutoSum feature.

This uncomplicated formula tool can add, average, count numbers, or find the minimum or
maximum for a column, row, or group of cells. By default, you should see the AutoSum
button on your Home tab ribbon, all the way to the right. You can also access it from
the Formulas tab.

If you just click the AutoSum button, it will automatically insert the sum function. But if you
click the arrow for the button, you will see the other common formulas you can use
mentioned above.

Say that you have a column of numbers you would like to add. First, click the cell where you
would like the total to display. Next, click the AutoSum button. Excel will automatically
detect the numbers you want to add. They will be highlighted and you can see the formula
which may appear something like this: =SUM (C2:C7)

Note: The equal sign indicates a formula. SUM is the function. And C2:C7 are the cells that


apply.

BUSHRA HAQ
21
LECTURE NOTES OF MICROSOFT EXCEL | BUITEMS

If this looks correct for you, just hit your Enter key. The calculation will pop into the cell
adding those numbers for you.

The other options within AutoSum work similarly. Maybe you need to get the average of a
group of cells. First, click the cell where you want the average to display. Next, click the
arrow for the AutoSum button. Again, Excel will automatically detect the numbers, highlight
the cells, and provide the formula. Click the Enter key to insert the average.

There are many formulas and functions that you can use. Some, like AutoSum, provide very
simple and commonly-used calculations. But many others are advanced and beyond the scope
of this beginner’s lectures of Microsoft Excel. Feel free to check them all out on
the Formulas tab if you like to experiment.

BUSHRA HAQ
22
LECTURE NOTES OF MICROSOFT EXCEL | BUITEMS

Excel SUM Function

Summary 
The Excel SUM function returns the sum of values supplied. These values can be numbers,
cell references, ranges, arrays, and constants, in any combination. SUM can handle up to 255
individual arguments.

Purpose 
Add numbers together

Return value 
The sum of values supplied.

Syntax 
=SUM (number1, [number2], [number3], ...)

Arguments 
 number1 - The first value to sum.

 number2 - [optional] The second value to sum.

BUSHRA HAQ
23
LECTURE NOTES OF MICROSOFT EXCEL | BUITEMS

 number3 - [optional] The third value to sum.

Usage notes 
The SUM function returns the sum of values supplied. These values can be numbers, cell
references, ranges, arrays, and constants, in any combination. SUM can handle up to 255
individual arguments.

Examples
In the example shown, the formula in D12 is:

=SUM(D6:D10) // returns 9.05

References do not need to be next to one another. For example, to sum the cost of apples,
bananas, and kiwis only, you can use a formula like this:

=SUM(D6,D8,D10) // returns 5.55

The SUM function automatically ignores text values without returning an error. This can be
useful in situations like this, where the first instance of a formula would otherwise throw an
error. Excel provides a keyboard shortcut to automatically sum a range of cells above.

Notes
 The SUM function sums values supplied as arguments (up to 255 arguments).
 Arguments can be supplied as numbers, cell references, ranges, arrays, constants, and
results of other formulas or functions.
 The SUM function automatically ignores text values.

Excel SUMIF Function

BUSHRA HAQ
24
LECTURE NOTES OF MICROSOFT EXCEL | BUITEMS

Summary 
SUMIF is a function to sum cells that meet a single criterion. SUMIF can be used to sum
cells based on dates, numbers, and text that match specific criteria. SUMIF supports logical
operators (>, <, <>, =) and wildcards (*,?) for partial matching.

Purpose 
Sum numbers in a range that meet supplied criteria

Return value 
The sum of values supplied.

Syntax 
=SUMIF (range, criteria, [sum_range])

Arguments 
 range - The range of cells that you want to apply the criteria against.

 criteria - The criteria used to determine which cells to add.

 sum_range - [optional] The cells to add together. If sum_range is omitted, the cells in
range are added together instead.

Usage notes 
 When sum_range is omitted, the cells in range will be summed.

 Text criteria, or criteria that includes math symbols, must be enclosed in double
quotation marks (").

 Numeric criteria can be supplied without quotation marks.

 The wildcard characters? and * can be used in criteria. A question mark matches any
one character and an asterisk matches any sequence of characters.

BUSHRA HAQ
25
LECTURE NOTES OF MICROSOFT EXCEL | BUITEMS

 To find a literal question mark or asterisk, use a tilde (~) in front question mark or
asterisk (i.e. ~?, ~*).

Excel SUMIFS Function

Summary 
SUMIFS is a function to sum cells that meet multiple criteria. SUMIFS can be used to sum
values when adjacent cells meet criteria based on dates, numbers, and text. SUMIFS supports
logical operators (>, <, <>, =) and wildcards (*,?) for partial matching.

Purpose 
Sum cells that match multiple criteria

Return value 
The sum of the cells that meet all criteria

Syntax 
=SUMIFS (sum_range, range1, criteria1, [range2], [criteria2], ...)

Arguments 
 sum_range - The range to be summed.

BUSHRA HAQ
26
LECTURE NOTES OF MICROSOFT EXCEL | BUITEMS

 range1 - The first range to evaluate.

 criteria1 - The criteria to use on range1.

 range2 - [optional] The second range to evaluate.

 criteria2 - [optional] The criteria to use on range2.

Usage notes 
Excel's SUMIFS function sums cells in a range using supplied criteria. Unlike the SUMIF
function, SUMIFS can apply more than one set of criteria, with more than one range. The
first range is the range to be summed. The criteria are supplied in pairs (range/criteria) and
only the first pair is required. For additional criteria, supply an additional range/criteria pair.
Up to 127 range/criteria pairs are allowed.

Examples
In the first example, SUMIFS is configured to sum values in column F when the color in
column C is "red". In the second example, SUMIFS will sum values in column F only when
the color is "red" and the state is Texas (TX).

=SUMIFS(F5:F11,C5:C11,"red") // sum if red

=SUMIFS(F5:F11,C5:C11,"red",D5:D11,"TX") // sum if red and TX

Notes
 Each additional range must have the same number of rows and columns as
the sum_range.

 Non-numeric criteria must be enclosed in double quotes, but numeric criteria does not
need quotes except with operators, i.e. ">32"

 The wildcard characters ? and * can be used in criteria. A question mark matches any
one character and an asterisk matches any sequence of characters.

 To find a literal question mark or asterisk, use a tilde (~) in front question mark or
asterisk (i.e. ~?, ~*).

BUSHRA HAQ
27
LECTURE NOTES OF MICROSOFT EXCEL | BUITEMS

 SUMIF and SUMIFS can handle ranges, but not arrays. This means you can't use
other functions like YEAR on the criteria range, since the result is an array. If you
need this functionality, use the SUMPRODUCT function.

 The order of arguments is different between the SUMIFS and SUMIF


functions. Sum_range is the first argument in SUMIFS, but the third argument in
SUMIF.

Excel COUNT Function

Summary 
The Excel COUNT function returns the count of values that are numbers, generally cells that
contain numbers. Values can be supplied as constants, cell references, or ranges.

Purpose 
Count numbers

Return value 
A number representing a count of numbers.

BUSHRA HAQ
28
LECTURE NOTES OF MICROSOFT EXCEL | BUITEMS

Syntax 
=COUNT (value1, [value2], ...)

Arguments 
 value1 - An item, cell reference, or range.

 value2 - [optional] An item, cell reference, or range.

Usage notes 
The COUNT function counts the number of numbers in supplied values. Values can be
items, cell references, or ranges. For example, =COUNT (1, 2, "apple") returns 2. And
COUNT (A1:A10) will count the number of numeric values in the range A1:A10.

 Count can handle up to 255 additional values.

 Use COUNTA to include text and logical values. Use COUNTIF to count based on
criteria.

 Error values or text values that cannot be coerced into numbers are not counted

 The logical values TRUE and FALSE are not counted.

 Empty cells and text are not counted.

Excel COUNTIF Function

BUSHRA HAQ
29
LECTURE NOTES OF MICROSOFT EXCEL | BUITEMS

Summary 
COUNTIF is a function to count cells that meet a single criterion. COUNTIF can be used to
count cells with dates, numbers, and text that match specific criteria. The COUNTIF function
supports logical operators (>,<,<>,=) and wildcards (*,?) for partial matching.

Purpose 
Count cells that match criteria

Return value 
A number representing cells counted.

Syntax 
=COUNTIF (range, criteria)

Arguments 
 range - The range of cells to count.

 criteria - The criteria that controls which cells should be counted.

BUSHRA HAQ
30
LECTURE NOTES OF MICROSOFT EXCEL | BUITEMS

Usage notes 
The COUNTIF function in Excel counts the number of cells in a range that match the
supplied criteria. Non-numeric criteria need to be enclosed in double quotes but numeric
criteria do not:

=COUNTIF(A1:A10,100) // count cells equal to 100

=COUNTIF(A1:A10,">32") // count cells greater than 32

=COUNTIF(A1:A10,"jim") // count cells equal to "jim"

=COUNTIF(A1:A10,"<"&B1) // count cells less than value in B1

The wildcard characters ? and * can be used in criteria. A question mark matches any one
character and an asterisk matches any sequence of characters. To find a literal question mark
or asterisk, use a tilde (~) in front question mark or asterisk (i.e. ~?, ~*).

Excel COUNTIFS Function

BUSHRA HAQ
31
LECTURE NOTES OF MICROSOFT EXCEL | BUITEMS

Summary 
The Excel COUNTIFS function returns the count of cells that meet one or more criteria.
COUNTIFS can be used with criteria based on dates, numbers, text, and other conditions.
COUNTIFS supports logical operators (>, <, <>, =) and wildcards (*,?) for partial matching.

Purpose 
Count cells that match multiple criteria

Return value 
The number of times criteria are met

Syntax 
=COUNTIFS (range1, criteria1, [range2], [criteria2], ...)

Arguments 
 range1 - The first range to evaluate.

 criteria1 - The criteria to use on range1.

 range2 - [optional] The second range to evaluate.

 criteria2 - [optional] The criteria to use on range2.

Usage notes 
COUNTIFS counts the number of cells in a range that match supplied criteria. Unlike the
COUNTIF function, COUNTIFS can apply more than one set of criteria, with more than one
range. Ranges and criteria are applied in pairs, and only the first pair is required. For each
additional criterion, you must supply another range/criteria pair. Up to 127 range/criteria
pairs are allowed.

BUSHRA HAQ
32
LECTURE NOTES OF MICROSOFT EXCEL | BUITEMS

Examples
With the example shown, COUNTIFS can be used to count records using 2 criteria as
follows:

=COUNTIFS(C5:C14,"red",D5:D14,"TX") // red and TX

=COUNTIFS(C5:C14,"red",F5:F14,">20") // red and >20

Notes:
 Each additional range must have the same number of rows and columns as range1, but
ranges do not need to be adjacent. If you supply ranges with a mismatch, you'll get a
#VALUE error.

 Non-numeric criteria need to be enclosed in double quotes but numeric criteria do not.
For example: 100, "100", ">32", "jim", or A1 (where A1 contains a number).

 The wildcard characters ? and * can be used in criteria. A question mark matches any
one character and an asterisk matches any sequence of characters.

 To find a literal question mark or asterisk, use a tilde (~) in front question mark or
asterisk (i.e. ~?, ~*).

Excel AVERAGE Function

BUSHRA HAQ
33
LECTURE NOTES OF MICROSOFT EXCEL | BUITEMS

Summary 
The Excel AVERAGE function returns the average of values supplied as multiple arguments.
AVERAGE can handle up to 255 individual arguments, which can include numbers, cell
references, ranges, arrays, and constants.

Purpose 
Get the average of a group of numbers

Return value 
A number representing the average.

Syntax 
=AVERAGE (number1, [number2], ...)

Arguments 
 number1 - A number or cell reference that refers to numeric values.

 number2 - [optional] A number or cell reference that refers to numeric values.

BUSHRA HAQ
34
LECTURE NOTES OF MICROSOFT EXCEL | BUITEMS

Usage notes 
1. The AVERAGE function returns the average (arithmetic mean) of a group of supplied
numbers.

2. To calculate the average, Excel adds the numbers together and divides by the total
number of numbers. For example, AVERAGE (2,4,6) returns 4.

3. Numbers can be supplied as numbers, ranges, named ranges, or cell references that


contain numeric values. Up to 255 numbers can be supplied.

4. The AVERAGE function will automatically ignore empty cells.

Excel AVERAGEIF Function

Summary 
The Excel AVERAGEIF function computes the average of the numbers in a range that meet
the supplied criteria. The criteria for AVERAGEIF supports logical operators (>,<,<>,=) and
wildcards (*,?) for partial matching.

Purpose 
Get the average of numbers that meet criteria

BUSHRA HAQ
35
LECTURE NOTES OF MICROSOFT EXCEL | BUITEMS

Return value 
A number representing the average.

Syntax 
=AVERAGEIF (range, criteria, [average_range])

Arguments 
 range - One or more cells, including numbers or names, arrays, or references.

 criteria - A number, expression, cell reference, or text.

 average_range - [optional] The cells to average. When omitted, range is used.

Usage notes 
AVERAGEIF computes the average of the numbers in a range that meet the
supplied criteria. If average_range is not supplied, the cells in range are averaged.
If average_range is supplied, cells cells in average_range that correspond to cells
in range are averaged.

To determine which cells are averaged, criteria is applied to range. Criteria can be supplied


as numbers, strings, or references. For example, valid criteria could be 10, "10" ">10", or
A1.

Notes:
 Cells in range that contain TRUE or FALSE are ignored.

 Empty cells are ignored in range and average_range when calculating averages.

 AVERAGEIF returns #DIV/0! if no cells in range meet criteria.

 Average_range does not have to be the same size as range. The top left cell
in average_range is used as the starting point, and cells that correspond to cells
in range are averaged.

BUSHRA HAQ
36
LECTURE NOTES OF MICROSOFT EXCEL | BUITEMS

 AVERAGEIF allows the wildcard characters question mark (?) and asterisk (*), in
criteria. The ? matches any single character and the * matches any sequence of
characters. To find a literal ? or *, use a tilde (~) before the character, i.e. ~* and ~?.

Excel AVERAGEIFS Function

Summary 
The Excel AVERAGEIFS function calculates the average of numbers in a range that meet
one or more supplied criteria. The criteria in AVERAGEIFS supports logical operators
(>,<,<>,=) and wildcards (*,?) for partial matching.

Purpose 
Average cells that match multiple criteria

Return value 
The average of the cells that meet all criteria

Syntax 
=AVERAGEIFS (avg_rng, range1, criteria1, [range2], [criteria2], ...)

BUSHRA HAQ
37
LECTURE NOTES OF MICROSOFT EXCEL | BUITEMS

Arguments 
 avg_rng - The range to average.

 range1 - The first range to evaluate.

 criteria1 - The criteria to use on range1.

 range2 - [optional] The second range to evaluate.

 criteria2 - [optional] The criteria to use on range2.

Usage notes 
The AVERAGEIFS function can calculate an average based on more than one criteria. The
first range given to AVERAGEIFS is the range containing numbers to average. Criteria are
supplied in pairs [range, criteria] and only the first pair is required. For each additional
criteria, supply another range/criteria pair. The criteria given to AVERAGEIFS are applied
with AND logic. Data must meet all criteria to be included in the average. Criteria can
include wildcards.

Examples
To average values in A1:A10, where B1:B10 = "A", and C1:C10 > 5, you can use:

=AVERAGEIFS(A1:A10,B1:B10,"A",C1:C10,">5")

In the example shown, the formulas in H6:H8 are:

=AVERAGEIFS(prices,prices,">0",prices,"<500000")

=AVERAGEIFS(prices,beds,">=2",baths,">1")

=AVERAGEIFS(prices,prices,">0")

where "prices" (C6:C15), "beds" (D6:D15), and "baths" (E6:E15) are named ranges.

Note: the order of arguments is different between the AVERAGEIFS and AVERAGEIF
functions. The range to average is the first argument in AVERAGEIFS, but
the third argument in AVERAGEIF.

BUSHRA HAQ
38
LECTURE NOTES OF MICROSOFT EXCEL | BUITEMS

Notes
 If no data matches criteria, AVERAGEIFS returns the #DIV0! error 

 Each additional range must have the same number of rows and columns as
the avg_range.

 Non-numeric criteria need to be enclosed in double quotes but numeric criteria do not.
For example: 100, "100", ">32", "jim", or A1 (where A1 contains a number).

 The wildcard characters ? and * can be used in criteria. A question mark matches any
one character and an asterisk matches any sequence of characters.

 To find a literal question mark or asterisk, use a tilde (~) in front question mark or
asterisk (i.e. ~?, ~*).

Excel VLOOKUP Function

BUSHRA HAQ
39
LECTURE NOTES OF MICROSOFT EXCEL | BUITEMS

Summary 
VLOOKUP is an Excel function to lookup and retrieve data from a specific column in table.
VLOOKUP supports approximate and exact matching, and wildcards (* ?) for partial
matches. The "V" stands for "vertical". Lookup values must appear in the first column of the
table, with lookup columns to the right.

Purpose 
Lookup a value in a table by matching on the first column

Return value 
The matched value from a table.

Syntax 
=VLOOKUP (value, table, col_index, [range_lookup])

Arguments 
 value - The value to look for in the first column of a table.

 table - The table from which to retrieve a value.

 col_index - The column in the table from which to retrieve a value.

 range_lookup - [optional] TRUE = approximate match (default). FALSE = exact


match.

Usage notes 
VLOOKUP is designed to retrieve data in a table organized into vertical rows, where each
row represents a new record. The "V" in VLOOKUP stands for vertical:

BUSHRA HAQ
40
LECTURE NOTES OF MICROSOFT EXCEL | BUITEMS

If you have data organized horizontally, use the HLOOKUP function.

VLOOKUP only looks right

VLOOKUP requires a lookup table with lookup values in the left-most column. The data you
want to retrieve (result values) can appear in any column to the right:

VLOOKUP retrieves data based on column number

When you use VLOOKUP, imagine that every column in the table is numbered, starting from
the left. To get a value from a particular column, simply supply the appropriate number as the
"column index":

BUSHRA HAQ
41
LECTURE NOTES OF MICROSOFT EXCEL | BUITEMS

=VLOOKUP(H3,B4:E13,2,FALSE) // first
=VLOOKUP(H3,B4:E13,3,FALSE) // last
=VLOOKUP(H3,B4:E13,4,FALSE) // email

VLOOKUP has two matching modes, exact and approximate

VLOOKUP has two modes of matching: exact and approximate, which are controlled by the
4th argument, called "range_lookup". Set range_lookup to FALSE to force exact matching,
and TRUE for approximate matching.

Important: range_lookup defaults to TRUE, so VLOOKUP will use approximate matching by


default:

=VLOOKUP(value, table, column) // default, approximate match


=VLOOKUP(value, table, column, TRUE) // approximate match
=VLOOKUP(value, table, column, FALSE) // exact match

Example 1: Exact match


In most cases, you'll probably want to use VLOOKUP in exact match mode. This makes
sense when you have a unique key to use as a lookup value, for example, the movie title in
this data:

BUSHRA HAQ
42
LECTURE NOTES OF MICROSOFT EXCEL | BUITEMS

The formula in H6 to lookup year based on an exact match of movie title is:

=VLOOKUP(H4,B5:E9,2,FALSE) // FALSE = exact match

Example 2: Approximate match


You'll want to use approximate mode in cases when you're looking for the best match, not an
exact match. A classic example is finding the right commission rate based on a monthly sales
number. In this case, you want VLOOKUP to get you the best match for a given lookup
value. In the example below, the formula in D5 performs an approximate match to retrieve
the correct commission.

BUSHRA HAQ
43
LECTURE NOTES OF MICROSOFT EXCEL | BUITEMS

=VLOOKUP(C5,$G$5:$H$10,2,TRUE) // TRUE = approximate match

Note: your data must be sorted in ascending order by lookup value when you use
approximate match mode with VLOOKUP.

Other notes
 Range_lookup controls whether value needs to match exactly or not. The default is
TRUE = allow non-exact match.

 Set range_lookup to FALSE to require an exact match and TRUE to allow a non-


exact match.

 If range_lookup is TRUE (the default setting), a non-exact match will cause the
VLOOKUP function to match the nearest value in the table that is still less
than value.

 When range_lookup is omitted, the VLOOKUP function will allow a non-exact


match, but it will use an exact match if one exists.

 If range_lookup is TRUE (the default setting) make sure that lookup values in the
first row of the table are sorted in ascending order. Otherwise, VLOOKUP may return
an incorrect or unexpected value.

 If range_lookup is FALSE (require exact match), values in the first column


of table do not need to be sorted.

BUSHRA HAQ
44

You might also like