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

AGENDA

Summarizing Data- Advanced Techniques

Database Operations & Conditional Scrutiny

Data Refining, Pivot Tables & Information Extraction

Automating Excel using VBA


EMPLOYEES ARE
MOTIVATED BY:

Lorem ipsum dolor sit


amet, consectetur
adipiscing elit.
65

80%
%
Lorem ipsum dolor sit
amet, consectetur
adipiscing elit.
50
%
Lorem ipsum dolor sit
amet, consectetur

People Think they already know Excel


80
%
adipiscing elit.

Lorem ipsum dolor sit

What about you?


35
amet, consectetur
adipiscing elit.
%
YOURSELF
TEST HOW MUCH DO YOU KNOW
ALREADY?
Did you ever use excel to Year, Month, Day, Hour,
Can you communicate with
manipulate text strings in Minute, Second, Working IF, AND, OR, IFERROR,
excel easily? Mutual
excel? Changing case, days, Days between two ISERROR,NOT,IFNA,
understanding matters
Finding Specific Words dates, Today, Now, NESTED CONDITINS etc.
most.
etc.? EOMONTH, EDATE etc.?

Syntax Text Date-Time Logic

Pre Assessment
Please provide your feedback on
topics listed here to help me choose
relevant topics to teach you.
This shall ensure a most productive
session for all of us.

Conditions Statistics Formatting Top Gear


VLOOKUP, HLOOKUP,
How to find, Min, Max, Formula based formatting of Pivot Tables, Power Pivot,
LOOKUP,INDEX MATCH,
Median, Mode, Average, cells, rows and columns. Power Query, power BI,
OFFSET, SUMIFS,
Rank, Small and Large Automation of Validation VBA, UDF, Procedures,
COUNTIFS, AVERAGEIFS
Numbers from data? Rules, Number Formats etc. Modules, Forms, Database.
etc.
Section-1

Excel Basics

Formula Syntax, Auditing Tools, Watch Window, View Settings, Cell Reference
Types, Error Types, Short-cut Keys, Data Validation, Fixed & Volatile Functions etc.
F o r m ul a S y n t ax

All Excel formulas start with a


“=“ and can either be selected
from the formula library or typed
directly into the formula bar
As you begin to type a formula, a pop-up will appear to guide you through each step, shown in bold

A1 A1:C4 A1,C4
Single-cell references describe a Array references describe a Non-contiguous references
cell’s location within a worksheet, in contiguous group of cells based describe selections of individual
terms of the intersection between a on the location of the top-left (A1) cells that do not share a common
column (A through XFD), and a row and the bottom-right (C4) cells, border, separated by a “,”
(1 through 1,048,576) separated by a “:”
F o r m u l as Ta b / A u d i t i n g T o o ls

AUDITING TOOLS:
Trace Precedents/Dependents shows
which cells affect or are affected by the
value of the selected cell

Show Formulas displays all of the


formulas in the sheet as text

FORMULA LIBRARY: Evaluate Formula allows you to step into a


formula and determine the output of each
Includes a list of all common formulas, component parts, and
component
brief descriptions of how each formula works
R e f e r e nc e T y p es

Hold the phone, how come some cell references include a “$”?

These are used to create Fixed, Relative, or Mixed References; the $ basically locks a
specific cell range or reference so that it does not change if you apply the formula to other cells

For Example:
$A$1 = Fixed column, Fixed row
A$1 = Relative column, Fixed row
$A1 = Fixed column, Relative row
A1 = Relative column, Relative row

PRO TIP:
Select part of your formula with the
cursor and use “F4” to quickly scroll
through reference types. ALWAYS
THINK ABOUT YOUR REFERENCES
F u n c t i on S h o r t c u ts

The F4 function is used for two helpful shortcuts:


1) Adding or modifying cell reference types A1
With your cursor selecting any cell reference or array within a formula,
the F4 key will cycle through fixed, relative, and absolute reference types
A$1 $A$1
2) Repeating your last command or action $A1
F4 will also repeat the last user action, such as inserting/deleting rows or columns,
changing cell format or style, etc. (Note: F4 will not repeat entered values or formulas)

The F2 function displays the cell ranges that are tied to a given formula

PRO TIP:
Use F2 to help diagnose formula errors or make
quick adjustments to cell references and arrays
C o m m on E x c el E r r o rs

Error Type What it means How to fix it

Column isn’t wide enough to display values Drag or double-click column border to increase width, or right-
###### click to set custom column width

Make sure that function names are correct, references are valid
#NAME? Excel does not recognize text in a formula
and spelled properly, and quotation marks and colons are in place

Check that your formula isn’t trying to perform an arithmetic


#VALUE! Formula has the wrong type of argument
operation on text strings or cells formatted as text

Check the value of your divisor; if 0 is correct, use an IF statement


#DIV/0! Formula is dividing by zero or an emptycell to display an alternate value if you choose

Make sure that you didn’t move, delete, or replace cells that are
#REF! Formula refers to a cell that it notvalid
referenced in your formula
I F E R RO R S t a t e m e nt

The IFERROR statement is an excellent tool to eliminate annoying error messages


(#N/A, #DIV/0!, #REF!, etc.), which is particularly useful for front-end formatting

=IFERROR(value, value_if_error)
Formula or value (which may or may not result in an error) Value returned in the case of an error

In this case we’re replacing an error caused by =IFERROR(A1/B1,“Invalid Formula")


the A1/B1 formula with “Invalid Formula”, and an
error caused by a VLOOKUP function with “-” =IFERROR(VLOOKUP(A1,D1:E4,2,0),"-")

PRO TIP:
If you’re writing a formula that may trigger an error (i.e. a VLOOKUP where not all values
have a match), WRITE THE FULL FORMULA FIRST then wrap it in an IFERROR statement
CTRL S h o r t c u ts

The CTRL function can be combined with a variety of keys, such as:

1) CTRL- ARROW
Jumps to the left, right, top, or bottom edge CTRL-SHIFT-RIGHT ARROW
(i.e. last non-blank cell) of a contiguous data array

2) CTRL-SHIFT-ARROW
Extends a selection to the left, right, top, or bottom CTRL-SHIFT-DOWN ARROW

edge (i.e. last non-blank cell) of a data array

3) CTRL-PAGE UP/DOWN
Jumps between tabs of a workbook

FULL LIST: http://office.microsoft.com/en-us/excel-help/excel-shortcut-and-function-keys-HP010073848.aspx


A LT Key T i ps

The ALT function enables Key Tips, which allow you to access any function in
the ribbon using keyboard shortcuts (Note: you do not need to hold down ALT)

1)Press ALT to reveal


tab-level shortcuts:

2)Press the key for the tab you want


(i.e. H) to reveal additional shortcuts:

3) Continue to press shortcut keys PRO TIP:


(i.e. V) to drill into specific functions: Use ALT-H-V-V to paste as values
or ALT-H-V-F to paste as formulas
F i x ed vs. V o l a t i le F u n c t i o ns

Volatile Functions are functions or formulas in Excel that change every time the
workbook recalculates (i.e. any time you enter data anywhere in any open workbook)

Handle with Care: Common volatile functions include


NOW(), TODAY(), RAND(), OFFSET() & INDIRECT()

PRO TIP:
To control when Excel recalculates, change the Calculation Options
to “Manual” in the Formulas tab (just don’t forget you changed it!)
Section-2

Logical & Conditional


Functions

IF, AND, OR, IFERROR, ISFORMULA, ISERROR, ISBLANK, ISEVEN, ISODD,


ISNUMBER, ISTEXT, SUMIF, COUNTIF, AVERAGEIF, DSUM, DAVERAGE, DMAX,
DMIN, DSTDEV, DVAR & MUCH MORE.
COUNTIF/SUMIF/AVERAGEIF

The COUNTIF, SUMIF, and AVERAGEIF formulas calculate a sum, count, or average
based on specific criteria
=COUNTIF(range, criteria)
=SUMIF(range, criteria, sum_range)
=AVERAGEIF(range, criteria, average_range)

Which cells need to Under what condition do I Where are the values
match your criteria? want to sum, count, or that I want to sum or
average? average?

COUNTIF(B2:B20,22) = 2
SUMIF(A2:A20,“Ryan”,B2:B20) = 190
SUMIF(A2:A20,“<>Tim”,B2:B20) = 702
AVERAGEIF(A2:A20,“Maria”,B2:B20) = 45.75
COUNTIFS/SUMIFS/A VERAGEIFS

COUNTIFS, SUMIFS, and AVERAGEIFS are used when you want to evaluate a
count, sum, or average based on multiple conditions or criteria
=COUNTIFS(criteria_range1, criteria1, criteria_range2 , criteria2…)
=SUMIFS(sum_range, criteria_range1, criteria1, criteria_range2 , criteria2…)
=AVERAGEIFS(average_range, criteria_range1, criteria1, criteria_range2 , criteria2…)

COUNTIFS(B2:B13,“Search”, D2:D13,“>200”) = 3
SUMIFS(D2:D13, A2:A13,“Feb”,B2:B13,“Display”) = 734
AVERAGEIFS(D2:D13, A2:A13,“Jan”,C2:C13,“MSN”) = 263

PRO TIP:
If you use < or >, you need to add quotation
marks as you would with text (i.e. “>200”)
Section-3

Statistical Functions

Mean, Median, Mode, Min, Max, Small, Large, Rank, Percentiles, PercentRank,
Standard Deviation, Variance, Correlation etc.
Bonus: Dashboard using skills learned till now
Basic Stats F u n c t i o ns

The Count, Average, Median, Mode, Max/Min, Percentile and Standard


Deviation/Variance functions are used to perform basic calculations on a data array

=COUNT(A2:A20)
=AVERAGE(A2:A20)
=MEDIAN(A2:A20)
=MODE(A2:A20)
=MAX(A2:A20)
=MIN(A2:A20)
=PERCENTILE(A2:A20,.25)
=PERCENTILE(A2:A20,.75)
=STDEV(A2:A20)
=VAR(A2:A20)
RANK/SMALL/LARGE

RANK(A2,A2:A8) = 2
RANK(A3,A2:A8) = 7 (lowest) The RANK function returns the rank of a
RANK(A4,A2:A8) = 6
particular number among a list of values
RANK(A5,A2:A8) = 1 (highest)
RANK(A6,A2:A8) = 4
RANK(A7,A2:A8) = 3
RANK(A8,A2:A8) = 5

LARGE(A2:A8,2) = 90
(the 2nd largest number in the array is90)
The SMALL/LARGE functions return the
nth smallest/largest values within an array
SMALL(A2:A8,3) = 50
(the 3rd smallestnumber in the array is 50)
PERCENTRANK

PERCENTRANK returns the rank of a value as


a percentage of a given array or dataset

=PERCENTRANK(array, x)

What range of data Which value within the


are you looking at? range are you looking at?

PERCENTRANK(A14,$A$2:$A$19) = 100% (highest)

PERCENTRANK(A14,$A$2:$A$19) = 0% (lowest)
RAND/RANDBETWEEN

RAND() and RANDBETWEEN act like random number generators in Excel:

The RAND() function returns a random


value between 0 and 1 (to 15 digits)

The RANDBETWEEN function returns an


integer between two values that you specify

=RANDBETWEEN(0,100)
S U M P R O D U CT

The SUMPRODUCT formula multiplies corresponding cells from multiple arrays and
returns the sum of the products (Note: all arrays must have the same dimensions)

=SUMPRODUCT(array1, array2 … array_N)


Example: Total Revenue

Without using SUMPRODUCT, you could multiply SUMPRODUCT(B2:B4,C2:C4) = $7.40


quantity*price in each row and sum the products
S U M P R O D U CT

SUMPRODUCT is often used with filters to calculate products only for rows that meet
certain criteria:

Quantity of goods sold at Shaws:


SUMPRODUCT((A2:A17=“Shaws”)*C2:C17) = 16

Total revenue from Shaws:


SUMPRODUCT((A2:A17=“Shaws”)*C2:C17*D2:D17) = $21.80

Revenue from apples sold at Shaws:


SUMPRODUCT((A2:A17=“Shaws”)*(B2:B17=“Apple”)*C2:C17*D2:D17) = $0.50

PRO TIP:
When you add filters to a SUMPRODUCT, you need
to change the commas to multiplication signs
S U M P R O D U CT

Great, but how does it really work?


SUMPRODUCT((A2:A17=“Shaws”)*(B2:B17=“Apple”)*C2:C17*D2:D17) = $0.50

What YOU see

What EXCEL sees

When you apply a condition or filter


to a column, Excel translates those
cells as 0’s (if false) and 1’s (if true)

If you multiply all four columns,


ONLY ROWS THAT SATISFY
ALL CONDITIONS WILL
PRODUCE A NON-ZERO SUM
Section-4

Lookup Functions

VLOOKUP, HLOOKUP, LOOKUP, INDEX, MATCH, CHOOSE, ROW, ROWS, COLUMN,


COLUMNS, OFFSET
USE OF LOOKUP FUNCTIONS IN DASHBOARDS
N a m ed R a n g es

Using Named Arrays can simplify a lookup function if you use the same
data array in multiple formulas

For example, if you name the array from A1:D6 “Apparel”…

…you can write your vlookup formula in either of


the following ways:

=VLOOKUP(A1,$A$1:$D$6,2)
=VLOOKUP(A1,Apparel,2)
V L O O K UP

Let’s take a look at one of Excel’s most common reference functions – VLOOKUP:

=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])

This is the value that This is where you Which column Are you trying to match the
you are trying to match are looking for the contains the data exact lookup value (0), or
in the table array lookup value you’re looking for? something similar (1)?

D2=VLOOKUP(A2, $G$1:$H$5, 2, 0)

To populate the Price in


column D, we look up the name
of the product in the data array
from G1:H5 and return the
value from the 2nd column over
H L O O K UP

Use HLOOKUP if your table array is transposed (variables headers listed in rows)

=HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup])

This is the value that This is where you Which column Are you trying to match the
you are trying to match are looking for the contains the data exact lookup value (0), or
in the table array lookup value you’re looking for? something similar (1)?

D2=HLOOKUP(A2, $H$1:$L$2, 2, 0)
With an HLOOKUP, we search for the product name
in F1:J2 and return the value from the 2nd row down
Laws of L o o k u ps

There are two key rules that constrain VLOOKUP and HLOOKUP formulas:

1. The lookup value must be in the first column of a


VLOOKUP table array or the first row of a HLOOKUP
table array

2. Excel will always return the value from the top most
row or left most column of a table array when
multiple instances of the lookup value are present

PRO TIP:
Avoid breaking Law #2 by identifying a “Key”
that is common to both datasets and is unique
for every row (NOTE: Keys often take the form
of a concatenation of multiple fields)
R O W / R O WS

The ROW function returns the row number of a given reference, while the ROWS
function returns the number of rows in a given array or array formula

=ROW([reference])
=ROWS(array)

ROW(C10) = 10
This example uses an array, which is why
it includes the fancy { } signs – more on ROWS(A10:D15) = 6
that in the ARRAY functions section
ROWS({1,2,3;4,5,6}) = 2
COLUMN/COLUMNS

The COLUMN function returns the column number of a given reference, while the
COLUMNS function returns the number of columns in a given array or array formula

=COLUMN([reference])
=COLUMNS(array)

PRO TIP: COLUMN(C10) = 3


Leave the cell reference out and just
write ROW() or COLUMN() to return the COLUMNS(A10:D15) = 4
row or column number of the cell in
which the formula is written COLUMNS({1,2,3;4,5,6}) = 3
I N D EX

The INDEX function returns the value of a specific cell within an array

=INDEX(array, row_num, column_num)

What range of cells How many rows down How many columns over
are you looking at? is the value you want? is the value you want?

INDEX($A$1:$C$5, 5, 3) = 234
In this case we’re telling Excel to find the value of a cell
somewhere within the array of A1:C5. Starting from the
upper left, we move down to the 5th row and right to the
3rd column, to return the value of 234
M A T CH

The MATCH function returns the position of a specific value within a column or row

=MATCH(lookup_value, lookup_array, [match_type])

What value are you trying In which row or column are Are you looking for the exact value
to find the position of? you looking? (must be a 1- (0), or anything close?
dimensional array)
1: Find largest value < or = lookup_value
0: Find exact lookup_value
-1: Find smallest value > or = lookup_value

MATCH(“Pliers”,$A$1:$A$5, 0) = 4
MATCH(66,$A$3:$C$3, 0) = 3
Matching the word “Pliers” in column A, we
find it in the 4th row. Matching the number 66
in row 3, we find it in the 3rd column
INDEX/MATCH

INDEX and MATCH are commonly used in tandem to act like a LOOKUP function; the
only difference is that INDEX/MATCH can find values in any column or row in an array

Example: Price Checker In this example, we want to populate the price of a given product and
size in cell B10 by returning a particular value within the array B2:D4

B10=INDEX(B2:D4, MATCH(B6,A2:A4,0), MATCH(B8,B1:D1,0))

The number of rows down to index The number of columns over to


depends on what product I’m index depends on what size I’m
looking for, so we use a MATCH looking for, so we use a MATCH
function and search for the value function and search for the value
in cell B6 (in this case “Pants”) in cell B8 (in this case, “Medium”)

Considering the output of each MATCH function, the formula is just a simple INDEX:

B10 = INDEX(B2:D4, 3, 2) = $30


O F F S ET

The OFFSET function is similar to INDEX, but can return either the value of a cell
within an array (like INDEX) or a specific range of cells

=OFFSET(reference, rows, columns, [height], [width])

What’s your How many rows How many If you want to return a
starting point? down should you columns over multidimensional array, how
move? should you move? tall and wide should it be?

An OFFSET formula where [height]=1


and [width]=1 will operate exactly like an PRO TIP:
INDEX. A more common use of OFFSET Don’t use OFFSET or INDEX/MATCH
is to create dynamic arrays (like the when a simple VLOOKUP will do the trick
Scroll Chart example in the appendix)
Section-5

Excel Tables

Converting Worksheet Data in Tables, Quick & Dirty way to format Data, Function
Optimization in Tables, Table Filtering, Slicing & Summary Aggregation tools.
Design Options, Slicer Options, Converting Back to Range & much more.
• Filter drop-down lists are automatically
added in the header row of a table.

Sorting & • You can sort tables in ascending or


Filtering descending order or by color, or you
can create a custom sort order.
Tables
• You can filter tables to show only the
data that meets the criteria that you
specify, or you can filter by color.
Sorting & Filtering Tables

Filter Heads Data Sorting Data Filtering

Filter drop-down lists are You can sort tables in You can filter tables to show
automatically added in the ascending or descending only the data that meets the
header row of a table. order or by color, or you can criteria that you specify, or
create a custom sort order. you can filter by color.
Formatting Data Table

Formatting Headers & Totals Visuals

You can quickly format table Choose Table Styles options to Apply row or column banding
data by applying a predefined display a table with or without to make a table easier to read,
or custom table style. a header or a totals row. or to distinguish between the
first or last columns and other
columns in the table.
Inserting and deleting table
rows and columns

You can use one of several ways to add rows and columns to a
table. You can quickly add a blank row at the end of the table,
include adjacent worksheet rows or worksheet columns in the
table, or insert table rows and table columns anywhere that you
want. You can delete rows and columns as needed. You can also
quickly remove rows that contain duplicate data from a tabl
Calculated Columns

To use a single formula that adjusts for each row in a


table, you can create a calculated column. A calculated
column automatically expands to include additional
rows so that the formula is immediately extended to
those rows. For more information on how to create a
calculated column
Powering Filters with Slicers

Slicers help to filter data table more conveniently and intuitively.


Multiple Slicers can be used at the same time on a data table.
Slicers design can help you improve your data presentation. Later
when we discuss Charts, Slicer play an important role in Data
Visualizations as well.
Its is a good idea to group slicers if we insert more than one filter on
the data.
Section-6

Pivot Table

Power of Pivot, Preprocessing Data, Options Overview, Slicing & Dicing, 9


different Tasks to Review, Calculated Fields, Report Layouts, Subtotals & Grand
Totals, Formatting Table Styles, Slicer Options & much more.
Pre Processing of Data

The data should always be in tabular form.

Proper Column headers

No duplicate headings.

There should not be any blank cells in data

Dates, if any should properly be formatted

PRO TIP:
Covert your data to a Table using CTRL-
T command for avoiding major errors.
Inserting a Pivot Table

Step-1: Click anywhere inside the Table

Step-2: Go to Insert Tab

Step-3: Click on Pivot Table (ALT+N+V)

Step-4: Let’s do it in Excel


Recheck Data Range before Confirmation

If data is available in Tables or Query


Formats, we can use external data source.

Choose where you want your pivot table to


be placed. If you choose existing
worksheet, you need too provide address
of a cell for starting point.

Data Model is data storage for advance


power pivot also known as Power Pivot.
Power Pivot is part of Power BI along with
other Power apps like Power Query,
Power Map, Power Visualization etc.
Task-1
Task-2
Task-3
Task-4
Task-5
Task-6
Task-7
Task-8
Task-9

Years Sales COGS Gross Profit GP Ratio


2013 14.94% 15.10% 14.75% 98.71%
2014 24.27% 24.69% 23.76% 97.89%
2015 25.03% 24.77% 25.34% 101.27%
2016 24.89% 24.10% 25.87% 103.94%
2017 10.87% 11.35% 10.27% 94.54%
Grand Total 100.00% 100.00% 100.00% 100.00%
Section-7

Conditional
Formatting

Formatting Rules, Data Bars, Icon Sets, Color Scales, Based on Values, Based on
Text, Comparison Operators, Unique & Duplicate Values, Ranking, Formula Base
Formatting & much more!
Built-in Rules of Excel
Data Bars, Color Scale, Icon sets
Creating Custom Rules
Creating Custom Rules

All Cells shall be formatted differently. None left


without formatting.

Format only cells which meet specific Criteria

Formats only Top/ Bottom Ranking Cells

Same as above but average is Ranked instead of Values

Formats only Specific Cells either Duplicate or Unique

Formats based on logical tests & advance formulas.


Problem Statement:
Example - 1

As soon as we select the Month,


Sales Figure Should appear right
next to it.

Next, the same month and sales


figure should become highlighted in
the Sales Table.

Let’s do it in Excel !
Problem Statement:
Example - 2

There are multiple entries of similar


Months in the database. But Sales is
different for both months.

As soon as we select a month from


the dropdown, all month identical to
it should be highlighted in database.

Let’s try it in Excel !


Problem Statement:

Calculate Price based on selection of Product & Size in Price Cell.


Example - 3
Next; Product, Size & Price should become highlighted based on
selection made by user.
XSmall Small Medium Large XLarge
Socks $4.00 $4.25 $4.50 $4.75 $5.00
Shorts $12.00 $12.50 $13.00 $13.50 $14.00
Pants $24.00 $25.00 $26.00 $27.00 $28.00
T-Shirt $15.00 $15.50 $16.00 $16.50 $17.00
Sweater $30.00 $31.00 $32.00 $33.00 $34.00

Product: Size: Price


Pants XLarge =
Section-8

Excel Charts

Data Types & Respective Chart Types, Inserting a Chart, Selecting Data, Chart
Elements, Primary & Secondary Axis, Chart Formatting, Using Shapes & Pictures
to Enhance Presentations, Scrolling Charts & Dynamic Data Presentation plus…
Chart Area

Trendlines Chart Title

Gridlines Plot Area

Chart
Components
Labels Chart Axis

Chart
Markers
Series
Data
Labels
Chart Area

Trendlines Chart Title

Let’s Get Gridlines Plot Area

Our hands
dirty with
Charts Labels Chart Axis

Chart
Markers
Series
Data
Labels
Charts 
A chart helps you display your data into a graphical representation. There are many types of charts, but in this 
class we'll focus on simple column, line, and pie charts. There are examples of other charts near the end of this 
handouts. 

The first thing to know is the data has to be organized so Excel can understand what you are trying to chart. 
Excel will chart your data selection or your connected data range. As long as there are no blank columns and no 
blank rows within your dataset, you can skip selecting the cells.  
Chart Title

Value Axis 

Category Axis

Legend 

Here is a dataset we will use in class: 
Item  1st Qtr 2nd Qtr 3rd Qtr 4th Qtr
Pants  456 489 423 468
Shoes  498 435 472 436
Socks  128 168 157 138
Blouses  579 498 531 589
Hats  126 129 123 119

This is a structured collection of related data set in a table 
format. When plotted onto a clustered column chart, like the 
one shown above, the titles in the first column of the dataset 
appear along our category axis. The titles in the first row 
appear within the legend. The values are represented by the 
height of each column.  

Line charts are usually set up to go across a period of time, 
think Time Line. For this chart I've used the Switch Row 
Column tool so we can see the trend of the sales through the 
year. In this case our first column titles appear in the legend, 
and the first row of titles appears in our category axis. 

Pie charts are usually created to display the breakdown of 
the total values within the whole. Pie charts can only be 
based on one set of data. When you try to create one with 
the above dataset, you will only see the first value set appear 
within the chart. If you want to go to an extreme and have all 
four quarters show, try using a Doughnut chart. 
Creating a Chart 
To create a chart make sure your cursor is in the dataset you would like to plot. If you want a subset of the 
dataset, select that portion. You can use your Ctrl key to add to a current selection. 

You will find the Charts group on the Insert tab. Click on any small chart button to see a list of possible charts.  

If you are unsure of the best chart option for your data use the Recommend Charts button. It will open the 
Insert Chart window shown here. 
Chart Tools 
When you select a chart, three buttons appear along the right side of the selection. 

The plus sign is the Add Chart Element button. This option is used to add and 
remove different pieces of your chart. The list of options will vary depending on 
the type of chart. For example, a pie chart will not have a set of category axis 
titles. As you hover your mouse over each option, you will see a small arrow head 
pointing to the right. This will open another menu with more detailed choices. 
Each menu also has a "More Options…" button which will open a Format Pane on 
to customize each chart element. 

There is a Chart Style Gallery and a Colors menu on the 
Design tab, but the Chart Styles button, the paint brush 
next to the chart, offers the same options. 

If you are patient while you hover over each option, Excel 
will provide you with a Live Preview of the result. 

The Color options are available at the top of the menu. 

The third button is a funnel. This is a Chart Filters button. 

The Values group allows you to add and remove data 
points from the chart.  

The Names page allows you to change the labels that 
appear in the legend (series) and axis titles (category). 

The Select Data… option at the bottom of the window 
opens the same window as the Select Data button on the 
Design tab. From there you can change or adjust the 
range of cells used to create this chart. 
Chart Tool Tabs 
When a chart is selected two chart tool tabs appear at the end of the ribbon, Design and Format. 
Design Tab 

1  2  3  4  5  6  7  8 

1. Add Chart Element – A menu of chart elements that can be added or removed to the chart. Each option
will have a expand arrow at the end of the element name that will provide specifics and a More Options
button to open the Format Pane. This is the same as the Add Chart Element button that appears next to
the selected chart.
2. Quick Layout – A variety of layouts that offer suggested views and choices that adjust the chart
elements such as adding a title, varying the space between columns, and moving the legend.
3. Change Colors – Different color that can be applied to your chart. Changing the Theme on the Page
Layout tab will give you a different sets of colors.
4. Chart Style Gallery – Different chart styles that can be applied to your chart. Because Excel
automatically adjusts the Ribbon to fit on your screen, your copy of Excel may show less options than
the picture above. Use the scroll arrows and open menu buttons at the right side of the gallery for more.
5. Switch Row/Column – Changes the direction the chart looks at Item 1st Qtr 2nd Qtr 3rd Qtr 4th Qtr
Pants 456 489 423 468
the data. In our column chart, each column is plotted on the Shoes 498 435 472 436
chart, when we Switch each row is plotted. We are swapping Socks 128 168 157 138
Blouses 579 498 531 589
the category labels with the legend labels. Hats 126 129 123 119

6. Select Data – Opens a Select Data Source window
where you can customize the source of the chart
data, even edit the labels. Use this window to
reorder your legend and change how Line charts deal
with blank cell values.
7. Change Chart Type – Opens Insert Chart window
where you can change to other chart types. If you
have multiple series you can change each to be
different chart type by choosing the Combo chart
type from the bottom of the left pane.
8. Move Chart – By default when you  create a chart it is
placed on the same worksheet as your data set. You can
move the chart to its own worksheet or to any existing
worksheet with the workbook.
Format Tab 

1. Current Selection
a. Chart Elements – This box shows the currently selected Chart Element, and the menu provides a
list of the major chart elements. Choose an item from this list to select that element.
b. Format Selection – Opens the Format Pane based on the current selection shown in the Chart
Elements box. 
c. Reset to Match Style – Changes the current selection to match the original style of the chart.
2. Insert Shape
a. Shape Gallery – Use this gallery to find a shape such as a block arrow to add
to your chart.  
b. Change Shape – Use this tool to change the current shape to a different one,
perhaps a rectangle into a rounded rectangle.
3. Shape Styles
a. Style Gallery – Different shape styles, options will vary based on
the current selection.
b. Shape Fill – Menu of the most common fill colors and options,
such as pictures and textures. For more options, open the
Format Pane.
c. Shape Outline – Menu of the most common outline colors and
options, such as dashes and arrows. For more options open the
Format Pane.
d. Shape Effects – Menu of the most common shape effects, such
as shadows. For more options open the Format Pane.
4. WordArt Styles
a. WordArt Gallery – Different WordArt styles
b. Text Fill – Menu of the most common fill colors and options,
such as pictures and textures.
c. Text Outline – Menu of the most common outline colors and
options, such as dashes and line weight.
d. Text Effects – Menu of the most common Text effects, such as
shadows. For more options open the Format Pane.
5. Arrange – Change the alignment and arrangement of multiple charts. Use the Shift key to select more
than one chart at a time.
6. Size – Change the height and width of the chart.
Format Pane 
There are multiple ways to open the Format Pane.  
 Click on the Format Selection button in the Format tab
 Click on More option from any menu
 Right‐click on a chart element and choose Format…
 Double‐click on a chart element

The format pane can remain open for as long as you need it. The properties shown change depending on the 
current selection. The current selection is shown on the Format tab and in the title of the Format Pane. 

The pane can be pulled free from the side by dragging the title toward the middle of the window. To return the 
pane to the side of the window drag it back into place or double‐click the title of the Format Pane.  

To close the pane, click on the X in the upper right hand corner. If you accidentally close the pane, use any 
method above to reopen it. 

Within the Format Pane, click on each icon to see the subset of properties. Click on the expand arrow in front of 
the options to see the relevant properties. 

 Fill & Line  Effects  Size & Properties  Options  Text Fill & Outline  Text Effects  Text Box Options  

The Fill & Line and Effects options are the same for all the of the chart elements. If an option cannot  be applied 
to that chart element, Excel will disable (grey out) that option. 

Below are the fill options for a Chart Element. Each Fill choice provides a new set of options.  
How do I …? 

Change Axis Numbers 
Select the Axis by clicking on a number in the area. Open the Format pane, be sure the title says Format Axis. 
Click on the Options button.  

From here you can:  
 Change the Minimum and Maximum numbers shown. These can be greater than the minimum and less
than the maximum if you want.
 Change the Major unit, this is how the displayed number is chosen. If the major unit is 100 the chart axis
will read 100, 200, 300. If it's 25 the chart will show 25, 50, 75.
 Change the Display Units to Thousands, Millions, Billions. This will change the unit shown in the labels
and data tables as well.
 Change the Format of the numbers; number of decimals, include a dollar sign, etc.

Change Distance Between Columns 
Select any column. Open the Format pane, be sure the title says Format Data Series. 
Click on the Options button.  

From here you can:  
 Change the selected series to be on a secondary axis
 Change the distance the series overlap
 Change the width between the each category grouping

Explode a Pie Chart 
In the chart: Hover over a pie wedge. Click and drag the piece away from the center. To move one piece at a 
time, select the single pie wedge first, and then move it from the middle. 

In the properties: Select a pie wedge. Open the Format pane, be sure the title says Format Data Series. 
Click on the Options button.  

From here you can:  
 Change the rotation without changing the order of the data
 Change the explosion, how close the wedges are to each other

Add Trendlines and Error Bars 
Select the chart. Click on the Add Chart Element button in the Design tab, or on the        button next to the chart. 

You can add your own custom error bars, if needed, from the error bar options. You do have to format one 
series of error bars at a time. 

Make Charts the Same Size 
Use the Height and Width properties found on the Format tab in the ribbon, or on the Format Pane for the Chart 
Area's Size & Options. You can use the alignment options on the format tab to make the charts line up. 
Changing the Data Source 

From the Worksheet 
When you select a chart you will see the Chart Tool 
tabs in the ribbon, and the three options buttons along 
the right side of the chart. If you can see the cells in 
the worksheet used for the chart you will also be able 
to see the data is selected and each section is shaded. 

If you hover your mouse over the bottom right‐hand 
corner of the data grouping you will get the two‐way 
sizing arrow. If you click and drag the selection you can 
manually change the chart data source. 

If you know you will have more categories and series 
you can grow the data area beyond what's showing 
and Excel will assign new colors and make room in the 
chart for the new values. 

From the Select Data Source Window 
From the Chart Tools Design tab choose Select Data. 

The Chart data range option can be a bit finicky so I 
recommend deleting the current range and selecting 
the new set from the worksheet.  

The chart is initially arranged to follow the order of the 
data, but if you would like the legend in a different order, 
you can rearrange the Legend Entries using the up and 
down arrows. 

Removing data 
Both of the above options will help you add and remove data. You can manually adjust the range in the 
worksheet or you can select a different range from the Select Data Source window. Both are great as long as you 
are using a consecutive range of data. 

The Select Data Source window also had a Remove button to delete a series from 
the chart. Notice there is not one for the Category/Axis labels. To be able to remove 
one you will need to first Switch Row/Column. Once you've removed the categories, 
Switch Row/Column again. 

From the chart itself you can click on the series you want to remove and press Delete 
on the keyboard. You can only delete the series, so the same actions apply in order 
to remove a category you will need to switch the row/columns first. 

However, we now have a Filters button along the side of the selected chart. From 
here we can uncheck any of the values we do not want on the chart; Series and 
Categories. You must click the Apply button at the bottom of the menu for the filter 
to take effect. 
Types of Charts 
Column and Bar Charts  
Line and Area Charts 
Pie and Donut Charts 
Hierarchy Chart 

Statistic Charts 
Scatter (X,Y) and Bubble Charts 
Radar and Surface Charts
Section-9

What If Analysis

Know the Unknown through Goal Seek, Scenarios, Data Table & Solver Add-In.
Choose the optimal Business Scenario using side by side comparison of different
changes in independent variables.
Tools for What If Analysis

Goal Seek Scenarios Data Table


Lets you start with the desired Instead of starting from the Data tables allow you to take one
result, and it calculates the input desired result and working or two variables in a formula and
value that will give you that result. backward, like with Goal Seek, replace them with as many
these options allow you to test different values as you want, then
multiple values and see how the view the results in a table.
results change.
Goal Seek

Set Cell:
Give the address of cell for which you
want to fix the output value.

To Value:
Provide the desired result by typing the
exact figure.

By Changing Cell:
What cell you want to change to get the
desired result. The dependent variable in
this case.
Scenario Manager

Add:
Add a new Scenario to make it part of analysis

Delete:
Delete a redundant scenario from analysis matrix.

Edit:
Change the parameters of scenarios

Merge:
Merge two different scenarios as one.

Summary:
Side by side view of all scenarios for better analysis.
Adding a Scenario

Scenario Name:
Provide a meaningful name for scanrio

Changing Cell:
Select the cells with independent variables separated by
commas.

Comment:
Optional details of what this scenario is about.

Prevent Changes & Hide:


Safety Features of scenario created.
Data Tables –Step: 1

First Step in Data Analysis using Data


Table is to prepare a model according to
Loan Analysis your requirements.

Loan Amount 50,000 In this example, we are working to find


Term (Months) 60 EMI using given Loan Amount,
Repayment periods and interest rate.
Interest Rate 4.50%
EMI We want to measure the impact of
changes in all these variables using Data
Table.
Data Tables –Step: 2

36 48 60 72 84
20,000
30,000
40,000
50,000
60,000
70,000
80,000

Prepare a matrix with different values of ny two variables for which you want to
assess impact.

In above example, we inserted different repayment periods in row and different


loan amounts in column
Data Tables –Step: 3

Select the variable which is


in row in data table. In this
example Term is in rows.

Select the variable which is


in columns. In this example
Loan Amount is in columns.

Pivot Cell should refer to


desired output

Once selected Press OK &


Voila… You are done.

You might also like