Professional Documents
Culture Documents
practicalFile2[1]
practicalFile2[1]
Practical File
ON
IT SKILLS LAB
1 |P age
INDEX
Subject Code: KMBN251 Subject : IT SKILLS LAB
Pivot tables are one of the Excel’s most powerful features. A pivot table allows you to extract
the significance from a large, detailed data set. Our data set consists of 213 records and 6
fields.
The following dialog box appears; excel automatically selects the data for you. The default
location for a new pivot table is New Worksheet.
3- Click OK.
3 |P age
Drag fields
The pivotable field’s pane appears. To get the total amount exported of each product, drag the
following fields to the different areas.
Below you can find the pivot table. If Bananas are our main export product. That’s how easy
pivot tables can be.
4 |P age
SORT
Sort the table to get banana at the top of the list , sort the pivot table.
1- Click any cell inside the sum of amount column.
2- Right click and click on sort, sort largest to smallest.
Filter
Because we added the country field to the filters area , we can filter this pivot table by country
.
For example – which product do we export the most to France?
1- Click the filter drop-down and select France
5 |P age
NOTE- You can use the standard filter (triangle next to row labels)to only show the amounts
of specific products.
Change summary calculation
By default , excel summarizes your data by either summing or counting the items. To change
the type of calculation that you want to use , execute the following steps .
1- Click any cell inside the sum of amount column.
2- Right click and click on value field settings.
3- Choose the type of calculation you want to use. For example; click count.
4- Click OK.
RESULT - 16 out of the 28 orders to France were ‘Apple’ orders.
6 |P age
Two- dimensional Pivot table
If you drag a field to the rows area and columns area, you can create a two-dimensional pivot
table. First insert a pivo table. Next, to get the total amount exported to each product drag the
following fields to the different areas.
7 |P age
To easily compare these numbers, create a pivot chart and apply a filter. Maybe this is one
step too far for you at this stage, but it shows you one of the many other powerful pivot table
features excelshave to offer.
8 |P age
Program 2: How to analyze data using goal seek and solver in pivot table?
The goal seek excel function is a method of solving for a desired output by changing an
assumption that drives it. The function essentially uses a trial and error approach to back-
solving the problem by plugging in guesses until it arrives.
For example, if the formula for revenue is equal to the number of units sold multiplied by the
selling price, goal seek can determine how many units have to be sold to reach $1 million of
revenue, if the selling price is known. The function is extremely useful for performing
sensitivity analysis in financial modeling.
• # of units: 500
• Retail price: $25.00
• Selling discount: 10%
• Revenue: $11,250
Now suppose we want to find out how many units have to be sold to reach $20,000 of revenue.
See the screenshot below and follow the steps use the Goal Seek Excel tool.
9 |P age
STEPS TO USE GOAL SEEK EXCEL:
1- Put the cursor on the cell that contains the output you want to change (revenue).
2- On the data ribbon,select What-if-analysis,then select Goal Seek (keyboard shortcut is
AltA,W,G)
3- When the dialog box appears (as shown below) make “Set cell” equal to the revenue
cell(E10)
4- Set “To value” equal to the output you want to achieve (type the number in)
5- Set“By changing cell” equal to the assumption you want to solve for (# of units, or cell
E4)
6- Press OK.
Below is the output from the analysis. We can see that to achieve $20000 of revenue,
889 units need to be sold. Notice that the solution is displayed directly on cell (E4), not
in the dialogue box.
Press OK to keep the solution running in the model (cell E4 will permanently change
to 889 units), or press Cancel to return to he original assumption (500 units)
10 |P age
Program 3: HOW TO CREATE A SUMMARY REPORT IN PIVOT
TABLE?
Microsoft says that 80% of people using Excel have never used a pivot table. As I near
the end of my series of 40 Days of Excel, an introduction to pivot tables.
Pivot tables are miraculous. You are given a workbook with thousands of rows of
detailed data. You can summarize that data in just a few clicks using a pivot table. I’ve
written entire books on pivot tables, so today, I want to walk you through building your
first pivot table.
Say you have 6464 rows of data with customer, product, date, quantity and revenue.
You want to find the revenue for the top 5 customers who bought widgets.
11 |P age
Select where to build the pivot table.
The PivotTable fields panel appears on the right side of your screen. At the top of the
panel is a list of the fields in your data set. At the bottom are four drop zones with
confusing names.
4. Drag the customer field from the top of the PivotTable fields list and drop it in the rows
drop zone.
5. Drag the revenue field from the top of the PivotTable fields list and drop it in the values
drop zone.
6. Drag the product field to the filters drop zone.
7. Open the filters drop-down in H2 and choose widget. At this point, you will see a
summary of the customers who bought widgets.
8. There are two PivotTable tabs in the ribbons. Go to the design tab.12Choose
|P age report
layout, show in tabular form. This changes the heading in G3 from row labels to
customer. It also makes the pivot table better if you add more row fields later.
9. Open the drop- down in G3. Choose value filters, top ten. In the top 10 filter(customer)
dialog, choose top, 5 items by sum of revenue. Click OK.
10.Pivot tables never choose the right number format. Select all of the revenue cells, from
H4:H9. Assign a currency format with 2 decimal places.
11.If you want the report sorted with the largest customer at the top, choose any one
revenue cell and click the sort descending (ZA) icon on the data tab. This is a shortcut
for opening the drop-down in G3 and selecting sort Z to A.
However, pivot tables are easy to change. Now that you’ve answered the first question, try
any of these:
• Change the dropdown in H1 from widget to gadget to see the top customers for gadgets.
• Double-click the revenue in H4 to see a list of all the records that make up that data.
The reports appears on the new worksheet to the left of the current worksheet.
• Click the pivot chart icon on the analyse tab to chart the top 5 customers
13 |P age
Program 4: HOW TO VALIDATE AND AUDIT DATA IN PIVOT
TABLE?
You might want to check formulas for accuracy or find the source of an error. Excel formula
auditing commands provide you an easy way to find:
• Which cells are contributing in the calculation of a formula in the active cell.
• Which formulas are referring to the active cell?
These findings are shown graphically by arrow a line that makes the visualization easy. You
can display all the formulas in the active worksheet with a single command. If your formulas
refer to cells in a different workbook, open that workbook also. Excel cannot go to a cell in
workbooks that is not open.
Setting the display options
You need to check whether the display options for the workbooks you are using are correctly
set.
• Click FILE > OPTIONS
• In the excel option dialog box, click advanced
• In the display options for a workbook-
Select the workbook
Check that under for objects, show, all is selected
• Repeat this step for all the workbooks you are auditing.
Tracing precedents
Precedents cells are those cells that are referred to by a formula in the active cell.
In the following example, the active cell is C2. In C2. You have a formula =B2*C4
Two arrows, one from B2 to C2 and another from C4to C2 will be displayed, tracing the
precedents.
Note that for tracing precedents of a cell should have a formula with valid references.
Otherwise, you will get an error message.
15 |P age
Removing arrows
Dependent cells contain the formulas that refers to other cells. That means, if the active
cell contributes to a formula in another cell, the other cell is a dependent cell on the
active cell.
In the example below, C2 has the formula =B2*C4. Therefore ,C2 is a dependent cell
on the cells B2 and C4.
Click ‘remove arrows’ in the formula auditing group. All the arrows in the worksheet will
disappear.
NOTE: For tracing dependents of a cell, the cell should be referenced by a formula in another
cell. Otherwise, you will get an error message.
• Click in the cell B6 is not referenced by any formula or click in any empty cell.
• Click trace dependents in the formula auditing group. You will get a message.
17 |P age
Working with formula
You have understood the concept of precedents and dependents. Now, consider a worksheet
with several formulae.
SHOWING FORMULAS
The worksheet below contains the summary of sales by the salespersons in the
18 regions
|P age East,
North, South, and West.
• Click the Formulas tab on the ribbon.
• Click show Formula auditing group. The formulas in the worksheet will appear, so that
you will know which cells contain formulas and what the formulas are.
• Click trace precedents. A worksheet icon appears at the end of the arrow. the worksheet
icon indicates that the precedents are in a different worksheet.
• Double- click on the arrow. A GO TO dialog box appears, showing the precedents.
As you observe, there are four precedents, on four different worksheets. 19 |P age
• Click a reference of one of the precedents.
• The reference appears in the reference box.
• Click OK. The worksheet containing that precedents appears.
Evaluating a formula-
To find how a complex formula in a cell works step by steps, you can use evaluate formula
command.
Consider the formula NPV(Middle year) in the cell C14. The formula is
=SQRT (1+ C2)* C10
• Click in the cell C14.
• Click the formulas tab on the ribbon.
• Click evaluate formula in the formula auditing group. The evaluate formula dialog box
appears.
In the ‘Evaluate formula’ dialog box, the formula is displayed in the box under evaluation.
By clicking the Evaluate button several times, the formula gets evaluated step-wise. The
expression with an underline will always be executed next.
Here, C2 is underlined in the formula. So it is evaluated in the next step. Click Evaluate.
20 |P age
1+0.2 will be evaluated as 1.2. SQRT(1.2) is underlined showing it as next step. Click
evaluates.
1.09544511501033*4976.8518518515 will
be evaluated as 5,451.87.
There are no more expressions to evaluate
and this is the answer. The Evaluate button
will be changed to Restart button, indicating
completion of evaluation
Error Checking
It is a good practice to do an error check once your worksheet and/or workbook is ready with
calculations.
21 |P age
The cell needed to compute the active cell are indicated by blue arrows.
• If you click Help on this error, Excel help on the error will be displayed.
• If you click Show Calculation Steps, Evaluate Formula dialog box appears
• If you click Ignore Error, the Error Checking dialog box closes and if you click Error
Checking command again, it ignores this error.
• If you click Edit in Formula Bar, you will be taken to the formula in the formula bar,
so that you can edit the formula in the cell.
22 |P age
Program 5: How to set, edit validation criteria for data entry in a cell range
like: whole number, decimal, data, time
Create a Validation Rule
1. Select the cells you want to validate.
2. Click the Data tab.
3. Click the Data Validation button.
24 |P age
• Stop: Prevents users from adding invalid data in a cell.
• Warning: Warms that the data entered is invalid, but users can click Yes to accept the
invalid entry, No to edit it, or Cancel to remove it
• Information: Informs users that the data entered is invalid, but users can click OK to
accept the invalid entry or Cancel to remove it.
Now when a cell in the range is selected, the title and message display. If you enter an invalid
value, a custom error message appears.
25 |P age
Program 6: How to create application in spreadsheet and macros
Macros are codes that automate work in a program-they let you add your own tiny
features and enhancements to help you accomplish exactly what you need to do,
quickly with just a click of a button. In a spreadsheet tool like Excel, macros can be
especially powerful. Hidden behind the normal user interface, they are more powerful
than standard functions you enter into a cell (e.g. IF (A2<100,100, A2)).
These macros make Excel work for you. They replace actions that you do manually-
everything from formatting cells, copying values, and calculating totals. So with a few
clicks you can quickly replace repetitive tasks.
To make these macros, you can simply record your actions in Excel to save them as
repeatable steps or you can use Visual Basic for Applications (VBA),a simple
programming language that's built into Microsoft Office. We'll show you how to use
both below, as well as share examples of Excel macros to help you get started.
Tip: This guide and all examples are written in Excel 2016 for Windows, but the
principles apply to Excel 2007 and newer for both Mac and PC.
Learning how to automate Excel is one of the easiest ways to speed up your work--
especially because Excel is used in so many work processes. Say every week you export
analytics data from your content management system (CMS) to create a report about
your site. The only problem is, those data exports aren't always in an Excel-friendly
format. They're messy and often include far more data than your report requires. This
means you have to clean up empty rows, copy and paste data into the right place, and
create your own charts to visualize data and make it print-friendly. All of these steps
may take you hours to complete.
If there only was a way to press one button and let Excel do it for you in an instant...
Well, can you guess what I'm about to say next?
All it requires is a little bit of time to set up a macro, and then that code can do the work
for you automatically every time. It's not even as difficult as it sounds.
26 |P age
How to Build Your First Excel Macro
You already know your way around Excel, and are familiar with its grid of cells where
you enter your text and functions. To build Excel macros, though, you'll need an extra
tool that's built into Excel: the Visual Basic Editor.
Excel has a built-in tool for writing macros called the Visual Basic Editor-or VBA
Editor for short. To open that, open a spreadsheet and use the shortcut Alt + F11 (for
Mac: Fn + Shift + F11).
The new window that pops up is called the VBA Editor. It's where you'll edit and store
all of your macros. Its layout may look a bit different from this screenshot, but you can
move the windows around to the order you want. Just be sure to keep the Project
Explorer pane open so you can easily edit your macros.
Your macros will be made up of "Modules," or files with your VBA code. You'll add
a new module or open an existing one in the VBA Editor, then type in the code you
want. To insert a module, click "Insert" and then click "Module".
You'll then see the blank space to write your code on the right.
There are two ways to make a macro: code it or record it. The main focus of this article
is on the former, but recording a macro is so simple and handy, it's worth exploring too.
Recording a macro is a good way of getting to know. the basics of VBA. Later on, it
serves as handy storage for code that you don't need to memorize.
When you record a macro, you tell Excel to start the recording. Then you perform the
tasks you want to be translated into VBA code. When you're done, tell27Excel
|P age to stop
recording and you can use this new macro to repeat the actions you just performed
again and again.
There are limitations to this, so you can't automate every task or become an expert in
automation by only recording. You'll still need to type or edit code manually
sometimes. But it's still a handy way to get started. Here's how: 1. Go to the "View"
tab of the ribbon and click the tiny arrow below the "Macros" button. 2. Then click
"Record Macro" 3. Type in the name of your macro and click "OK" to start the
recording. 4. Perform the actions in your spreadsheet you want to be turned into a
macro. 5. When you're done, go to the "View" tab, click the tiny arrow below the
"Record Macro" button again and select "Stop recording".
Now, use the shortcut Alt + F11 (for Mac: Fn + Shift + F11) to open the VBA Editor,
and double-click "Module 1" in the Project Explorer.
This is your first code! Amazing, right? You may not have written it yourself. but it's
still generated from your actions.
Yours probably look different than mine. Can you guess what my code does?
• Sub Makebold is just the text Sub followed by the name I entered when I started
recording.
• The green line doesn't actually do anything-it's a comment where you could add
an explanation of what the macro does.
• End sub simply tells Excel that the macro stops here.
Now, what will happen if I change the True part of the third line to False? The macro
would then remove any bold formatting from the selection instead of making it bold.
That's how you record a simple macro. But the real power of macros comes when you
28 |P age
can write it yourself-so let's get started learning to write simple VBA code.
How to Code Your Own Excel Macros
Macros are just bits of code in Excel that do your bidding. Once you write the code in
the VBA Editor, you can run it and let the code work its magic on your spreadsheet.
But what's even better is to build your macro into your spreadsheet, and the best tool
for that is buttons.
So first, before we start coding, let's add a button to run our macro.
You can use various Excel objects as buttons for running macros, but I prefer to use a
shape from the "Insert" tab. When you have inserted your shape. right click it and select
"Assign Macro..." Then select the macro you want to run when the shape is clicked-
perhaps the one you just made with a recording and save it by clicking "OK".
Now, when you click the shape which we just turned into a button, Excel will run the
macro without having to open the code each time.
There's one other thing to note before we get started: saving your spreadsheet with
Macros. By default, Excel spreadsheet files with an .xlsx extension cannot include
macros. Instead, when you save your spreadsheet, select the "Excel Macro-Enabled
Workbook (*.xlsm)" format, and add your file name as normal.
Open the project file you downloaded earlier and make sure the "Copy, cut, and paste"
sheet is selected. This is a sample employee database with the
names, departments, and salaries of some employees.
29 |P age
Copying Cells with VBA
Copying in VBA is quite easy. Just insert this code into the VBA Editor: Range("Insert
range here").Copy. Here's some examples:
Remember when you recorded a macro before? The macro had Sub Nameofmacro()
and End sub at the top and bottom line of the code. These lines must always be included.
Excel makes that easy, too: When you type in "Sub" followed by the macro name in
the beginning of the code, the End sub is automatically inserted at the bottom line.
Tip: Remember to enter these lines manually when you're not using the macro recorder.
Pasting can be done in different ways depending on what you want to paste. 99% of
the time, you'll need one of these two lines of code:
I just showed you how to take a simple action (copying and pasting) and
attach it to a button, so you can do it with a mouse click. That's just one automated
action. When you have the code to repeat itself, though, it can do longer and more
complex automation tasks in seconds.
Take a look at the "Loops" sheet in the project file. It's the same data as in the previous
sheet, but every third row of the data is now moved one column to the right. This type
of faulty data structure is not unusual when exporting data from older programs.
This can take a lot of time to fix manually, especially if the spreadsheet includes
thousands of rows instead of the small sample data in this project file.
Let's make a loop that fixes it for you. Enter this code in a module, then look. at the
explanations below the picture:
30 |P age
1. This line makes sure the loop starts at the top-left cell in the sheet and not accidentally
messes the data up by starting somewhere else.
2. The For i = 1 To 500 line means that the number of times the loop has run
(represented by i) is an increasing number that starts with 1 and ends with 500. This
means that the loop will run 500 times. The number of times the loop should run
depends on the actions you want it to do. Use your good sense here. 500 times is way
too many for our sample dataset, but would fit perfectly if the database had 1500 rows
of data.
3. This line recognizes the active cell and tells Excel to move 3 rows down and select
that cell, which then becomes the new active cell. If it was every fourth row that was
misplaced in our data, instead of every third, we could just replace the 3 with a 4 in this
line.
4. This line tells Excel what to do with this newly selected cell. In this case, we want
to delete the cell in such manner that the cells to the right of the cell are moved left.
That is achieved with this line. If we wanted to do something else with the misplaced
rows, this is the place to do it. If we wanted to delete every third row entirely, then the
lineshould've been: Selection. Entirerow.delete.
5. This line tells Excel that there are no more actions within the loop. Inthis case, 2 and
5 are the frame of the loop and 3 and 4 is the actionswithin the loop.
When we run this macro, it will result in a neat dataset without anymisplaced rows.
This section is about IF-statements which enables the "if-this-then-that" logic, just like
the IF-function in Excel.
Let's say the export from our website CMS was even more erroneous than expected.
Every third row is still misplaced, but now, some of the misplaced rows are placed 2
columns to the right instead of 1 column to the right. Take a look at the sheet "IF-
statement" in the project file to see what it looks like. 31 |P age
How do we take this into account in our macro? We add an IF-statement to the loop!
Let's formulate what we want Excel to do:
We start in cell A1. Then we go three rows down (to cell A4, A7, A10, etc.) until there's
no more data. Every time we go three rows down we check this row to see if the data
has been misplaced by 1 or 2 columns. Then move the data in the row either 1 or 2
columns to the left.
Now, let's translate this into VBA code. We'll start with a simple loop, as before:
The only thing we need now is to write what should happen within the loop. This is the
"go three rows down" part that we developed back in the section. about loops. Now
we're adding an IF-statement that checks how much the data is misplaced and corrects
it correspondingly.
This is the final code to copy into your module editor, with each step explained below:
1. This is the first part of the IF-statement. It says that if the cell right of the active cell
(or Active cell. Offset (0,1) in VBA code) is blank (represented by = "") then do
something. This something is the exact same action as we did when we created the loop
in the first place: deleting the active cell and moving the active row one cell to the left
(accomplished with the Selection. Delete Shift:=xlToLeft code). This time, we do it
two times instead of one, because there are two blank cells in the left side of the row.
2. If the above is not true, and the cell right of the active cell is not blank, then the
active cell is blank. Therefore, we only need to delete the active cell and move the
active row one cell to the left one time. 32 |P age
The IF-statement must always end with an End If to tell Excel it's finished running.
After the IF-statement, the loop can run again and again, repeating the IF-statement
each time
Congratulations, you've just created a macro that can clean up messy data! See the
animation below to see it in action (If you haven't already tried it yourself).
Excel macros have only one problem: they're tied to your computer, and they can't run
in the Excel Web App or on your mobile device. And they're best at working on data
already in your spreadsheet, making it difficult to get new data from your other apps
into your spreadsheet.
App integration tool Zapier can help. It connects the Office 365 for Business edition of
Excel to hundreds of other apps-Stripe, Salesforce, Slack, and more-so you can log data
to your spreadsheet automatically or start tasks in other apps right from Excel.
Here's how it works. Say you want to save your Typeform form entries to an Excel
spreadsheet. Just create a Zapier account, and click the Make a Zap button in the top
right corner. Then, select Typeform in the app picker, and set it to watch your form for
new entries.
Zapier lets you add, update, or find rows in your Excel spreadsheet. 33 |P age
Now, choose your spreadsheet and worksheet, then click the icon on the right of each
spreadsheet row to select the correct form field to save to that spreadsheet row. Save
and test your Zapier integration, then turn it on. Then every time your Typeform form
gets filled out, Zapier will save that data to your Excel spreadsheet.
Zapier can add your form data directly to the spreadsheet row you want
Here are some great ways to get started automating Excel with Zapier in a few clicks-
or build your own Excel integrations to connect your spreadsheets to your favorite apps.
34 |P age
Program 7: How to create a column chart?
Column charts are useful for showing data changes over a period of time or for
illustrating comparisons among items. In column charts, categories are typically
organized along the horizontal axis and values along the vertical axis.
Excel Outlook
To create a column chart, follow
these steps:
1. Enter data in a spreadsheet.
2. Select the data.
3. Depending on the Excel
version you're using, select one
of the following options:
Excel 2010 and Excel 2007: Click Insert > Column, and select a column chart option
of your choice.
You can optionally format the chart a little further. See the list below for a few options:
• To apply a different chart style, click Design > Chart Styles,and pick a style.. To
apply a different shape style, click Format > Shape Styles. and pick a style.
• To apply different shape effects, click Format > Shape Effects, and pick an
option such as Bevel or Glow, and then a sub option.
35 |P age
Program 8: How to create a bar chart ?
A bar chart (or a bar graph) is one of the easiest ways to present your data in Excel,
where horizontal bars are used to compare data values. Here's how to make and format
bar charts in Microsoft Excel.
While you can potentially turn any set of Excel data into a bar chart, It makes more
sense to do this with data when straight comparisons are possible, such as comparing
the sales data for a number of products. You can also create combo charts in Excel,
where bar charts can be combined with other chart types to show two types of data
together.
We'll be using fictional sales data as our example data set to help you visualize how
this data could be converted into a bar chart in Excel. For more
Complex comparisons, alternative chart types like histograms might be better options.
To insert a bar chart in Microsoft Excel, open your Excel workbook and select your
data. You can do this manually using your mouse, or you can select a cell in your range
and press Ctrl+A to select the data automatically.
Once your data is selected, click Insert > Insert Column or Bar Chart.
Various column charts are available, but to insert a standard bar chart, click the
"Clustered Chart" option. This chart is the first icon listed under the "2-D Column"
section.
Excel will automatically take the data from your data set to create the chart on the same
worksheet, using your column labels to set axis and chart titles. You can move or resize
the chart to another position on the same worksheet, or cut or copy the chart to another
worksheet or workbook file.
For our example, the sales data has been converted into a bar chart showing a
comparison of the number of sales for each electronic product.
36 |P age
Changing Chart Title Text
To change the title text for a bar chart, double-click the title text box above the chart
itself. You'll then be able to edit or format the text as required.
If you want to remove the chart title completely, select your chart and click
the "Chart Elements" icon on the right, shown visually as a green, "+" symbol.
From here, click the checkbox next to the "Chart Title" option to deselect it.
Your chart title will be removed once the checkbox has been removed.
To add axis labels to your bar chart, select your chart and click the green "Chart
Elements" icon (the "+" icon).
From the "Chart Elements" menu, enable the "Axis Titles" checkbox.
Axis labels should appear for both the x axis (at the bottom) and the y axis (on the left).
These will appear as text boxes.
To edit the labels, double-click the text boxes next to each axis. Edit the text in each
text box accordingly, then select outside of the text box once you've finished making
changes.
If you want to remove the labels, follow the same steps to remove the checkbox from
the "Chart Elements" menu by pressing the green, "+" icon. Removing the checkbox
next to the "Axis Titles" option will immediately. remove the labels from view.
37 |P age
Changing Chart Style and Colors
Microsoft Excel offers a number of chart themes (named styles) that you can apply to
your bar chart. To apply these, select your chart and then click the "Chart Styles" icon
on the right that looks like a paint brush. A list of style options will become visible in
a drop-down menu under the "Style" section.
• Select one of these styles to change the visual appearance of your chart, including
changing the bar layout and background.
• You can access the same chart styles by clicking the "Design" tab, under the
"Chart Tools" section on the ribbon bar.
• The same chart styles will be visible under the "Chart Styles" section- clicking
any of the options shown will change your chart style in the same way as the
method above.
• You can also make changes to the colors used in your chart in the "Color"
• section of the Chart Styles menu.
• Color options are grouped, so select one of the color palette groupings to apply
those colors to your chart.
• You can also change how text is displayed on your chart under the "Text
Options" section, allowing you to add colors, effects, and patterns to your title
and axis labels, as well as change how your text is aligned on the chart.
• If you want to make further text formatting changes, you can do this using the
standard text formatting options under the "Home" tab while you're editing a
label.
38 |P age
Program 9: How to create a line chart ?
Line charts are used to display trends over time. Use a line chart if you have text labels,
dates or a few numeric labels on the horizontal axis. Use a scatter plot (XY chart) to
show scientific XY data. To create a line chart, execute the following steps.
Note: only if you have numeric labels, empty cell Al before you create the line chart.
By doing this, Excel does not recognize the numbers in column A as a data series and
automatically places these numbers on the horizontal (category) axis. After creating the
chart, you can enter the text Year into cell A1 if you like.
To change the data range included in the chart, execute the following steps.
To change the color of the line and the markers, execute the following steps.
39 |P age
The Format Data Series pane appears.
8. Click the paint bucket icon and change the line color.
9. Click Marker and change the fill color and border color of the markers.
11. Click the + button on the right side of the chart, click the arrow next to Trendline
and then click More Options.
13. Specify the number of periods to include in the forecast. Type 2 in the Forward
box.
To change the axis type to Date axis, execute the following steps.
14. Right click the horizontal axis, and then click Format Axis.
40 |P age
Program 10: How to create a pie chart ?
Pie charts are used to display the contribution of each value (slice) to a total (pie). Pie
charts always use one data series.
To create a pie chart of the 2017 data series, execute the following steps.
1. Select the range A1:D2.
2. On the Insert tab, in the Charts group, click the Pie symbol.
3. Click Pie.
4. Click on the pie to select the whole pie. Click on a slice to drag it away from the
center.
Note: only if you have numeric labels, empty cell Al before you create the pie chart.
By doing this, Excel does not recognize the numbers in column A as a data series and
automatically creates the correct chart. After creating the chart, you can enter the text
Year into cell A1 if you like.Let's create one more cool pie chart.
5. Select the range A1:D1, hold down CTRL and select the range A3:D3.
6. Create the pie chart (repeat steps 2-3).
7. Click the legend at the bottom and press Delete.
8. Select the pie chart.
9. Click the + button on the right side of the chart and click the check box next to Data
Labels.
10. Click the paintbrush icon on the right side of the chart and change the color scheme
of the pie chart.
11. Right click the pie chart and click Format Data Labels.
12. Check Category Name, uncheck Value, check Percentage and click Center.
41 |P age
Program 11: How to create a combined chart like: column and line, column
and area
Suppose I have the data set as shown below and I want to plot both the revenue and
profit margin numbers in the same chart.
To create this combination chart, I first need to create a regular chart where I have all
the above data plotted on it.
Below are the steps to create a regular chart using the above data (the snapshots are of
Excel 2016);
1. Select the Revenue and Profit Margin data (B1:C6 in this example).
2. Click the Insert tab.
3. In the chart group, click on the “Insert column chart” icon.
4. Click on Clustered Column chart. This will insert the chart in the worksheet area.
5. With the Chart Selected, go to the Design tab and click on Select data.
6. In the 'Select Data Source' dialog box, click on Edit option (below the 'Horizontal
(Category) Axis Labels').
7. Select years that you want to plot in the chart (A2:A6 in this example).
8. Click OK.
The above steps would give you a chart that has revenue and profit margin plotted as a
clustered column chart. If you can't see the Profit Margin bar in the chart, it's because
the value of Profit Margin is very less as compared to the Revenue value (but it's there
as we can see it's listed in the legend in orange color).
Now to create a combination chart from this clustered column chart, follow the below
42 |P age
steps:
1. Right-click on any of the bars.
2. Click on 'Change Series Chart Type
3. In the Change Chart Type dialog box, make sure Combo category is selected (which
it should be by default).
4. Click on the drop-down for Profit Margin.
5. In the drop-down, click on 'Line with Markers'.
6. Check the Secondary Axis checkbox for Profit Margin.
7. Click OK.
The above steps would give you the combination chart (also called combo chart) as
shown below.
Chart Title
You can now further customize the chart (such as change the title, remove the grid
lines, etc.)
While the first part of creating a chart is the same in all versions of Excel, converting
that chart into a combination chart is done a bit differently in Excel 2010.
Below are the steps to convert a regular clustered column chart into a combo chart in
Excel 2010:
1. Click on any of the Profit margin bars. This will select all bars for profit margin.
2. In the Format Data Series dialogue box, select Secondary Axis (in the Plot Series
On group).This will plot Profit Margin Data in a secondary Axis. You would be
able
3. to see a vertical axis on the right of the chart.
5. In the Change Chart Type dialogue box, select Line with Markers option.
43 |P age
Program 12:How to display an image in chart area
All versions of Microsoft Excel allow you to insert pictures stored anywhere on your
computer or another computer you are connected to. In Excel 2016 and Excel 2013,
you can also add an image from web pages and online storages such as OneDrive,
Facebook and Flickr.
Insert an image from a computer
Inserting a picture stored on your computer into your Excel worksheet is easy. All you
have to do is these 3 quick steps:
1. In your Excel spreadsheet, click where you want to put a picture.
2. Switch to the Insert tab > Illustrations group, and click Pictures.
In the Insert Picture dialog that opens, browse to the picture of interest, select it, and
click Insert. This will place the picture near the selected cell, more precisely, the top
left corner of the picture will align with the top left corner of the cell.
To insert several images at a time, press and hold the Ctrl key while selecting pictures,
and then click Insert, like shown in the screenshot below:
Done! Now, you can re-position or resize your image, or you can lock the picture to a
certain cell in a way that it resizes, moves, hides and filters together with the associated
cell.
44 |P age
3. In search results, click on the picture you like best to select it, and then click Insert.
You can also select a few images and have them inserted in your Excel sheet in one go:
If you are looking for something specific, you can filter the found images by size, type,
color or license - just use one or more filters at the top of the search results.
Note. If you plan to distribute your Excel file to someone else, check the picture's
copyright to make sure you can legally use it.
Besides adding images from Bing search, you can insert a picture stored on your
OneDrive, Facebook or Flickr. For this, click the Online Pictures button on the Insert
tab, and then do one of the following:
• Click Browse next to OneDrive, orClick the Facebook or Flickr icon at the
bottom of the window.
• Insert Pictures
Note. If your OneDrive account does not appear in the Insert Pictures window, most
likely you are not signed in with your Microsoft account. To fix this, click the Sign in
link at the upper right corner of the Excel window.
45 |P age