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

MS Excel (8)

The document provides an overview of Microsoft Excel, detailing its history, features, and functionalities as a vital tool for industrial engineers. It covers the Excel workspace, creating and formatting tables, managing worksheets, and utilizing advanced features like conditional formatting. The course aims to equip users with the skills to effectively use Excel for data analysis and problem-solving in real-world business scenarios.

Uploaded by

kkirbiyik7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

MS Excel (8)

The document provides an overview of Microsoft Excel, detailing its history, features, and functionalities as a vital tool for industrial engineers. It covers the Excel workspace, creating and formatting tables, managing worksheets, and utilizing advanced features like conditional formatting. The course aims to equip users with the skills to effectively use Excel for data analysis and problem-solving in real-world business scenarios.

Uploaded by

kkirbiyik7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

INE 214 MS Excel

INE 214 – Programming Tools for Industrial Engineers

Microsoft Excel

1 INTRODUCTION TO MICROSOFT EXCEL


Microsoft Excel is a spreadsheet application that is widely used by engineers for creating tables,
storing and organizing data, data analysis, data manipulation, charting, and optimization. The first
version of Excel was released in 1985 for the Macintosh and the first Windows version was released in
1987. An Excel workbook consists of sheets and is saved in a *.xlsx file for versions 2007 and later. With
the 1993 version, Excel started supporting programming using Microsoft’s Visual Basic for Applications
(VBA), which is a dialect of the programming language Visual Basic. VBA enables the user to automate
tasks and create user-defined functions through the use of macros. The macro-enabled Excel workbooks
are saved as *.xlsm files.

Today, MS Excel is a highly versatile tool


widely used in various sectors of the business
world. It serves as a critical platform for data
management, analysis, and visualization,
playing a pivotal role in decision-making
processes. From financial forecasting and
budgeting to inventory control, project
management, and complex optimization
tasks, MS Excel enables professionals to
handle a broad range of business functions
with precision and efficiency. Its integration
with other MS Office applications further
enhances its utility, making it indispensable
for data-driven business environments.
Throughout this course, we will explore the
extensive capabilities of MS Excel and how it
can be applied to solve real-world business
problems.

1
INE 214 MS Excel

The following instructions may be a bit different on different versions of MS Excel; however, the
concepts explained are very similar in other versions. More information specific to other versions can be
found in the Excel Help files. Also, Excel files created using earlier versions can be converted to the latest
version by selecting the Convert command at the File tab>>Info page.

Figure 1. Spreadsheets are great tools for tracking data, no matter what the data is!

1.1 MS EXCEL WORKSPACE


Once the MS Excel program is opened, a blank workbook can be created; a new workbook can be
created by choosing a template, or an existing workbook can be opened. The command buttons are
organized in the tabbed Ribbon on top of the workspace shown in Figure 2. The Ribbon includes File,
Home, Insert, Page Layout, Formulas, Data, Review, View, Automate, Developer, and Help tabs.
Contextual tabs appear on the Ribbon when you work with certain items, such as tables, charts, and
pictures. You can add frequently used commands to the Quick Access Toolbar just above the Ribbon
displayed as a drop-down menu arrow.

Figure 2. The Excel Ribbon

2
INE 214 MS Excel

There are three possible workbook/worksheet views: Normal (default Excel view), Page Layout
(used to visualize how the worksheet will appear when printed including headers and footers), Page Break
Preview (used to change the location of page breaks in the workbook when printing data).

2 CREATING AND FORMATTING TABLES AND WORKSHEETS


An Excel worksheet is a matrix of lettered column headings across the top and numbered row
headings down the side. An Excel sheet can have at most 1,048,576 rows and 16,384 columns in the
versions 2007 and later. The last cell possible is the intersection of column XFD and row 1048576 as seen
in Figure 3. Note that the selected cell is shown in the formula bar above the sheet with the column and
row names as XFD1048576.

Figure 3. Upper limit of sheet size

When a range of cells is selected the range is described by the first (top left) and last cell (bottom
right) in the range separated by a colon such as A1:C5 shown in Figure 4.

Figure 4. Selecting a range of cells

The basic workflow when creating tables is as follows:

1. Determine the row/column setup (what data will be stored in each row and column, number of
rows and columns)
2. Set column headings (use meaningful headings that describe the data in each column)
3. Fill in cells
a. You can click the Enter icon (tick mark) on the formula bar to keep the current cell active.

b. Press Tab to move the active cell to the right.


c. Press Enter to move the active cell to the next row.
d. To change the direction of the active cell: Go to File tab>>Options>>Advanced>>Editing
Options and select After Pressing Enter, Move Selection if not already selected and choose
3
INE 214 MS Excel

a direction from the drop-down list. Click OK when finished.

e. You can Copy (Ctrl+C) (or Cut (Ctrl+X)) and Paste (Ctrl+V) the contents in the cells. For
various types of data and formatting, there are special paste options (Figure 5).

Figure 5. Paste Special options

f. You can continue a series by double clicking the Fill Handle that appears on the bottom
right corner of selected cells. You may need to select multiple cells to use the Fill Handle
and if it does not continue series, you will need to choose the Fill Series option from the
box that appears on the bottom right corner of the series.
4. Resize cells where necessary
a. Resize columns to fit the largest cell in that column by double clicking the vertical divider
between two columns.
b. Go to Home tab>>Cells group>>Format, select Row Height or Column Width options to
enter height or width in points where 1 inch is 72 points. You can select AutoFit Height or
AutoFit Width options to fit the rows and columns to the contents automatically.
5. Format cell contents
a. Default formatting is left alignment for text, right alignment for numbers.
b. You can change the alignment by going to Home tab>>Alignment group.
6. Format cell style
a. Text formatting: Click on the cell to be formatted, go to Home tab>>Font group (face, size,
subscript, superscript, color, bold, italicized, underlined), Alignment group (horizontal and
vertical alignment, indentation, Wrap Text for keeping multiple lines of text in a cell), and
Number group (number, currency, date, time, percentage types, decimals).
Note: If you want to constrain the length of text in a cell and type multiple lines instead
of Wrap Text, you need to press Alt+Enter to add a new line of text within the cell.

4
INE 214 MS Excel

Figure 6. Excel text formatting options

b. Cell formatting: Drag mouse over the cells to format and apply formatting, select the
entire row(s) or column(s) to format by clicking on the row button (numbers on the left
side) or column button (letters at the top), select all cells by clicking the Select All button
at the top left corner of the sheet as shown in Figure 7.

Figure 7. Select All button

Another way to format cells is to select the cells to format, right-click, and select Format
Cells… to bring up the dialog box (Figure 8). You can change the alignment, font, borders
(Figure 9), background fill, etc.

Figure 8. Format Cells dialog box Figure 9. Border options

5
INE 214 MS Excel

Common problems about cell formatting


One of the most common frustrations occurs when you try to enter a number—only for Excel to mysteriously
decide that it’s actually a date! Learning to handle such quirks effectively will save you time in your future work
with Excel.

o Check the cell


formatting by right-clicking the
cell, selecting Format Cells, and
changing the format to Number
instead of Date.
o Before entering
numbers, format the cells as
Text to prevent Excel from
automatically interpreting them
as dates.
o Use an apostrophe (')
before typing the number to
force Excel to treat it as text
(e.g., '12/11).
o If you’re importing data
from an external file, ensure
that the column format is set to
Text or Number in the import
settings.
o When copying data,
paste it using the Paste Special
option and select Values to
prevent formatting changes.

6
INE 214 MS Excel

2.1 HIDE AND UNHIDE ROWS AND COLUMNS


• To hide rows (columns), select the rows (columns) to be hidden and go to Home tab>>Cells
group>>Format>>Hide & Unhide and click the Hide Rows (Hide Columns) button.
• To unhide rows (columns), select the rows (columns) on both sides of the hidden rows (columns)
and go to Home tab>>Cells group>>Format>>Hide & Unhide and click the Unhide Rows (Unhide
Columns) button (Figure 11).

Figure 10. Hide columns Figure 11. Unhide columns

2.2 ADD AND REMOVE ROWS, COLUMNS, AND CELLS


• To add a single row (column), select the row (column) below where (to the right of where) you
want a new row (column) and right-click and select Insert (or go to Home tab>>Cells group>>Insert
down arrow and click Insert Sheet Rows [Insert Sheet Columns]).
• To add multiple rows (columns), select the number of rows (columns) you want below the first
row where (to the right of the column) you want to add rows (columns) and right-click and select
Insert.
• You can also add multiple nonadjacent rows (columns) by pressing and holding down the Ctrl key
while selecting the rows (columns) initially.
• To add a cell, select the cells adjacent to where you want to insert the new cells and go to Home
tab>>Cells group>>Insert down arrow and click Insert Cells. On the Insert dialog box, choose the
direction to shift existing cells.

• To merge cells, select cells to combine into one cell and go to Home tab>>Alignment
group>>Merge & Center down arrow and click the appropriate option.

7
INE 214 MS Excel

2.3 ADD, DELETE, MOVE, AND COPY SHEETS


• To add a new sheet, click on the New Sheet button (symbolized with a plus sign) next to the
existing sheet labels.

• To delete a sheet right click on the sheet name and select Delete.

• To move or copy a sheet, right-click on the sheet name and select Move or Copy… to open the
Move or Copy dialog box. You can move or copy the sheet within the same workbook or to
another workbook.

2.4 GROUP AND UNGROUP SHEETS


• To group worksheets, select the first worksheet to include in the worksheet group and press and
hold the Ctrl key while selecting other worksheets to include in the group. When you release the
Ctrl key, the selected sheets will be grouped and any changes made to one sheet will appear on
every sheet in the group. If you select another sheet that is not in the group, the sheets will
become ungrouped.
• To ungroup worksheets, right-click on one of the sheet tabs in the group and select Ungroup
Sheets.

8
INE 214 MS Excel

2.5 ADD AND VIEW COMMENTS


• To add a comment, select the cell where you want the comment, go to Review tab>>Comments
group>>New Comment.
• To view comments, point to or select the cells with a comment represented by a red triangle on
the upper-right corner of the cell. To display comments on the sheet, go to Review
tab>>Comments group>>Show/Hide Comment or Show All Comments.

2.6 LOCK ROWS AND COLUMNS


• You can lock rows and columns so that they remain visible as you scroll. Select the row below the
rows you want to lock (or select the column to the right of the columns you want to lock). Go to
View tab>>Window group and click Freeze Panes.
• To lock rows and columns together, select the cell that is below and to the right of the range you
want to lock. Go to View tab>>Window group and click Freeze Panes.

• To unfreeze rows and columns, go to View tab>>Window group and click Unfreeze Panes.

2.7 SPLIT A WORKSHEET


• You can divide a worksheet into two independent panes of the same data horizontally (or
vertically) to view more data sheets together. By selecting the row below where you want the split
(the column to right of where you want the split), go to View tab>>Window group and click Split.
• The split bar can be removed by
double clicking on it.

9
INE 214 MS Excel

2.8 VIEW WORKSHEETS FROM MULTIPLE WORKBOOKS


• To arrange several Excel sheets from different workbooks, first open the workbooks that contain
the sheets to view.
• Go to View tab>>Window group and click Arrange All. Choose one of the options: Tiled,
Horizontal, Vertical, or Cascade.

2.9 FORMAT PAGE LAYOUT


• Page orientation can be Landscape or Portrait as in MS Word. These options can be found at the
Page Layout tab>>Page Setup group>>Orientation command.
• Page margins can be formatted at the Page Layout tab>>Page Setup>>Margins command.
• Print titles can be added so that the headings appear on every page of the printed workbook. At
the Page Layout tab>>Page Setup group>>Print Titles command the Page Setup dialog box
appears, and you can select rows and columns to repeat on each page. (It can be used to print
long tables, etc.)
• Page breaks can be inserted by selecting the Page Break Preview option, selecting the row above
where the page break is wanted, clicking the Page Layout tab>>Breaks command>>Insert Page
Break button. The page break will be represented by a dark blue line in the Page Break Preview
view and by a solid gray line in Normal view. Automatic page breaks are represented by a
dashed line (Figure 14).
• Headers and footers can be added in the Page Layout view.

10
INE 214 MS Excel

Figure 14

2.10 CONDITIONAL FORMATTING


Conditional formatting allows easier identification of data that matches certain criteria. Rules for
conditional formatting are organized into several types to format cells that compare values, meet specific
values, dates, etc., match top and bottom percentile values you choose, match values above or below an
average, and identify unique or duplicate values.

2.10.1 Compare Cells


This feature is used to highlight comparative values of selected cells using one of the following three styles.
To use this feature, go to Home tab>>Styles group>> Conditional Formatting and select one of the styles.
For additional options, click More Rules at the bottom of the style submenus.
• Data Bars display colored bars in each cell with a length that is proportional to the cell value
compared to the other values selected.
• Color Scales use different colors to differentiate among high to low values in the selected
range.
• Icon Sets use three to five similar icons to differentiate among high to low values.

2.10.2 Format Cells that Match Certain Values or Conditions


This feature is used to format cells that meet specified criteria. To use this feature, go to Home tab>>Styles
group>> Conditional Formatting and select Highlight Cell Rules. You can also click the Top/Bottom Rules
for selecting cells based on top/bottom ranking and based on whether they are above or below the
average of selected values.
• Highlight Cells Rules allows you to find and distinguish cells that meet one or more specific
conditions.
11
INE 214 MS Excel

• Top/Bottom Rules is to identify and emphasize the highest or lowest values within a range
of cells in a worksheet.

2.10.3 Manage Conditional Formatting Rules


You can view, edit, delete, reorder the formatting rules using the Conditional Formatting Rules Manager
opened by clicking the Home tab>>Styles group>>Conditional Formatting>>Manage Rules. For existing
rules, you can select Edit, Delete, Stop If True options or change the order of rules by moving them up or
down. Selecting Stop If True discontinues the application of the rule if the selected rule is satisfied (is
True). To add new rules, you can select the New Rule option and define the rule in the New Formatting
Rule dialog box.

Figure 17. Conditional Formatting Rules Manager

Figure 18. Adding a New Formatting Rule

12
INE 214 MS Excel

3 MATHEMATICAL FEATURES
To add an equation to a cell, start typing the equation by putting an equal sign (=) first. The equal
sign defines the content as an equation instead of text or number and the result of the equation is
displayed. If you would like to type text that begins with an equal sign, type an apostrophe (‘) before the
equal sign as shown in Figure 19.

Figure 19. Entering text that begins with an equal sign

Note: T o view all formulas explicitly in the cells on a sheet, select Formulas tab>>Formula Auditing
group and click Show Formulas button.

Standard mathematical operators are addition (+), subtraction (-), multiplication (*), division (/),
and exponents (^).

Order of operations that Excel uses to calculate formulas is as follows:

1. Operations enclosed in parentheses


2. Exponential calculations
3. Multiplication and division in the order that they appear
4. Addition and subtraction in the order that they appear

3.1 REFERENCING CELLS


Formulas use the data entered in sheets and use cells to reference or locate data. There are
different types of cell references as listed below.

1. Relative references: These references are the default Excel references that move with cells as
cells are copied or moved around a worksheet. It is the most flexible cell reference type.
2. Absolute references: These references are fixed and the cell addresses do not change when
formulas are copied or moved. Absolute references are used for constants in formulas and are
displayed with a dollar sign preceding the reference such as $A$1.
3. Mixed references: These references include one relative and one absolute reference as in $A1
or A$1. Column A is fixed in $A1 and row 1 is fixed in A$1.
4. External (3-D) references: These references are used when referencing cells from other
worksheets or workbooks and such references are displayed in the worksheet and formula bar
as [Workbook name]Worksheet name!A1.

The type of a reference can be changed by selecting the cell address and pressing F4 key to switch
cell referencing in the following order:

• Absolute ($A$1)
• Mixed (relative column, absolute row) (A$1)
• Mixed (absolute column, relative row) ($A1)
• Relative (A1)
13
INE 214 MS Excel

The cell referencing scheme can be changed to R1C1 references where each cell address is
represented by the corresponding row and column number such as R5C4 for cell D5. To use this scheme,
click the File tab>>Options>>Formulas and under Working with Formulas, click the R1C1 Reference Style
checkbox.

Cell reference operators used in an address provide the syntax for referencing cell ranges, unions,
and intersections.

• To reference a range, type a colon (:) between the upper-leftmost cell and the lower-rightmost
cell. For example, SUM(C1:E5).
• To reference a union, type a comma (,) (or semicolon(;)) between separate cell references. For
example, SUM(C1, D3, E5).
• To reference an intersection, type a space (press the Spacebar key) between two range-cell
references with common cells. For example, SUM(C1:D5 C4:E5) where C4, C5, D4, and D5 are
common cells as shown in Figure 20.

Figure 20. Referencing an intersection

Instead of using the default address for cells or ranges, they can be named in a descriptive manner
by typing the desired name in the Name box to the left of the Formula bar. Such names are easier to
remember and quicker to reference than the A1-style cell references. You can use this name box drop-
down menu to go to a named cell.

You can even add comments on the names if you select the range of cells to name and click the
Define Name button at the Formulas tab>>Defined Names group. Edit Name dialog box appears and you
can define the name and add comment for the selected cells. When you want to use the named cell(s),
you can start typing its name and it will appear in the list along with the comment you typed.

14
INE 214 MS Excel

3.2 BUILDING FORMULAS AND USING FUNCTIONS


Formulas are mathematical equations that combine values and cell references with operators to
calculate a result. To enter a formula, select the cell and type equal sign (=) followed by the expression in
the cell (or in the Formula bar) and press Enter key (or the Enter icon displayed as a tick mark on the
Formula bar). You can use a combination of named cells (such as TotalMenuPrice), values (such as 2000),
and cell references (such as D172:D177), for example, TotalMenuPrice+2000+SUM(D172:D177).

Functions are predefined formulas that are used to perform specific tasks. A function consists of
three components:
1. Formula identifier: The equal sign (=) is required at the beginning of the formula.
2. Function name: Each function is identified by its name which is usually an uppercase
abbreviation that is explanatory of the function’s purpose.
3. Arguments: They are the values acted upon by functions to find a result and can be numbers,
cell references, constants, logical values (True/False), or a formula. Arguments are separated
by commas and enclosed in parentheses. The maximum number of arguments a function can
have is 255.

3.2.1 Quick Functions


The results of some commonly used functions, such as Sum, Average, Count, can be displayed on the
status bar below the worksheets by simply selecting a range on the sheet. You can select which functions
to display by right clicking on the status bar as seen in Figure 21.

Figure 21. Quick function results on the status bar

15
INE 214 MS Excel

3.2.2 Entering Functions in Cells


You can type or insert functions on a worksheet.

• Typing a function:
o Select a cell, type an equal sign (=), start typing the function name.
o A list of functions that begin with the typed letters is displayed. Click on a function to
see its description. Double-click on the function you want to use so that the function
name and open parenthesis are inserted in the cell for you.
o Type the required arguments and/or select cell references. Separate arguments with
commas (,). Type the close parenthesis and press Enter (or click Enter tick mark on the
Formula bar).
• Inserting a function:
o Select a cell, go to Formulas tab>>Function Library group and click the relevant function
category button to select a function in that category from the list. To see the
description of a function, point to it.

o Alternatively, select a cell, click the Insert Function button on the Formulas
tab>>Function Library group or press Shift+F3. The Insert Function dialog box shown in
Figure 22 will appear and you can either select a category to find a function from the list
or type a brief description of what you want to do.
o Once a function is selected, its arguments are shown in Function Arguments dialog box,
shown in Figure 23, where you can enter values for the arguments by typing or clicking
cell references. Click OK to complete the function entry.

Figure 22. Insert Function dialog box

16
INE 214 MS Excel

Figure 23. Function Arguments dialog box

3.2.3 AutoSum for Quick Statistics


The AutoSum option can be used to find the sum, average, count, maximum, and minimum of contiguous
numbers quickly by selecting a cell above which or to the left of which the list of values to operate on is
located and clicking AutoSum or by selecting the range of values to be added and clicking AutoSum.

Figure 24. AutoSum options

3.3 SORTING DATA


In order to organize data, you can sort the entire worksheet or a range of cells on the worksheet.
To sort the entire worksheet, select a cell in the column you want the sheet to be sorted by, select the
Data tab>>Ascending (or Descending) order. If you are sorting by text, Ascending option sorts from A to
Z, Descending option sorts from Z to A. If you will sort by multiple columns, you can add sorting levels
using the Sort dialog box. You can also create custom sorts and sort by cell formatting, especially if you
have applied Conditional Formatting on the worksheet.

17
INE 214 MS Excel

Figure 25. Sort dialog box

3.4 CHECKING FOR ERRORS


Excel can find errors and suggest solutions when you click Error Checking at the Formulas
tab>>Formula Auditing group. The Error Checking dialog box shown in Figure 26 appears if there is an
error on the worksheet. You can customize error checking by clicking Options and Formulas and change
the settings shown in Figure 27.

Figure 26. Error Checking dialog box

Figure 27. Error Checking options

3.5 TRACING PRECEDENT AND DEPENDENT CELLS


The cells referenced in a formula or function are called precedent cells. The cells that contain a
formula or function that uses values from other cells is a dependent cell. As an error-correction tool, the
cell dependencies can be visualized by clicking a cell that uses references or is used as a reference by
18
INE 214 MS Excel

another cell and clicking Trace Precedents (or Trace Dependents) at the Formulas tab>>Formula Auditing
group to view the blue arrows that point to the dependent cell from other cells (that point to other cells
from the precedent cell).

Figure 28. Trace Precedents Figure 29. Trace Dependents

3.6 WATCHING A CELL


You can track the changes made to a cell’s value when its precedent cell values are changed by
clicking the Watch Window at the Formulas tab>>Formula Auditing group. Click Add Watch and select
cells to watch. Whenever a change is made to the precedents of the cells watched, the value of these cells
will be updated.

Figure 30. Watch Window

3.7 EVALUATE FORMULA IN PIECES


You can see the value of intermediate steps of a formula, especially if it is a nested and complicated
one, by clicking the Evaluate Formula button at the Formulas tab>>Formula Auditing group. On the
Evaluate Formula dialog box, you can click Evaluate to return the value of the first cell reference or
expression underlined. You can click Evaluate until you reach the value of the cell.

Figure 31. Evaluate Formula dialog box


19
INE 214 MS Excel

4 DATA ORGANIZATION, REPRESENTATION, AND ANALYSIS

4.1 FILTERING DATA


The more content there is on a worksheet, the more difficult it becomes to find information quickly.
Filters can be used to view the information needed by narrowing down data. One way to add filters to
your data is formatting data as a table since tables have filtering by default. You can format data as table
by selecting the cell range and Format as Table command at the Home tab>>Styles group.

After choosing a table style, use the Format As Table dialog box to confirm the cell range and you
can select “My table has headers” if you already have the header row on your worksheet.

Once you click OK, a table is created with drop-down arrows for each column header. You can
choose one of the columns and select only the information you want to view to filter data. For example,
you can select only two cities, Charlotte and Raleigh, to view records with these names in the City
column as shown in Figure 32.

Note: To remove tables from your worksheet, select any cell in the table, click Convert to Range
command on the Design tab>>Tools group. Click Yes on the dialog box that appears. This will also
remove the filters from headers. (Formatting keeps the same.)

Another way to filter data is by choosing the Filter command at the Data tab>>Sort & Filter group.
A drop-down arrow appears in the header cell for each column. Click on the drop-down arrow for the
column you want to filter and choose the data you want to view. The data will be filtered and the
content that does not match the criteria will be temporarily hidden. You can add multiple filters by
adding criteria in other columns while the data is filtered for previous criteria.

To clear filtering, select Clear Filter From “[Column Header]” option from the drop-down list as
shown in Figure 33.

20
INE 214 MS Excel

4.1.1 Advanced Data Filtering


When the standard filtering options are not enough to find the data you need, you can use search, text,
date, or number filtering options.

• Search for data: In the Filter menu, type a search term in the search box and click OK (Figure 34).
• Text filters: In the Filter menu for a column that holds text, choose one of the Text Filters options,
the Custom AutoFilter dialog box will appear, enter the desired text to the right of the filters and
click OK (Figure 35).
• Date filters: In the Filter menu for a column that holds dates, choose one of the Date Filters
options or enter desired dates in the Custom AutoFilter dialog box (Figure 36).
• Number filters: In the Filter menu for a column that holds numbers, choose one of the Number
Filters, the Custom AutoFilter dialog box will appear, enter the desired numbers to the right of
the filters and click OK (Figure 37).

21
INE 214 MS Excel

Figure 34. Filter by searching


Figure 35. Text Filters

Figure 37. Number Filters


Figure 36. Date Filters

22
INE 214 MS Excel

4.2 GROUPING DATA


When your worksheet contains a lot of data, you can organize data in
groups to show and hide certain parts of your worksheet.

To group rows or columns, select them, click the Group command at the
Data tab>>Outline group.

You will see the Hide Detail button with a minus sign (-) on
top of the grouped columns (or to the left of the grouped
rows).

You can show a hidden group by


clicking the Show Detail button with a
plus sign (+).

You can also summarize the grouped data by creating a Subtotal that
creates a hierarchy of groups, called an outline. To use Subtotal, first sort
your column that holds the data you want to subtotal. For example, sort
a list of products by their category if
you want to count the number of
products in each category. Then, click
the Subtotal command at the Data
tab>>Outline group. The Subtotal
dialog box appears. Select the column
heading below “At each change in:”
field. Select the function you want to
use for the “Use function:” field.
Select the column where you want the subtotal to appear in “Add
subtotal to:” field. When satisfied with the selections, click OK. The
data will be outlined into groups with the subtotal listed in new rows
below each group. In the example in Figure 38, data is grouped by
Category ID and the number of products in each category is shown
below each group.

To view groups by level, click on the


Level buttons at the upper-left
corner of the sheet that are
numbered as 1, 2, 3. Level 1 displays
only the grand count, Level 2
displays each subtotal and grand
count. Level 3 displays the highest
level of detail. Figure 38. Adding Subtotal of groups

To remove subtotals and ungroup data: Data tab>>Subtotal command>>Subtotal dialog box>>Remove All

To remove groups without removing subtotals: Data tab>>Ungroup drop-down arrow>>Clear Outline

23
INE 214 MS Excel

4.3 CHARTS
Charts allow you to illustrate data graphically and visualize comparisons between different data
series and trends. Excel has many chart options and it is important to use the right type of chart to
represent data to make it easier for the viewer to interpret the charts.

Types of charts include:

1. Column: Data represented by vertical bars, usually used for comparison of data series
2. Line: Data points are connected with lines, used to show trends in data series
3. Pie: Values are represented as slices of the pie, used to compare proportions/percentages of a
whole
4. Bar: Data represented by horizontal bars, works like Column charts
5. Area: Similar to line charts, areas under the lines are filled
6. Surface: Used to display data across 3-D environment, used with large data sets to display a lot
of information at a glance

To insert a chart, select the data to be


graphed on the worksheet and click the
desired chart type from the Insert
tab>>Charts group.

You can edit the chart layout by adding


chart elements (chart title, axis titles, data
labels, legend, etc.) and the chart style
(background fill, colors, etc.) from the
Design tab so that your chart is easier to
read.

You can change the way your data is


organized by switching row and column
data from the Design tab>>Data group.

4.4 SPARKLINES
Sparklines are mini-charts that can be fit in a cell. These compact charts provide information about
the trends in data without creating entire charts. This saves space and time especially if you have a lot of
data series as well as organizing the visual data representation by keeping charts with the source data.

There are three types of Sparklines:

1. Line: same as Line charts


2. Column: same as Column charts
3. Win/Loss: shows whether each value is positive or negative

To insert Sparklines:

• Select the cell range (a row or column of data) that serves as the data source for the first
Sparkline.

24
INE 214 MS Excel

• Choose the desired Sparkline from the Insert tab>>Sparklines group (Line, Column, or
Win/Loss)
• Choose a cell where the Sparkline will be located on the Create Sparklines dialog box.
• Click OK and the Sparkline will be displayed at the cell you selected in the previous step.
• You can then use the Fill Handle to create Sparklines for the other data series on your
worksheet.

Figure 39. Inserting Sparklines

You can edit the Sparklines by adding data markers for High and Low points and by changing the
Sparkline style and type from the Design tab.

4.5 PIVOT TABLES


Having a lot of data makes it difficult to perform analysis and understand the data. As a data
management tool, PivotTables can be used to summarize and manipulate data easily.

To create a PivotTable, select the data you want to use and click the
PivotTable command at the Insert tab>>Tables group. Choose your settings

25
INE 214 MS Excel

on the Create PivotTable dialog box and click OK. A blank PivotTable and Field List are created on a new
worksheet.

Select the fields to include in the PivotTable. The selected fields will be added to one of the Filters,
Columns, Rows, or Values areas below the field list. You can also click and drag the fields to one of these
four areas to select them and hold and drag existing fields out of these areas. The PivotTable calculates
and summarizes the selected fields. For example, we can display the total number of units sold for each
product type as shown in Figure 40. You can sort or format the PivotTable like regular spreadsheet data.

Figure 40. PivotTable example

To show multiple columns, drag a field from the list to the Columns area. In the example in Figure
41, the total value of sales units for each product type is added to the PivotTable as a column.

Figure 41. PivotTable with multiple columns

26
INE 214 MS Excel

To add a filter to the PivotTable, drag a field to the Filters area, click the drop-down arrow, check
the box for Select Multiple Items and uncheck the box for items to exclude from the PivotTable, as shown
in Figure 42. When you click OK, the PivotTable is updated by excluding the product names you have
unchecked from the summary.

Figure 42. Adding filter to PivotTable

Another way to add filters to PivotTables is selecting Insert Slicers from the Analyze tab>>Filter
group and selecting the field(s) to filter from the Insert Slicers dialog box. Then the slicer appears next to
the PivotTable and you can select or deselect the items to display using the slicer that shows the selected
items highlighted in blue. For example, in Figure 43, Cakes, Cookies, and Pies are selected.

Figure 43. Adding slicers to filter PivotTable

27
INE 214 MS Excel

4.5.1 PivotCharts
PivotCharts are charts that display data from a PivotTable. To insert a PivotChart, select any cell in the
PivotTable and click the PivotChart command from the Insert tab>>Charts group. Select the chart type
and layout and click OK to view the chart. The PivotChart will automatically reflect new data as you make
changes to your PivotTable.

Figure 44. PivotChart example

4.6 WHAT-IF ANALYSIS


4.6.1 Goal Seek
If you need to experiment with your data to
answer some “what-if” questions, you can
use the Goal Seek tool of Excel which allows
you to start with the desired result and
calculate the required input value to obtain
the desired result. For example, if you have
a target grade for a course you are taking
and you have not taken the final exam yet,
then you can use the desired overall grade
as your goal. You need to:

• Select the cell in which you calculate


the result (overall course grade).
• Click What-If Analysis command
from the Data tab>>Data Tools
group and select Goal Seek.
Figure 45. Goal Seek output

28
INE 214 MS Excel

• On the Goal Seek dialog box, select the cell you want to set to a target value and the cell that will
be changed to achieve that target.
• Click OK and Goal Seek will display the required value to reach the specified goal as in Figure 45.

4.6.2 Scenario Manager


Instead of working your way back to the required input value starting from the desired result, you can use
Scenario Manager to substitute multiple values and observe how the results change. To add a scenario:

• Click What-If Analysis command from the Data tab>>Data Tools group and select Scenario
Manager.
• On the Scenario Manager dialog box, click Add.
• On the Add Scenario dialog box, enter Scenario name and choose cells to change.
• On the Scenario Values dialog box, enter values for the cells to change.
• Click OK to complete and see the result of the scenario as in Figure 46.

You can create multiple scenarios with different values for multiple cells and compare their results by
clicking Show or by double-clicking on the scenario name on the Scenario Manager dialog box.

Figure 46. Scenario Manager output

4.6.3 Data Tables


If you would like to try inputting a set of values for multiple variables, you can create a Data Table and
view the results in a table. This is a more powerful data analysis tool since it displays multiple results in a
single table which makes it easier to compare a range of possible scenarios. You can create a Data table
with either one variable or two variables. To create a Data Table with two variables:

• List the possible values of the two variables in a column for one variable and a row for the other
such that they appear as the row labels and column labels of the Data Table. For example, in
Figure 47, we calculate the revenue from selling 300 cups and 200 plates at $8 and $6 per unit,
respectively, in cell B4. We list possible number of cups in the cell range B5:B10 and possible
number of plates in cell range C4:H4.
• On the upper- left corner of the data table (the corner cell between the variable values), enter the
formula that uses the variables. This cell is B4 in our example.

29
INE 214 MS Excel

Figure 47. Creating a Data Table

• Select the cell range that includes the Data Table. We should select B4:H10 in our example.
• Click What-If Analysis command from the Data tab>>Data Tools group and select Data Table.
• Select the row input cell for the variable that will take the values listed in the top row of the Data
Table and the column input cell for the variable that will take the values listed in the leftmost
column of the Data Table. The row input cell is B3 and column input cell is B2 in our example.
• Click OK and the Data Table will be filled with the results generated for all possible scenarios.
Figure 48 displays the revenue for 25 possible scenarios.

Figure 48. Data Table filled with results

30

You might also like