Microsoft Excel Explanatory Handout
Microsoft Excel Explanatory Handout
COLLEGE OF MEDICINE
First Stage 2022- 2023
MICROSOFT EXCEL
Lecturer
Fazil Ahmad Abdulla
Dalia Mohammad Toufiq
CHAPTER
4
MICROSOFT EXCEL 2010
Microsoft Excel 2010 is an electronic spreadsheet software package that allows you to organize data in a
tabular format, perform mathematical calculations, and analyze data. This software includes functions,
formulas, and charts. It is commonly used in business, engineering, mathematics, and statistics.
Technically a worksheet is a single document inside a workbook but we often use the terms worksheet,
spreadsheet and workbook interchangeably. Worksheets contain numerical information presented in tabular
row and column format with text that labels the data. It can also contain graphics and charts.
Microsoft Office Excel 2010 has more rows and columns than ever before with the following new limits:
16,384 (A to ZZZ) columns wide by 1,048,576 rows tall.
GETTING START
To start MS Excel click on the Start Menu on the bottom left corner of your desktop and select Start→ All
Programs→ Microsoft Office →Microsoft Office excel 2010.
The main work area is called a spreadsheet where you can communicate your data using functions,
formulas, and charts. The highlighted cell is called the active cell and is the current place where you can
enter a value or a formula. Getting started with Excel 2010 will notice that there are many features.
There are three features that you should remember as you work within Excel 2010:
OFFICE BUTTON
The Office button (located at the top left of the MS Excel Window) is a drop-
down menu of commands that you can use on MS Excel files. It includes
creating a new file, opening an existing file, saving, and printing. A menu
choice with a right pointing arrow expands to another menu of command
choices.
RIBBON
The ribbon is the panel at the top portion of the document It has seven
tabs: Home, Insert, Page Layouts, Formulas, Data, Review, and View. Each
tab is divided into groups. The groups are logical collections of features
designed to perform function that you will utilize in developing or editing
your Excel spreadsheets.
1
Ribbon
Primary replacement for menus and toolbars made up of tabs, groups, and commands
Tab
Designed to be task-oriented
Each one is made up of several groups to facilitate viewing all of its functions without
opening menus
2
Understanding the Ribbon
The Ribbon is made up of three basic components:
1- Tabs : Commands are organized into tabs on the Ribbon. Each tab contains a different set ofcommands.
There are three different types of tabs:
• Command tabs: These tabs appear by default whenever you open the Excel program. In Excel 2010, the
Home, Insert, Page Layout, Formulas, Data, Review, and View tabs appear by default.
• Contextual tabs: Contextual tabs appear whenever you perform a specific task and offer commands
relative to only that task. For example, whenever you insert a table, the Design tab appears on the Ribbon.
• Program tabs: If you switch to a different authoring mode or view, such as Print Preview, program tabs
replace the default command tabs that appear on the Ribbon.
2- Groups The commands found on each tab are organized into groups of related commands. Forexample,
the Font group contains commands used for formatting fonts. Click the Dialog Box Launcher ( ) in the
bottom-right corner of a group to display even more commands. Some groups also contain galleries that
display several formatting options.
3- Buttons One way to issue a command is by clicking its button on the Ribbon. Buttons are thesmallest
element of the Ribbon.
The Quick Access Toolbar is a customizable toolbar that contains commands that you may want to use.
You can place the quick access toolbar above or below the ribbon. To change the location of the quick
access toolbar, click on the arrow at the end of the toolbar and click Show below the Ribbon.
MINI TOOLBAR
Whenever text is selected within excel a small formatting toolbar will appear above the highlighted text it
will disappear if the mouse cursor is moved away from the toolbar and will reappear when the mouse cursor
is moved over the highlighted text again.
3
Worksheets
You use worksheets to list and analyze data. You can enter and edit data on several worksheets
simultaneously and perform calculations based on data from multiple worksheets. When you create a chart,
you can place the chart on the worksheet with its related data or on a separate chart sheet. The names of the
worksheets appear on tabs at the bottom of the workbook window. The name of the active sheet is bold.
When you save a workbook, you have two choices: Save or Save As. To save a document:
- Click the Microsoft Office Button Click Save
You may need to use the Save As feature when you need to save a workbook under a different name or to
save it for earlier versions of Excel. Remember that older versions of Excel will not be able to open an
Excel 2010 worksheet unless you save it as an Excel 97-2003 Format. To use the Save As feature:
ENTERING DATA
1- Enter numbers or text : On the worksheet, click a cell. Type the numbers or text that you want, and then
4
press ENTER or TAB.
2- To start data on a new line within a cell, enter a line break by pressing
ALT+ENTER.
Select an empty cell below, to the right, above, or to the left of the cell that contains the data that you want
to fill in that cell.
1- On the Home tab, in the Editing group, click Fill, and then click Down, Right, Up, or Left.
2- To quickly fill a cell with the contents of the cell above or to the left of
it, you can press CTRL+D or CTRL+R.
Q2) you can enter text, numbers, Booleans, dates, times, and formulas into a cell.
TEXT : Text is any combination of numbers, spaces, and non-numeric characters. For example, Excel
treats the following entries as text: Zanko, 127AXY, 12-976, 208 4675. All text is left-aligned in a cell by
default.
NUMBER :A number can contain only the following characters: 0 1 2 3 4 5 6 7 8 9 + - ( ) /. All numbers are
right-aligned in a cell by default. Excel ignores leading plus signs (+) and treats a single period as a decimal.
You can use the following characters to format the number: , $ %., e.g. 1,000, $13.25, and 57%.
BOOLEAN : The values TRUE and FALSE are special values called Boolean values. A Boolean
expression in a formula will evaluate to one of these two values. Note that surrounding either TRUE or
FALSE with quotes, e.g. “TRUE”, does NOT indicate a Boolean value, rather a text value.
DATE AND TIME : The way that a date or time is displayed on a worksheet depends on the format applied
to the cell. All dates and times are right-aligned in a cell by default. A date may be a short date, e.g.
11/27/2012, or a long date, e.g. Thursday, November 27, 2012.
Excel only recognizes dates staring from January 1, 1900. Also, Excel treats dates as numbers where
1/1/1900 is the same as 1, 1/2/1900 is the same as 2, and so on.
Tip :You can also right-click the selected cells and then click Insert... on
the shortcut menu. In the Insert dialog box, click the direction in which you
want to shift the surrounding cells.
Tip: If you are deleting a cell or a of cells, in the Delete dialog box, click Shift cells left, Shift cells up,
Entire row, or Entire column. If you are deleting rows or columns, other rows or columns
automatically shift up or to the left.
- The cells will be merged in a row or column, and the cell contents will
be centered in the merged cell.
- To merge cells without centering, click the arrow next to Merge and
Center, and then click Merge Across or Merge Cells.
NOTE If the Merge and Center button is unavailable, the selected cells may be in editing mode.
To cancel editing mode, press ENTER.To change the text alignment in the merged cell, select the cell,
click any of the alignment buttons in the Alignment group on the Home tab.
A single cell Click the cell, or press the arrow keys to move to the cell.
A range of cells Click the first cell in the range, and then drag to the last cell, or hold down
SHIFT while you press the arrow keys to extend the selection.
A large range of Click the first cell in the range, and then hold down SHIFT while you click the
cells last cell in the range. You can scroll to make the last cell visible.
All cells on a Click the Select All button. Also press CTRL+A.
worksheet Note: If the worksheet contains data, CTRL+A selects the current region.
Pressing CTRL+A a second time selects the entire worksheet.
Nonadjacent cells or Select the first cell or range of cells, and then hold down CTRL while you select
cell ranges the other cells or ranges.
Nonadjacent rows Click the column or row heading of the first row or column in your selection;
or columns then hold down CTRL while you click the column or row headings of other
rows or columns that you want to add to the selection.
Cells to the last cell Select the first cell, and then press CTRL+SHIFT+END to extend the selection
on the worksheet of cells to the last used cell on the worksheet (lower-right corner).
Cells to the Select the first cell, and then press CTRL+SHIFT+HOME to extend the
beginning of the selection of cells to the beginning of the worksheet.
worksheet
SORTING
Sort a table of data by first highlighting all the cells in the table and then select Sort
& Filter from the Editing section and choose the order to sort the table.
Filter data in a range
1. Select a range of cells containing alphanumeric data.
2. On the Home tab, in the Editing group, click Sort & Filter, and then click
Filter
3. Click the arrow in the column header.
4. In the list of text values, select or clear one or more text values to filter by.
CELL FORMATTING
Excel provides pre-defined table formatting using the Styles section.
Highlight your table of data and then use the Format as Table drop-
8
down menu to choose a table format for the table heading and entries Change the look of groups of cells
with the Cell Styles drop-down menu (see bottom table, where the cells are colored in light red).
Manage Worksheets
Rename worksheets
Right-click sheet tab and select Rename
Type the new name and press Enter
Change Sheet Tab Color
Right-click sheet tab and select Tab Color
Select Theme Colors, Standard Colors, No Color, or More Colors
Move, delete, copy or add worksheets
Right-click sheet tab and select the desired operation.
FORMULA
A formula is a mathematical expression that evaluates to a single value. It can be used to perform a useful
calculation in a cell. You can construct a formula using any mix of the following components: constants,
mathematical operators, cell references and ranges, and functions.
CONSTANTS
A constant is a number or text value that does not change.
MATHEMATICAL OPERATORS
A mathematical operator specifies a calculation. Common operators are: + (add), - (subtract), *
(multiplication), and / (division).
FUNCTIONS
A function is a pre-defined formula in Excel that you can insert into your formula. Each function is
specified by its name and input arguments and evaluates to a single value.
CREATING FORMULAS
To create a basic formula, use the following procedure:
1) Select with your mouse the cell in which you would like to insert your formula, e.g. A1
2) All formulas must start with an = sign.
3) After you type the = sign, type your syntactically correct formula.
4) Click Enter when you are done.
Parts of a formula
Functions: The PI() function returns the value of pi: 3.142...
References: A2 returns the value in cell A2.
Constants: Numbers or text values entered directly into a formula, such as 2.
Operators: The ^ (caret) operator raises a number to a power, and the * (asterisk) operator multiplies.
Use of parentheses
To change the order of evaluation, enclose in parentheses the part of the formula to be calculated first.
if you use parentheses to change the syntax, Excel adds 5 and 2 together and then multiplies the result by 3
to produce 21.
=(5+2)*3
In the example below, the parentheses around the first part of the formula force Excel to calculate B4+25
first and then divide the result by the sum of the values in cells D5 to F5.
=(B4+25)/SUM(D5:F5)
TIPS: 1-A single quote at the beginning forces Excel to treat a cell entry as text, even if it is a number.
2-To “fix” a cell so that the address won’t update when you copy it, put a $ in front of the column letter
and/or row number.
For a formula being copied: If the reference is: It changes to:
$A$1 (absolute column and absolute row) $A$1
A$1 (relative column and absolute row) C$1
$A1 (absolute column and relative row) $A3
A1 (relative column and relative row) C3
10
CALCULATING WITH FUNCTIONS
One or more functions may be specified in a formula to help calculate a desired final value in a cell. The
most commonly used functions can be found under the AutoSum button, which looks like a summation
symbol in mathematics and found on the Home tab under the Editing.
Q8) Practical question: Consider the following table of student names and homework scores. The block of
cells A1:D5 contain constant values (text and numbers).
To compute the SUM over the column of HW#1 scores in cell B7 perform the following:
Reference operators
Combine ranges of cells for calculations with the following operators.
Reference
operator Meaning Example
: (colon) Range operator, which produces one reference to all the cells B5:B15
between two references, including the two references
, (comma) Union operator, which combines multiple references into SUM(B5:B15,D5:D1
one reference 5)
(space) Intersection operator, which produces on reference to cells B7:D7 C6:C8
common to the two references
11
C-New Name dialog box : This is best used for when you want more flexibility in creating names,
such as specifying a local worksheet level scope or creating a name comment.
NOTE when you use this name, click use in formula and select the name and press Enter.
1- To open the Name Manager dialog box, on the Formula tab, in the Defined Names group, click Name
Manager
2- In the Name Manager dialog box, click the name that you want to change, and then click Edit. You can
also double-click the name.
3-Change the reference in the Refers to box, and click OK.
In the Name Manager dialog box, in the Refers to box, change the cell, formula, or constant
represented by the name.
1. To cancel unwanted or accidental changes, click Cancel , or press ESC.
2. To save changes, click Commit , or press ENTER.
12
The syntax of functions
The following example of the ROUND function rounding off a number in cell A10 illustrates the syntax of a
function.
1) Structure. The structure of a function begins with an equal sign (=), followed
by the function name, an opening parenthesis, the arguments for the function
separated by commas, and a closing parenthesis.
2) Function name. For a list of available functions, click a cell and press
SHIFT+F3.
3) Arguments. Arguments can be numbers, text, logical values such as TRUE or FALSE, arrays or cell
references.
Arguments can also be constants, formulas, or other functions
4) Argument tooltip. A tooltip with the syntax and arguments appears as you type the function. For
example, type =ROUND ( and the tooltip appears. Tooltips only appear for built-in functions.
Statistical functions
Calculate the average of a group of numbers
Let's say you want to find the average number of days to complete a milestone in a project or the average
temperature on a particular day over a 10-year time span. There are several ways to calculate the average of
a group of numbers.
The AVERAGE function measures central tendency, which is the location of the center of a group of
numbers in a statistical distribution. The three most common measures of central tendency are:
Average which is the arithmetic mean, and is calculated by adding a group of numbers and then
dividing by the count of those numbers. For example, the average of 2, 3, 3, 5, 7, and 10 is
30 divided by 6, which is ( 5 ).
Median which is the middle number of a group of numbers; that is, half the numbers have values
that are greater than the median, and half the numbers have values that are less than the median. For
example, the median of 2, 3, 3, 5, 7, and 10 is ( 4 )
Mode which is the most frequently occurring number in a group of numbers. For example, the
mode of 2, 3, 3, 5, 7, and 10 is ( 3 ).
Many statistical functions have the following general format: =FUNCTION( firstcell : lastcell)
13
The Variance (standard error of the mean) is given by the Excel formula:
=VAR (range)
- The COUNTIF() Function : Counts the number of cells within a range that meet the given criteria.
=COUNTIF(range,criteria)
- The COUNTIFS() Function :Counts the number of cells within a range that meet multiple criteria.
COUNTIFS(range1, criteria1,range2, criteria2…)
- Calculate percentage : Click in the cell where you want the percentage to be displayed.
= frequancy cell /N* %100
- The AVERAGE() Function :In Excel, you calculate the arithmetic mean using the AVERAGE()
function:
=AVERAGE(number1[,number2,...])
- The AVERAGEIF() Function : Returns the average (arithmetic mean) of all the cells in a range that
meet a given criteria.
=AVERAGEIF(range,criteria,average_range)
- The AVERAGEIFS() Function :Returns the average (arithmetic mean) of all cells in a range that meet
multiple criteria.
=AVERAGEIFS(average_range,criteria_range1,criteria1,criteria_range2,criteria2…)
- SUMIFS:This function adds all the cells in a range that meets multiple criteria.
=SUMIFS(sum_range,criteria_range1,criteria1,criteria_range2,criteria2…)
- The TRIMMEAN() Function :The TRIMMEAN calculates the mean taken by excluding a percentage
of data points from the top and bottom tails of a data set.
=TRIMMEAN(array,percent)
14
Conditional & Logical Functions
Excel has a number of logical functions which allow you to set various “conditions” and have data respond
to them: IF, AND , OR , NOT , TRUE , FALSE.
For example: The following example checks that two cells, B1 and B2, are both greater than 100.
=AND(B1>100,B2>100)
- The If () Statement: The IF function is used to analyses data, test whether or not it meets certain
conditions and then act upon its decision.
=IF ( logical_test, value_if_true, value_if_false)
Returns one value if a condition you specify evaluates to TRUE and another value if it evaluates to
FALSE.
=IF(B2>50,"Pass","Fail")
NOTE When you need to have more than one condition and more than two possible outcomes, a
NESTED IF is required.
Nested If
When you need to have more than one condition and more than two possible outcomes, a NESTED IF is
required. This is based on the same principle as a normal IF statement, but involves “nesting” a secondary
formula inside the main one. The secondary IF forms the FALSE part of the main statement, as follows;
=IF(1st logic test , 1st true value , IF(2nd logic test , 2nd true value , false value))
(1) The AVERAGE and SUM functions are nested within the IF function.
- Correct# DIV/0! Error: This error occurs when a number is divided by zero (0). Make sure that the
divisor in the function or formula is not zero or blank.
- Correct a #NAME? Error : This error occurs when Microsoft Office Excel doesn't recognize text in a
formula. Make sure that all range references in the formula use a colon (:); for example, SUM(A1:C10).
You Type = SUM(A1C10)
- Correct a #REF! Error: This error occurs when a cell reference is not valid.
Correct a #VALUE! Error: This error occurs when the wrong type of argument is used
B) Trace Dependents
1. Select the cell for which you want to identify the
dependent cells.
2. To display a tracer arrow to each cell that is dependent on the active cell, on the Formulas tab,
in the Formula Auditing group, click Trace Dependents .
C) Remove Trace
1. To remove tracer arrows one level at a time,
2. On the Formulas tab, in the Formula Auditing group, click the arrow next to Remove Arrows.
3. Click Remove Precedent Arrows . To remove another level of tracer arrows, click the
button again.
D) Error Checking
1. Select the worksheet that contain errors ( #DIV/0! ) want to check for errors.
2. On the Formulas tab, in the Formula Auditing group, click Error Checking.
3. The Error Checking dialog box is displayed.
4. Click (Edit in Formula bar) to correct error or (Ignore Error) to cancel check errors.
16
Add, edit, or delete a comment
In Microsoft Office Excel, you can add a note to a cell by
inserting a comment. You can edit the text in comments and
delete comments that you no longer need.
Add a comment
1. Click the cell that you want to add a comment to.
2. On the Review tab, in the Comments group, click New
Comment.
3. In the comment text box, type the comment text.
4. To format the text, select it, and then use the formatting options on the Home tab in the Font group.
5. When you finish typing and formatting the text, click outside of the comment box.
NOTE The Fill Color and Font Color options in the Font group are not available for comment
text. To change the color of the text, right-click the comment, and then click Format Comment.
Delete a comment
1. Click the cell that contains the comment that you want to delete.
2. Do one of the following:
- On the Review tab, in the Comments group, click Delete.
- On the Review tab, in the Comments group, click Show/Hide Comment to display the
comment, double-click the comment text box, and then press DELETE.
Print comments
If your worksheet contains comments, you can print them as they appear on the sheet or at the end of the
sheet.
1. To print the comments in place on the worksheet, display them by doing one of the following:
- To display an individual comment, click the cell that contains the comment, and then on the
Review tab, in the Comments group, click Show/Hide Comment.
- To display all comments, on the Review tab, in the Comments group, click Show All Comments.
2. On the Page Layout tab, in the Page Setup group, click the dialog box launcher next to Page
Setup.
3. On the Sheet tab, in the Comments box, click As
displayed on sheet or At end of sheet.
4. Click Print.
TIP To see how comments are printed, you can click Print Preview before you click Print.
Data Validation
Q14) Practical question: Create a drop-down list from a range of cells
To make data entry easier, or to limit entries to certain items that
you define, you can create a drop-down list of valid entries that is
compiled from cells.
1. To create a list of valid entries for the drop-down list, type the
entries in a single column
2. You may want to sort the data in the order that you want it to
appear in the drop-down list.
3. If you want to use another worksheet, type the list on that
worksheet, and then define a name for the list.
4. Select the blank cells where you want the drop-down list.
5.On the Data tab, in the Data Tools group, click Data
Validation.
6.The Data Validation dialog box is displayed.
7.Click the Settings tab.
8. In the Allow box, click List.
17
9. To specify the location of the list of valid entries, do one of the following:
- If the list is in the current worksheet, enter a reference to your list in the Source box.
- If the list is on a different worksheet, enter the name that you defined for your list in the Source
box.
10. Make sure that the In-cell drop-down check box is selected.
11. To specify whether the cell can be left blank, select or clear the Ignore blank check box.
Select the cells that contain the data you want to use in the chart
Click the Insert tab on the Ribbon
Click the type of Chart you want to create
MODIFY A CHART
Once you have created a chart you can do
several things to modify the chart.
19
COPY A CHART TO WORD
About PivotTable
A PivotTable report is an interactive way to quickly summarize large amounts of data, and to answer
unanticipated questions about your data, use a PivotTable.
Q17) Create a PivotTable
1. Select a cell in a range of cells(table),Make sure that the range of cells has column headings.
2. To create a PivotTable report, on the Insert tab, in the Tables group, click PivotTable, and
then click PivotTable.
3. The Create PivotTable dialog box is displayed.
4. Choose the data that you want to analyze, Click Select a table or range, click ok
5. Choose fields to add to PivotTable report, use the following:
Values: Use to display summary numeric data.
Row Labels : Use to display fields as rows on the side of the
report.
Column Labels: Use to display fields as columns at the top of
the report.
Report Filter:Use to filter the entire report based on the
selected item in the report filter.
Create a macro
To automate repetitive tasks, you can quickly record a macro in Microsoft Office Excel.
Macro: An action or a set of actions that you can use to automate tasks. Macros are recorded in the Visual
Basic for Applications programming language.
Q18) Record a macro: When you record a macro, all steps that are needed to complete the actions that you
want to record are recorded by the macro recorder.
1. On the View tab, in the Macros group, click Record Macro.
2. In the Macro name box, enter a name for the macro.
3. In the Store macro in list, select the workbook in which you want to
store the macro.
4. To assign a CTRL combination shortcut key to run the macro
5. In the Description box, type the text that you want, to describe macro
6. Click OK to start recording.
7. Perform the actions that you want to record.
8. in the Macros group, click Stop Recording .
TIP You can also click Stop Recording on the left side of the status bar.
3. To add a header or footer, click the left, center, or right header or footer text box at the top or
at the bottom of the worksheet page.
4. Type the text that you want.
5. To return to Normal view, on the View tab, in the Workbook Views group, click Normal.
You can also click Normal on the status bar.
Protect worksheet
1. Select the worksheet that you want to protect.
2. On the Review tab, in the Changes group, click Protect sheet.
3. To prevent other users from removing
worksheet protection, in the Password
(optional) box, type a password, click OK,
and then retype the password to confirm it.
21