IT Skill Lab-2: Raj School of Management & Sciences
IT Skill Lab-2: Raj School of Management & Sciences
SESSION-2021-22
Now that you have a better sense of what pivot tables can be used for, let's get
into the nitty-gritty of how to actually create one.
Every pivot table in Excel starts with a basic Excel table, where all your data is
housed. To create this table, simply enter your values into a specific set of rows
and columns. Use the topmost row or the topmost column to categorize your
values by what they represent.
For example, to create an Excel table of blog post performance data, you might
have a column listing each "Top Pages," a column listing each URL's "Clicks,"
a column listing each post's "Impressions," and so on. (We'll be using that
example in the steps that follow.)
When you have all the data you want entered into your Excel sheet, you'll want
to sort this data in some way so it's easier to manage once you turn it into a
pivot table.
To sort your data, click the Data tab in the top navigation bar and select
the Sort icon underneath it. In the window that appears, you can opt to sort your
data by any column you want and in any order.
For example, to sort your Excel sheet by "Views to Date," select this column
title under Column and then select whether you want to order your posts from
smallest to largest, or from largest to smallest.
Select OK on the bottom-right of the Sort window, and you'll successfully
reorder each row of your Excel sheet by the number of views each blog post has
received.
For example, let's say you want to organize a bunch of blogging data by post
title. To do that, you'd simply click and drag the “Top pages” field to the "Row
Labels" area.
Note: Your pivot table may look different depending on which version of Excel
you're working with. However, the general principles remain the same.
Step 5. Drag and drop a field into the "Values" area.
Once you've established what you're going to organize your data by, your next
step is to add in some values by dragging a field into the Values area.
Sticking with the blogging data example, let's say you want to summarize blog
post views by title. To do this, you'd simply drag the "Views" field into the
Values area.
The sum of a particular value will be calculated by default, but you can easily
change this to something like average, maximum, or minimum depending on
what you want to calculate.
On a Mac, you can do this by clicking on the small i next to a value in the
"Values" area, selecting the option you want, and clicking "OK." Once you’ve
made your selection, your pivot table will be updated accordingly.
If you're using a PC, you'll need to click on the small upside-down triangle next
to your value and select Value Field Settings to access the menu.
When you’ve categorized your data to your liking, save your work and use it as
you please.
If you want to make any change in the existing data in a cell, you can edit cell
data. When you want to edit the contents of a cell you can use one of the
following ways to enter cell- edit mode:
Double- click the cell to edit the cell contents directly in the cell and it
will enable the edit mode
Select the cell and press F2 to edit the cell contents.
Select the cell that you want to edit and then click inside the formula bar
to edit the cell contents in the formula bar.
All the above mentioned method will allow you to edit data in the cell.
You can use whichever method you prefer. When you enter in to edit mode,
status bar will show the status as “Edit” in the bottom of the screen.
When Excel is in edit mode, the formula bar enables two icon: Cancel and
Enter. Below figure shows these two ikons. Clicking the cancel icon cancels
editing without changing the cell’s contents. Clicking the enter icon completes
the editing and enters the modified contents into the cell.
By pressing home key you can move the insertion point to the beginning of the
cell, by pressing End Key you can move the insertion point to the end of the
cell
To delete the contents of a cell, just click the cell and press the delete key. To
delete more than one cell, select a range of cells that you want to delete and then
press Delete. Pressing delete removes the cell’s contents but doesn’t delete
cells and any formatting applied to the cell.
The other way to delete the contents of cell with more options is to choose
Home>Clear command.
This will give five options like Clear all, Clear formats, Clear contents, Clear
comments, Clear hyperlinks.
Replacing the contents of a cell
You can replace the contents of the cell by just selecting a cell and entering the
data, which will replace the existing data. This will not change any formatting
of the cell. The cell content can also be replaced by drag and drop or by pasting
data from the clipboard. In both cases, the cell formatting will be replaced by the
format of the new data.
On the Ribbon's Data tab, in the Data Tools group, click What-If
Analysis
Click the drop down arrow, and click Scenario Manager
The Scenario Manager dialog box opens, where you can see a list with each
Scenario name.
To create the Scenario Summary, follow these steps:
At the right side of the Scenario Manager, click the Summary button
In the Scenario Summary dialog box, for Report type, select Scenario
Summary
Press the Tab key, to move to the Result cells box
On the worksheet, click on cell B6.
o That is the Profit cell, and it changes, based on the sales and
expense amounts entered for each Scenario.
In this example, the scenario cells on the Budget sheet have been named, and
those names appear on the Scenario Summary sheet, making it easier to
understand.
There is no option for formatting the Scenario Summary when you create it.
However, you can change the formatting in the completed report.
Important Notes
The Scenario Summary and Scenario PivotTable Report are not linked to
the Scenario data, and they do not update if the Scenario data changes.
Use these Summary reports to compare the scenario data, or to print the
current status
After reviewing or printing the data, it's best to delete the Scenario
Summary sheet, to prevent confusion later.
Select one or more cells to validate, go to the Data tab > Data Tools group, and
click the Data Validation button.
You can also open the Data Validation dialog box by pressing Alt > D > L, with
each key pressed separately.
On the Settings tab, define the validation criteria according to your needs. In
the criteria, you can supply any of the following:
Values - type numbers in the criteria boxes like shown in the screenshot below.
Cell references - make a rule based on a value or formula in another cell.
Formulas - allow to express more complex conditions like in this example.
As an example, let's make a rule that restricts users to entering a whole number
between 1000 and 9999:
With the validation rule configured, either click OK to close the Data
Validation window or switch to another tab to add an input message or/and
error alert.
If you want to display a message that explains to the user what data is allowed
in a given cell, open the Input Message tab and do the following:
Make sure the Show input message when cell is selected box is checked.
Enter the title and text of your message into the corresponding fields.
Click OK to close the dialog window.
As soon as the user selects the validated cell, the following message will show
up:
In addition to the input message, you can show one of the following error alerts
when invalid data is entered in a cell.
Warning
Warns users that the data is invalid, but does not prevent
entering it.
Information
The most permissive alert type that only informs users about an
invalid data entry.
To configure a custom error message, go to the Error Alert tab and define the
following parameters:
Check the Show error alert after invalid data is entered box (usually selected
by default).
In the Style box, select the desired alert type.
Enter the title and text of the error message into the corresponding boxes.
Click OK.
And now, if the user enters invalid data, Excel will display a special alert
explaining the error (like shown in the beginning of this tutorial).
Note. If you do not type your own message, the default Stop alert with the
following text will show up: This value does not match the data validation
restrictions defined for this cell.
When adding a data validation rule in Excel, you can choose one of the
predefined settings or specify custom criteria based on your own validation
formula. Below we will discuss each of the built-in options, and next week we
will have a closer look at Excel data validation formulas in a separate tutorial.
As you already know, the validation criteria are defined on the Settings tab of
the Data Validation dialog box (Data tab > Data Validation).
For example, this is how you create an Excel validation rule that allows any
whole number greater than 0:
To validate dates, select Date in the Allow box, and then pick an appropriate
criteria in the Data box. There are quite a lot of predefined options to choose
from: allow only dates between two dates, equal to, greater than or less than a
specific date, and more.
Similarly, to validate times, select Time in the Allow box, and then define the
required criteria.
For example, to allow only dates between Start date in B1 and End date in B2,
apply this Excel date validation rule:
To validate entries based on today's data and current time, make your own data
validation formulas as shown in these examples:
Text length
To allow data entry of a specific length, select Text length in the Allow box,
and choose the validation criteria in accordance with your business logic.
For example, to limit the input to 10 characters, create this rule:
Note. The Text length option limits the number of characters but not the data
type, meaning the above rule will allow both text and numbers under 10
characters or 10 digits, respectively.
To add a drop-down list of items to a cell or a group of cells, select the target
cells and do the following:
1. Open the Data Validation dialog box (Data tab > Data Validation).
2. On the Settings tab, select List in the Allow box.
3. In the Source box, type the items of your Excel validation list, separated by
commas. For example, to limit the user input to three choices, type Yes, No,
N/A.
4. Make sure the In-cell dropdown box is selected in order for the drop-down
arrow to appear next to the cell.
5. Click OK.
The resulting Excel data validation list will look similar to this:
Note. Please be careful with the Ignore blank option, which is selected by
default. If you are creating a drop-down list based on a named range that has at
least one blank cell, selecting this check box allows entering any value in the
validated cell. In many situations, it is also true for validation formulas: if a cell
referenced in the formula is blank, any value will be allowed in the validated
cell.
For instance, you can edit your Excel data validation list by adding or removing
items from the Source box, and have these changes applied to all other cells
containing the same drop-down list:
MS Excel: Charts
In Microsoft Excel, a chart is often called a graph. It is a visual representation of
data from a worksheet that can bring more understanding to the data than just
looking at the numbers.
A chart is a powerful tool that allows you to visually display data in a variety of
different chart formats such as Bar, Column, Pie, Line, Area, Doughnut, Scatter,
Surface, or Radar charts. With Excel, it is easy to create a chart.
Here are some of the types of charts that you can create in Excel.
Bar Chart
Column Chart
Pie Chart
Line Chart
Q-7) How To Insert Bar Chart In Ms Excel
In general, it’s easy to insert a bar chart in Excel. This article will introduce two
solutions for you.
This method will guide you to insert an in-cell bar chart with the Data
Bars of Conditional Formatting feature in Excel. Please do as follows:
1. Select the column you will create in-cell bar chart based on, and
click Home > Conditional Formatting > Data Bars > More Rules. See
screenshot:
This method will apply the REPT function to insert an in-cell bar chart in Excel
easily.
2. On the Insert tab, in the Charts group, choose the Area button:
Choose Area in the 2-D Area group and then modify this chart:
3. To add vertical lines, under Chart Tools, on the Layout tab, in
the Analysis group, choose the Lines button and then choose Drop Lines:
You can customize drop lines: right-click in any one of these lines and
choose Format Drop Lines... in the popup menu.
2. On the Insert tab, in the Charts group, choose the Other Charts button:
Choose Bubble with a 3-D effect and, if it is necessary, add another data series:
3. Remove axises.
4. Right-click in the chart area and select Format Chart Area... in the
popup menu. In the Format Chart Area dialog box:
5. Right-click in the plot area and select Format Plot Area... in the popup
menu. In the Format Plot Area dialog box, on the Fill tab, choose No fill.
The last and the most hard step: move the second chart.
Q-9) Write The Producre For Creating Combined Chart
Consider the below example wherein we have profit, expenses, and headcount
plotted in the same chart by month. We would have profit and expenses on the
primary Y-axis, headcounts on the secondary Y-axis, and months on the X-axis.
2. As shown in the screenshot below, we must select the data table, go to the
“Insert” tab in the ribbon, and select “Combo Charts,” as shown in the red
rectangle and right arrow.
3. Now, we must select the “Clustered Column” Excel chart in the options
provided in the “Combo Charts” dropdown.
4. Once the clustered chart is selected, the combo chart will be ready for display
and illustration.
For the current example, profit and expenses (in dollar value) are plotted on the
primary Y-axis, and the headcounts are plotted on the secondary Y-axis.
The screenshot below shows that the profit and expense parameters are changed
to stacked bar charts, and headcount is selected as a line chart on the secondary
Y-axis.
9. To change the background for the charts, click on the chart so that the “Design”
and “Format” tabs in the ribbon will appear, as shown in the red rectangle.
Now, choose the required style for the chart from the “Design” tab.
Q-10) How To Display The Chart Area In An Image
Open Microsoft Excel on your computer. Insert your data in a table form. If you
have a file for which you want to create an area chart, you’ll need to open the
file in Excel first.
To open the file, click the File tab on the upper left corner of the Excel. Then,
click the Open tab. From the dialogue box, go to the location where your file is
placed, and select the file and select Open.
After you have inserted your data in the sheet, select the data range using the
cursor for which you want to draw an Area chart. Select the range and click
the Insert tab.
From the Insert menu, click the Area tab in the Chart section. Then, you will
have the option of choosing a 2-D chart and a 3-D chart. You can select
whichever you want.
Click the chart type you want to display, and the chart will show up. You can
see an Area Chart for the selected range in the image below.
You can find different types of Area Charts in Excel. There are two primary
types which are 2-D and 3-D and then you get further classifications like
Stacked Area, 100% Stacked Area in both 2-D and 3-D formats.