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

IT file 2

The document outlines a series of Excel assignments focusing on data analysis techniques such as Pivot Tables, Goal Seek, Scenario Manager, Data Validation, and Auditing. Each assignment provides detailed instructions on how to utilize these features for effective data management and analysis. The content is designed to enhance users' proficiency in Excel for business analytics and decision-making.

Uploaded by

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

IT file 2

The document outlines a series of Excel assignments focusing on data analysis techniques such as Pivot Tables, Goal Seek, Scenario Manager, Data Validation, and Auditing. Each assignment provides detailed instructions on how to utilize these features for effective data management and analysis. The content is designed to enhance users' proficiency in Excel for business analytics and decision-making.

Uploaded by

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

Table of Content

S.No. Content Page No.


1 Assignment 1
 Pivot Table
 Analyzing Data using goal seek and solver.
2 Assignment 2
 Scenarios
 Create named Scenarios.
 Show, Edit, Delete Scenarios.
 Creating Scenario summary report.
3 Assignment 3
 Validation and Auditing.
 Set, edit validation criteria for data entry in a cell
range like: whole number, decimal, list, date,
time.
 Trace precedent and dependents.
4 Assignment 4
 Macros.
 Creating Macros.
 Defining Macro Buttons
5 Assignment 5
 Creating and formatting charts.
 Understanding chart types.
 Differentiate between different charts.
 Create combination charts like: column and line,
column and area.
6 Assignment 6
 Column Chart.
 Bar Chart.
 Line Chart.
 Pie Chart.
 XY Scatter Chart.
 Area Chart.
 Surface Chart.
 Bubble Chart.
Assignment 1
1. What is pivot table used for, how it is created?
Ans. A PivotTable is an interactive way to quickly summarize large amounts of data data. You
can use a PivotTable to analyze numerical data in detail, and answer unanticipated questions
about your data. A PivotTable is especially designed for: Querying large amounts of data in
many user-friendly
friendly ways. A Pivot Table is used to summaries, sort, reorganize, group, count,
total or average data stored in a table. It allows
ows us to transform columns into rows and rows
into columns. It allows grouping by any field (column), and using advanced calculations on
them.

More simple explanation is that a pivot table can:


can

 group items/records/rows into categories


 count the number of items in each category,
 sum the items value
 or compute average, find minimal or maximal value etc.

In a few easy steps, we will see how pivot tables work. Then, no pivot table creating will
seem hard anymore.

Pivot tables are among the most useful and powerful


powe features in Excel.. We use them in
summarizing the data stored in a table. They organize and rearrange statistics (or "pivot") to
draw attention to the valuable facts. You can take an extremely large data set and see the
relevant information you need in a clean, concise, manageable way.

Sample Data

The sample data that we are going to use contains 448 records with 8 fields of information on
the salee of products across different regions between 2013
2013-2015.
2015. This data is perfect to
understand the pivot table.
Insert Pivot Tables
To insert a pivot table in your sheet, follow these steps:

 Click on any cell in a data set.

 On the Insert tab, in the Tables group, click PivotTable.

A dialog box will appear. Excel will auto


auto-select
select your dataset. It will also create a new
worksheet for your pivot table.

 Click Ok. Then, it will create a pivot table worksheet.


Drag Fields

To get the total sales of each salesperson, drag the following fields to the following areas.

 Salesperson field to Rows area.

 Sales field to Values area.

Value Field Settings

By default, Excel gives the summation of the values that are put into the Values section. You
can change that from the Value Field Settings.

 Click on the Sum of Sales in the Values field.

 Choose the type of calculation you want to use.


 Choose the type of calculation you want to use.

 Click OK.

Conclusion
In this article, you’ve learned the basics of pivot table creation in Excel. You can see how
simple it is to get started creating one and visualizing your data in many different ways.
This Business Analytics course teaches you the basic concepts of data analysis and statistics
to help data-driven decision making. This training introduces you to Power BI and delves into
the statistical concepts that will help you devise insights from available data to present your
findings using executive-level dashboards.
2. What is Goal Seek in Excel?
Ans. Goal Seek is Excel's built-in What-If Analysis tool that shows how one value in a
formula impacts another. More precisely, it determines what value you should enter in an
input cell to get the desired result in a formula cell.

The best thing about Excel Goal Seek is that it performs all calculations behind the scenes,
and you are only asked to specify these three parameters:

 Formula cell
 Target/desired value
 The cell to change in order to achieve the target

The Goal Seek tool is especially useful for doing sensitivity analysis in financial modeling
and is widely used by management majors and business owner. But there are many other uses
that may prove helpful to you.

On the whole, whenever you want a formula to return a specific result but are not sure what
input value within the formula to adjust to get that result, stop guessing and use the Excel
Goal Seek function!

Note. Goal Seek can process only one input value at a time. If you are working on an
advanced business model with multiple input values, use the Solver add-in to find the optimal
solution.

How to use Goal Seek in Excel

The purpose of this section is to walk you through how to use the Goal Seek function. So,
we'll be working with a very simple data set:

The above table indicates that if you sell 100 items at $5 each, minus the 10% commission,
you will make $450. The question is: How many items do you have to sell to make $1,000?

Let's see how to find the answer with Goal Seek:

1. Set up your data so that you have a formula cell and a changing cell dependent on the
formula cell.
2. Go to the Data tab > Forecast group, click the What if Analysis button, and select Goal

Seek…

1. In the Goal Seek dialog box, define the cells/values to test and click OK:
o Set cell - the reference to the cell containing the formula (B5).
o To value - the formula result you are trying to achieve (1000).
o By changing cell - the reference for the input cell that you want to adjust (B3).

2. The Goal Seek Status dialog box will appear and let you know if a solution has been
found. If it succeeded, the value in the "changing cell" will be replaced with a new one.
Click OK to keep the new value or Cancel to restore the original one.

In this example, Goal Seek has found that 223 items (rounded up to the next integer) need
to be sold to achieve a revenue of $1,000.

If you are not sure you will be able to sell that many items, then maybe you can reach the
target revenue by changing the item price? To test this scenario, do Goal Seek analysis
exactly as described above except that you specify a different Changing

cell (B2):

As the result, you will find out that if you increase the unit price to $11, you can reach $1,000
Assignment 2
1.What is a Scenario Manager in Excel?

Ans. Scenario manager in Excel is a part of three what-if-analysis tools in Excel, which are
built-in in Excel. In simple terms, you can see the impact of changing input values without
changing the actual data. Like a Data Table in Excel, you now input values that must change
to achieve a specific goal.

Scenario manager in Excel allows you to change or substitute input values for multiple cells
(maximum up to 32). Therefore, you can view the results of different input values or different
scenarios at the same time.

For example: What if I cut down my monthly traveling expenses? How much will I
save? Here, we can store scenarios to apply them with a mouse click.

Scenario Manager in Excel –

A simple example could be your monthly family budget. You will spend on food, travel,
entertainment, clothes, etc., and see how these affect your overall budget.

Step 1: Create a below table that shows your list of expenses and income sources.

 In cell B5, you have total income


 In cell B19,total money left.

You are ending up with only 5,550 after all the expenses. So, it would help if you cut your
cost to save more for the future.

Step 2: From the top of Excel, click the Data menu > On the “Data” menu, locate the “Data
Tools” panel > Click on the “What-If-Analysis” item and select the “Scenario Manager” in
Excel from the menu.

Step 3: When you click on the Scenario Manager below, the dialog box will open.

Step 4: You need to create a new scenario. So, click on the Add button. Then, you will get
the below dialog box.
By default, it shows cell C10, which means it is the currently active cell. So, first, type the
scenario name in the box as the Actual Budget.

Now, you need to enter which cells your excel sheet will be changing. Nothing will change in
this first scenario because this is my actual budget for the month. Still, we need to specify the
cells that will be changing.

Now, try to reduce the food expenses and clothes expenses. These are in cells B15 and
B13,respectively. Now, the add scenario dialog box should look like this.

Click “OK.” Excel will ask you for some values. Since we do not want any changes to this
scenario, click “OK.”

Now, you will be taken back to the scenario manager box. Now, the window will look like
this.
Now, one scenario is done and dusted. Next, create a second scenario where you must change
your food and clothes expenses.

Click the Add button and give a “Scenario Name” as “Plan 2”. “Changing the cell” will be
B15 and B13 (food and cloth expenses).

Now, below, the “Scenario Values” dialog box opens again. This time, we want to change the
values. Enter the same ones as in the image below:

These are the new values for our new scenario, Plan 2. Click “OK.” Now, you are back to the
Scenario Manager window. Now, we have two scenarios named after Actual Budget and
Plan 2.

Click the Add button and give a scenario name as “Plan 3.” “Changing cells” will be B15
and B13 (food and cloth expenses).
Now, below, the “Scenario Values” dialog box opens again. This time, we do want to change
the values. Insert the same ones as in the image below:

As you can see, we have our “Actual Budget,” “Plan 2,” and “Plan 3.” With “Plan 2”
selected, click the “Show” button at the bottom. The values in your Excel sheet will change,
and we will calculate the new budget. The image below shows what it looks like.

Click on the Actual Budget and the Show button to see the differences. It will display initial
values.

Do the same for “Plan 2” to look at the changes.

So, scenario manager in Excel allows you to set different values and identify the significant
changes.
How to Create a Summary Report in Excel?

After adding different scenarios, we can create a summary report in Excel from this scenario
manager. To create a summary report in Excel, follow the below steps.

 Click on the Data tab from the Excel menu bar.


 Click on What-If-Analysis.
 Under the what-if-analysis, click Scenario Manager in Excel.
 Now, click on Summary.

 Click “OK” to create the summary report in Excel.

 It will create the summary in the new sheet, as shown in the below image.
 It shows the change in savings in three different scenarios. In the first scenario, the savings
was 5,550. In the second scenario, savings are increased to 20,550 due to cost cut down in
Food & Clothes section, and finally, the third scenario shows the other scenario.
 All right, now we exercised a simple Family Budget Planner. It looks good enough to
understand. Perhaps, this is enough to convince your family to change their lifestyle.
 Scenario manager in Excel is a great tool when you need to do sensitivity analysis. You can
instantly create the summary report in Excel to compare one plan with the other and decide
the best alternative plan to get a better outcome.

In addition, your scenarios will look like the one below.

Scenario manager is a what-if analysis tool available in Excel that works on different
scenarios. It uses a group of ranges that impact an individual output. Therefore, we can use it
to make different scenarios, such as bad and medium, depending on the values present in the
range that affect the result.
Assignment 3

Ques.1 WHAT IS VALIDATION AND AUDITING ?

Ans. Data validation refers to the process of ensuring the accuracy and quality of data. It is
implemented by building several checks into a system or report to ensure the logical
consistency of input and stored data.
In automated systems, data is entered with minimal or no human supervision. Therefore, it is
necessary to ensure that the data that enters the system is correct and meets the desired
quality standards. The data will be of little use if it is not entered properly and can create
bigger downstream reporting issues. Unstructured data, even if entered correctly, will incur
related costs for cleaning, transforming, and storage.

What is data validation in Excel?

Excel Data Validation is a feature that restricts (validates) user


input to a worksheet. Technically, you create a validation rule that
controls what kind of data can be enteredinto a certain cell.

Here are just a few examples of what Excel's data validation can do:
 Allow only numeric or text values in a cell.
 Allow only numbers within a specified range.
 Allow data entries of a specific length.
 Restrict dates and times outside a given range.
 Restrict entries to a selection from a drop-down list.
 Validate an entry based on another cell.
 Show an input message when the user selects a cell.
 Show a warning message when incorrect data has been entered.
 Find incorrect entries in validated cell.
For instance, you can set up a rule that limits data entry to 4-digit numbers between 1000 and
9999. If the user types something different, Excel will show an errorexplaining what they
have done wrong.
How to do data validation in Excel

To add data validation in Excel, perform the following steps.

1. Open the Data Validation dialog box

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.

2. Create an Excel validation rule

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.

3. Add an input message (optional)

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:
4. Display an error alert (optional)
In addition to the input message, you can show one of the following error alerts
wheninvalid data is entered in a cellalert.

Alert type Description

Stop (default)

The strictest alert type that prevents users from entering invalid data.

You click Retry to type a different value or Cancel to remove the


entry.

Warning

Warns users that the data is invalid, but does not prevent entering it.

You click Yes to input the invalid entry, No to edit it, or Cancel to
remove the entry.

Information

The most permissive alert type that only informs users about an
invalid data entry.

You click OK to enter the invalid value or Cancel to remove it from


the cell.
To configure a custom error message, go to the Error Alert tab and
define thefollowing parameters:

 Check the Show error alert after invalid data is entered box
(usually selectedby 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 followingtext
will show up: This value does not match the data validation restrictions defined for this cell.
Excel data validation examples

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 lookat Excel data validation with
custom formulas in a separate tutorial.

As you already know, the validation criteria are defined on the Settings tab ofthe Data
Validation dialog box (Data tab > DatValidation).
Types of Data Validation
1.Data Type Check
A data type check confirms that the data entered has the correct data type. For example, a
field might only accept numeric data. If this is the case, then any data containing other
characters such as letters or special symbols should be rejected by the system.
2.Code Check
A code check ensures that a field is selected from a valid list of values or follows certain
formatting rules. For example, it is easier to verify that a postal code is validby checking it
against a list of valid codes. The same concept can be applied to other items such as country
codes and NAICS industry codes.
3.Range Check
A range check will verify whether input data falls within a predefined range. For example,
latitude and longitude are commonly used in geographic data. A latitude value should be
between -90 and 90, while a longitude value must be between -180 and 180. Any values out
of this range are invalid.
4.Format Check

Many data types follow a certain predefined format. A common use case is date columns that
are stored in a fixed format like “YYYY-MM-DD” or “DD-MM- YYYY.” A data validation
procedure that ensures dates are in the proper format helps maintain consistency across data
and through time.
5.Consistency Check

A consistency check is a type of logical check that confirms the data’s been entered in a
logically consistent way. An example is checking if the delivery date is after the shipping
date for a parcel.
6.Uniqueness Check

Some data like IDs or e-mail addresses are unique by nature. A database should likely have
unique entries on these fields. A uniqueness check ensures that an item is not entered multiple
times into a database.
Meaning of Auditing

Auditing refers to the systematic examination and evaluation of records, processes, systems,
or data to ensure accuracy, compliance, and efficiency. In the context of financial records, it
involves reviewing and verifying the accuracy of financial statements and ensuring that they
conform to accounting standards and regulations. Auditing can also apply to various other
domains such as IT systems, operational processes, and quality management.We all know
why Excel is so popular throughout the world. Because of its wide range of formulae,
functions, and macros, it can almost surely handle every task of the world with ease. All
these formulae are easy to use, but it becomes a tough job when using multiple formulae in
combination. It sometimes does not give the result as expected. It becomes easy to trace back
the errors if formulae are quite simple. However, when we start creating some complex
formulae, it becomes a hectic job to track the errors with such formulae. Thus, it becomes an
important job for the user to be able to trace back the errors. Fortunately, Excel provides a
variety of built-in tools that allow you to audit the errors with formulae and correct the same.

We have six main tools under Excel for formulae auditing listed below:

1. Trace Precedents
2. Trace Dependents
3. Remove Arrows
4. Show Formulas
5. Error Checking (includes Error Checking, Trace Error, Circular References)
6. Evaluate Formula

Let’s explore each of these formula auditing tools under Excel. Example #1 – Trace
Precedents
Trace precedents are the cells affecting the values/formulae under the selected cell. Suppose
we have five principle amounts that we can invest with a rate of interest of 12% and a period
of 6 years. We have calculated the interest amounts for all five principles using a simple
formula Principle*Interest Rate*Period(in years). See the screenshot below:

Now, if we click on cell A6 and press F2, we can see the formula we
used to capture Interest Amount 1.

This clearly shows us that Interest Amount 1 is based on Principle Amount 1 Value
(A2) and Interest Rate (H2) as well as Period (I2). However, Excel has its way of
showing this relationship through cell precedents under the formula auditing group.

Step 1: Select cell A6 from the current worksheet and click on the Formulas tab at the
Excel ribbon.

Step 2: Once you click on the Formulas tab, you can see the Formula Auditing group
under it with various formula auditing options available.

Step 3: Click on the Trace Precedents option under the Formula Auditing group, and
it will make a connection between all the cells that are affecting the currently selected
cell through blue-colored arrows as shown below:
Trace Precedents help you find out what cells are associated with the formula using
which the values are obtained.

Example #2 – Remove Arrows

Trace Precedents were nice since they let us see the relationship between different
cells in our Excel sheet. However, we don’t want those here in our file. We wanted
those to remove. Is it Possible? Well, possible!
Go again to the Formula Auditing group (Select the Formulas tab through the ribbon
if you are not there and you can see this group within it). Click on the Remove
Arrows dropdown

Once you click on the Remove Arrows dropdown, you can see a list of options as
shown below:

You can either hit the first option, which removes all the arrows (precedents and
dependents), or you can select particular options that remove the precedents or the
dependents.
2.What is data validation criteria for data entry in a cell range?explain it with examples.
Ans. Use Data Validation to allow specific entries in cells on a worksheet. For example, show a list, limit the
cells to whole numbers, or text of specific length. This tutorial shows the available settings, with an example
of each setting.

Whole Number

If you allow Whole numbers, you can set or exclude a range of numbers, or specify aminimum number or
maximum number
To set the allowed values, you can

1. Type the values into the Data Validation dialog box


2. OR, Refer to cells on the worksheet
3. OR, Use formulas to set the values.

For example, in this example, the MAX and MIN functions set the minimum andmaximum values, based
on values in cells J5:J9.
 Minimum: =MIN(J5:J9)
 Maximum: =MAX(J5:J9)
Decimal

If you allow Decimals, you can set or exclude a range of numbers, or specify a
minimum number or maximum number.

1. Type values into the Data Validation dialog box


2. OR, Refer to cells on the worksheet
3. OR, Use formulas to set the values

In this example, values are entered for the minimum and maximum.

List

You can create a drop down list of items to select in a cell, or group of cells. See the
examples and instructions here: Data Validation

For example, show a drop down list of weekday names.


Date

If you allow Dates, you can set or exclude a range of dates, or specify a minimum
date or maximum date.

1. Type the dates into the Data Validation dialog box


2. OR, Refer to cells that contain dates on the worksheet
3. OR, Use formulas to set the

datesSee more Date Rule examples

For example, enter a date that is between the 2 dates entered in worksheet cells F1 and
F2.
3. What Are Trace Precedents and Trace Dependents Features in Excel?
Ans. In Excel, we use formulas with cell references, and thus, the formula cell becomes
dependent on those cells. Trace precedent and dependent features help you to show the
relation between the cells.

Trace Precedent:
This feature will show the cells affecting the active cell value. There will be an
arrow from the controlling cells to the result cells to identify the trace precedents. Suppose
you have selected a cell C13 with the formula “=SUM(C8:C12)”. Then, the cell range
C8:C12 is the trace precedent for the active cell.

Trace Dependent:
This feature will show the dependent cells of a cell or the cells where cell references are
created using the selected cell. In other words, trace dependent feature identifies the cells
affected by the selected cell. Suppose you have selected a cell C13 with the formula
“=SUM(C8:C12)”. Now, if you select cell C8 and want to identify the trace dependents of
this cell, then it will show up in cell C13.
We must prepare the dataset with the appropriate formula and cell references
according to your needs. You may need to use trace precedents or dependents to
showcase the relationship between the cells.
As a result, you will see that there will be a blue arrow that is directed to the active
cell with some bold dots in it.

Using the Trace Dependents Feature in Excel

 Select the cell you want to identify the trace dependents.

 Go to the Formulas tab in the top ribbon.

 Select the Trace Precedents option in the Formula Editing menu.


There will be blue arrows from the active to the dependent cells. You can trace the
dependent cells of the active cells in the active Excel worksheet.\

Remove a Trace Arrow or Blue Arrow from the Excel Worksheet

 Go to the Formula tab in the top ribbon.

 Select the “Remove Arrows” option, and you will see that all arrows will be
removed.
Assignment 4
1. What is macros and what its work in excel?

Ans. A macro is a single instruction that expands automatically into a set of instructions to
perform a particular task. In programming, macros are a way to make code more efficient and
manageable by allowing a series of commands to be grouped together under a single name.
This is especially useful for repetitive tasks or for code that needs to be reused in multiple
places.

Macros are prevalent in various contexts, including:

1. Programming Languages: Such as C and C++.


2. Software Applications: Such as Microsoft Excel or Word.
3. Assemblers and Compilers: Used in low-level programming.

Types of Macros

1. Preprocessor Macros: Common in C/C++ programming, where


they are definedusing the `#define` directive.
2. Inline Macros: Used in some programming languages to inline code.
3. Script Macros: Found in scripting languages like Python.
4. Application Macros: Used in software like Excel (VBA macros).

Best Practices for Using Macros

1. Use Macros Judiciously:


- Overusing macros can make code harder to debug and understand.
2. Prefer Constants and Inline Functions:
- Where possible, use constants (`const`) and inline functions
instead of macros toavoid issues with scope and type safety.
3.Avoid Side Effects:
- Ensure macros do not have side effects that can lead to unexpected behaviors.
4. Document Macros:
- Clearly document the purpose and usage of macros for maintainability
What are Excel macros?

A macro is a small program or set of actions that you can run repeatedly. Excel macros are
used to automate repetitive tasks to save a lot of time and hassle.

For example, open and take a look at the practice Excel workbook.

Businesses would often have lists like this one. These are potential customers they might
want to reach out to and market their products.

Notice how Columns C to H are just pieces of information extracted from Columns A & B.
(Learn how to extract strings from texts in this tutorial!)

To streamline the worksheet, you can hide Columns A & B. You can also hide the rest of
the columns on the right starting from Column I.

Let’s do this using Excel macros!

How to record Excel macros


1. Click on the View tab in the Excel ribbon
2. Next, click on the Macros button on the right side of the View ribbon

3. This will open the Macros drop-down. Click Record Macro.

Enter a name for your macro, something like Hide_Columns.


Excel macros can be stored in the Personal Macro Workbook. This is saved in
the system files of Microsoft Excel and macros saved here can be used in other
workbooks.

For this Excel macro tutorial, you only need to save the macros in the current
Excel file.

4. Select Store macro in: This Workbook then click the OK button.

Excel is now recording your actions to create a macro.

5. Select Columns A & B and then right-click on the highlighted Column


Bar to Hide them.

6. Then select Column I and press Ctrl + Shift + Right Arrow to include all
remainingcolumns on the right.

7. Then select Column I and press Ctrl + Shift + Right Arrow to include all remaining
columns on the right.
Right-click on the highlighted Column Bar then click on Hide. Your worksheet should now look like this:

To end the macro recording:

On the View ribbon, click on Macros and sele Stop Recording.

You have created your first macro in Excel!

But wait, where is the recorded macro?


To view all of the available Excel macros :
1. Select View Macros.

2. This opens the Macro window. Saved macros will be listed here and you
can Run whichever one you need.

You can also click on Edit to view the VBA code window.

1. The VBA code editor opens.


Notice the Hide_Columns Sub procedure. You don’t have to write or edit VBA code for
the macro.

Excel automatically generated each code line based on the recorded keystrokes and mouse
clicks.
The Record Macro feature is powerful enough for general spreadsheet automation needs.
But if you want to customize your own VBA macro, you can learn more about Visual Basic
for Applications (VBA) here.

Using the Developer tab

Let’s record another macro to Unhide the hidden columns.

This time, you can record the macro from the Developer tab.

The Developer tab gives you access to a lot of useful Microsoft Excel features such as
the Visual Basic Editor. It also allows you to quickly insert form controls such as buttons
and checkboxes.

However, the Developer tab is not visible in the Excel ribbon by default.

To add it:

1. Right-click on the Excel ribbon.

Select Customize the Ribbon.


2. This opens the Customize Ribbon window.

On the right side, check the Developer tab checkbox.

3. You should now see the Developer tab.


To start recording the Unhide macro:

1. Click on the Record Macro button in the Developer tab.

2. Name this macro Unhide_Columns.

3. Click OK.

The recording has started.

4. Press Ctrl + A twice to select all cells.

5. Right-click anywhere on the Column Bar then click Unhide.

1. Click on the Stop Recording macro button to finish up.

Now you have two recorded macros that can be executed.


How to run an Excel macro
To run your macros:

Click on the Macros button from the Developer tab.

1. In the Macro window, select the macro Hide_Columns and click on Run.

The macro executes the actions recorded earlier and hides the unnecessary columns. You can
also run macros from the View ribbon.

Run Excel macro from the View tab


This time, run the Unhide_Columns to show all the columns.
1. On the View ribbon, click the Macros button and select View Macros.

2. Select the Unhide_Columns macro and Run it.


This unhides all the columns in the worksheet.
As you can see, the Macro window allows you to quickly run all the available macros.But you can execute
them even faster by using buttons and shortcuts ❗
Run Excel macro from a button
For this next example, you will assign macros to buttons which will be located on top of the
table.
1. Insert 2 rows above the table headers. Select Row 1 then press Ctrl + Shift + Plus
Sign(+) twice.

2. To create a button, click on Insert > Illustrations > Shapes.

Then select the Rectangle.


3. Draw a rectangle and format it as you’d like. Label it “HIDE”.

This will be your HIDE button. Place it between columns A & B so it will be hidden with
the columns when the macro runs.

4. To assign a macro, right-click the shape and select Assign Macro.

5. In the Assign Macro window, select Hide_Columns and click OK.

The Hide button now works!

Now, do the same for the Unhide_Columns macro.


6. Create another rectangle button and label it “UNHIDE”.

7. Repeat Steps 4 & 5 but this time, assign the Unhide_Columns macro.
Now you can quickly run your macros using the HIDE and UNHIDE buttons.

Run Excel macro from a shortcut key


It is sometimes better to run macros using a keyboard shortcut.

For this next example, you want to quickly highlight people on the list that expressed
interest in the business.

To create a macro for this:


1. Select any cell within the table.

2. On the Developer tab, toggle ON the Use Relative References button.

3. Start recording with the Record Macro button on the Developer tab.

Or, you can also click the Record Macro button on the Status Bar.
4. Name the macro Mark_Interested.

Then assign a shortcut key. For example, Ctrl + Q.

Click OK. The recording has now started.

4. Highlight the row of the Active Cell using the keyboard shortcut Shift + Space Bar.

When selecting cells or expanding selections while recording a macro, it is best to use keyboard shortcuts.
This is so that Excel can record the selections as relative references.

For example, if you select Row 4 by clicking on the Row Bar, Excel will record this as an absolute
reference. This means it will always select Row 4regardless of the currently Active Cell.
When you use the Shift + Space Bar shortcut instead, it tells Excel to select the row of the current Active
Cell.

4. Apply the formatting:

 Fill using the color Green


 Change font color to White
When you use the Shift + Space Bar shortcut instead, it tells Excel to select the row of
the current Active Cell.

5. Apply the formatting:

 Fill using the color Green


 Change font color to White

6. End the macro recording from the Status Bar

All done!

Try to use the shortcut Ctrl + Q to quickly apply formatting to entire rows.

Saving macro-enabled workbooks

If you save the practice workbook, this window will pop up:
This is because the practice workbook is currently saved with the .xlsx file extension which
does not support macro features. To save properly, change it to the .xlsm file extension for
macro-enable workbooks. Keep this in mind when saving your work.

2. How To Creating a Macro?


Ans. Creating a macro in Excel can dramatically streamline your workflow, saving you time
and effort as Excel Macro serves an efficient role. Macros in Excel are powerful tools that
allow you to automate repetitive tasks, making your data management more efficient and
error-free. Have you ever wondered, How do you create a macro in Excel? This guide will
walk you through the process step-by-step. Whether you’re a beginner or looking to enhance
your Excel skills, understanding what is macro in excel and how to use it can transform the
way you handle data. Get ready to unlock the full potential of Excel by learning how to create
a macro in ecxel with ease and precision.
How to Create a Macro in Excel

Here are the steps from which you can come to know how to create a macro for Excel.

Step 1: Open MS Excel. Then go to File tab and select options bar.

Step 2: Select Customize Ribbon

Select customize ribbon option and make sure developer checkbox is selected
Step 3: Select “Ok”

Developer menu will appear in the ribbon.

Step 4: Select Developer Tab and Click “Record Macro”

Select Developer tab and click on record macro. It will start recording a
macro. It will then record the various steps. Click on stop recording to stop
recording a macro
Step 5: Select Name of Macro and Assign a shortcut Key
A new dialog box will open. Select the name of the macro and assign a shortcut key
for the Excel macro. You can use current workbook, new workbook , or personal
macro workbook to store the macro. Click Ok to continueen.
3. Excel Macro Button: What is it and How to Create One?

Ans. It is no secret that macros make an Excel user's life easier. So too, do buttons. So it makes
sense that combining the two will help make tasks as simple as possible. Macro buttons give you
the power to run through many steps with a single click, saving you so much time and effort
when using Excel.

Let's focus on creating your first button in Excel and assigning a macro to it.

Making User-Friendly Macro Buttons in Your Spreadsheets

Macros make life easier. Buttons make life easier. It's only natural to marry the two and make the
processes you repeatedly have to perform as simple as possible. You can literally run through a
hundred steps with just one small click using macros and buttons–which, of course, is both
empowering and gratifying.

3 Types of Macro Buttons for Worksheets

In this post I explain three different types of buttons you can place on a worksheet.

1. Shapes

2. Form Control Buttons

3. ActiveX Control Buttons

We'll start with my favorite…

1. Using Shapes to Create Macro Buttons

In my opinion, the best way to create macro buttons is to use shapes. Shapes give us the most
styling/formatting options, and we can make them look like buttons you click every day on
modern web pages.
Below, we will create the button on a worksheet and assign a macro to it. Here are the steps to
create the macro button

1. Draw a shape on the sheet (Insert tab > Shapes drop-down > Rectangle shape).

2. Add text to the shape (Right-click > Edit Text | or double-click in the shape).

3. Assign the macro (Right-click the border of the shape > Assign Macro…)
4. Select the macro from the list. It's important to note that the macro should be selected
from the This Workbook list so that when you share the workbook with other users, the
macro will be shared as well.

If you assign the macro from another workbook, the button will not work for the people you
share the workbook with

5. Press OK.
When you hover your mouse over the shape it will now turn into the hand pointer cursor.
Clicking the shape will run the macro.

That's it! That's how you assign a macro to a button that you've created right on the worksheet.

Modifying the Button

If you need to select the shape to change its look or move it, hold the Ctrl key while clicking
the shape. This will prevent the macro from running and allow you to modify the shape. Excel
offers a ton of options on the Format tab for changing the shape style, shape effects, font color
or size, etc.

Preventing the Button from Resizing with Cell Changes

Depending on your settings, it's likely that when you change the size of the column or row that
your button is on, the button size will change as well. If you don't want that to happen, you can
easily adjust the settings to keep the button static.

First, just right click on the button and choose Size and Properties…
This will bring up the Format Shape pane. There are options for you to choose from in
the Properties section, depending on whether or not you want the button to move or resize when
changes are made to your sheet.
2. Using Form Controls to Create Macro Buttons

The next option for macro buttons is Form Controls. They are essentially the same in terms of
set-up.

The difference between Controls and Shapes is the styling.

Form Control buttons do give the appearance of being pressed when you click on them, which is
kind of cool. However, they unfortunately look like a button you'd find on an early version of
Windows.

We cannot change the color of the button either. The only formatting options are for
the font type, size, and color.

Insert a Form Control Button


To add a Form Control button, just go to the Developer tab and click on the Insert button. A
drop-down gives you options under Form Controls.
Using ActiveX Controls for Macro Buttons
The last option is ActiveX Control buttons.

The ActiveX Control buttons do have more formatting options and you can change the button
color. They also require you to add an event macro in the sheet module that will run when the
button is clicked. This is done by right-clicking the button and choosing View Code. You can
add other event triggers like double-click. This could perform a different action/macro when the
button is double-clicked. However, I don't recommend the ActiveX Control buttons. In my
experience they are glitchy in terms of consistent appearance. They can end up really big or
really small when changes are made to the sheet or when the file is shared back and forth
between users.
Assignment 5

1.what is creating and formatting chart?

Ans. Creating and formatting charts involves a few key steps:

1. Data Preparation: Ensure your data is well-organized and clean. Each variable should
be in its own column, with rows representing individual observations.
2. Chart Selection: Choose the right type of chart for your data. Common chart types
include bar charts, line charts, pie charts, scatter plots, and histograms.
3. Chart Creation: Use a tool or programming language to create the chart. Popular tools
include Microsoft Excel, Google Sheets, and programming languages like Python (with
libraries such as Matplotlib, Seaborn, Plotly).
4. Chart Formatting: Customize your chart to improve readability and presentation. This
includes setting titles, axis labels, colors, legends, and grid lines.

Steps in the Example

1. Importing Matplotlib: We start by importing the matplotlib.pyplot module.


2. Sample Data: We define two lists: months and sales, representing the months of the year
and corresponding sales figures.
3. Creating the Chart: We create a line chart with plt. Plot (), specifying the x and y data,
marker style, line style, and color.
4. Formatting the Chart:
o Plt. Title (), plt.xlabel (), and plt.ylabel () are used to add a title and axis labels.
o Plt. Grid (True) adds a grid for better readability.
o plt.xticks () and plt.yticks () set the font size for the tick labels.
o plt.ylim () sets the limits for the y-axis.
o Plt. Legend () adds a legend to the chart.
5. Displaying the Chart: plt. Show () displays the chart.
Other Customizations

 Colors: Use different colors to distinguish multiple data series.


 Annotations: Add text annotations to highlight specific data points.
 Subplots: Create multiple charts in a single figure using plt.subplot().
 Styles: Matplotlib comes with several predefined styles (e.g., plt.style.use('ggplot')).

Fig.5.1

Understanding chart types

Understanding different types of charts is essential for effectively communicating data. Here are
some common types and their purposes:

1. Line Chart:
o Purpose: Show trends over time or relationships between continuous variables.
o Example Use: Tracking stock prices over a month.
2. Bar Chart:
o Purpose: Compare quantities of different categories.
o Example Use: Sales figures of different products in a year.
3. Pie Chart:
o Purpose: Display parts of a whole, where all segments together represent 100%.
o Example Use: Market share of different companies in an industry.
4. Histogram:
o Purpose: Visualize distribution of data over intervals (bins) or frequencies.
o Example Use: Distribution of ages in a population.
5. Scatter Plot:
o Purpose: Show relationships between two variables.
o Example Use: Correlation between temperature and ice cream sales.
6. Area Chart:
o Purpose: Display cumulative totals over time.
o Example Use: Cumulative rainfall over a year.
7. Box Plot (Box and Whisker Plot):
o Purpose: Summarize distribution of data, highlighting median, quartiles, and
outliers.
o Example Use: Comparison of salaries across departments.
8. Bubble Chart:
o Purpose: Show relationships between three variables using bubbles of different
sizes.
o Example Use: GDP growth (x-axis), population (y-axis), and country size
(bubble size).
9. Heat map:
o Purpose: Visualize data density or concentration within a grid.
o Example Use: User activity on a website by time of day.
10. Gantt Chart:
o Purpose: Display project schedules, tasks, and their dependencies over time.
o Example Use: Project management to track task completion.
Understanding these chart types helps in choosing the most appropriate one for your data to
effectively convey insights and trends. Each type serves different purposes based on the nature of
the data and the message you want to communicate

Differentiate between different charts

Let's differentiate between some common types of charts based on their characteristics, usage,
and the type of data they are best suited for:

1. Line Chart vs. Bar Chart:


o Line Chart:
 Characteristics: Uses lines to connect data points, ideal for showing
trends over time or continuous data relationships.
 Usage: Suitable for displaying changes over time, correlations between
variables, and trends.
 Example: Stock prices over a month, temperature variations throughout a
day.
o Bar Chart:
 Characteristics: Uses bars to represent data categories, with the length or
height of bars indicating the magnitude of the values.
 Usage: Effective for comparing discrete categories or groups of data.
 Example: Sales figures of different products, distribution of votes among
political parties.
2. Pie Chart vs. Histogram:
o Pie Chart:
 Characteristics: Represents parts of a whole, with each slice representing
a proportion of the total.
 Usage: Useful for illustrating percentages or proportions, where the total
is known and categories are mutually exclusive.
 Example: Market share of companies, distribution of expenses in a
budget.
o Histogram:
 Characteristics: Uses bars to represent the frequency or distribution of
numerical data within intervals (bins).
 Usage: Shows the shape and spread of data distribution, especially useful
for large datasets.
 Example: Distribution of ages in a population, grades distribution in a
class.
3. Scatter Plot vs. Bubble Chart:
o Scatter Plot:
 Characteristics: Uses points to represent the relationship between two
variables, with each point showing the value of both variables for a single
data point.
 Usage: Displays correlations or relationships between variables.
 Example: Relationship between height and weight, correlation between
study hours and exam scores.
o Bubble Chart:
 Characteristics: Similar to a scatter plot but uses bubbles of different
sizes to represent a third variable (often magnitude).
 Usage: Shows relationships between three variables (x-axis, y-axis, bubble
size).
 Example: GDP growth vs. population vs. country size.
4. Box Plot vs. Heat map:
o Box Plot (Box and Whisker Plot):
 Characteristics: Displays the distribution of data along with outliers,
showing median, quartiles, and range.
 Usage: Summarizes data distribution and identifies outliers effectively.
 Example: Comparison of test scores across different schools, distribution
of income across regions.
o Heat map:
 Characteristics: Represents data density or concentration within a grid or
matrix using color gradients.
 Usage: Visualizes complex data sets, highlighting patterns or correlations.
 Example: Website user activity by time of day, correlation matrix in
statistical analysis.
5. Area Chart vs. Gantt Chart:
o Area Chart:
 Characteristics: Uses filled areas under the line to show cumulative totals
over time.
 Usage: Displays trends over time while emphasizing the cumulative total.
 Example: Cumulative rainfall over a year, cumulative sales over quarters.
o Gantt Chart:
 Characteristics: Represents project schedules, tasks, and their
dependencies over time using bars.
 Usage: Manages project timelines, tasks, and resource allocation.
 Example: Project management, construction project timelines.

Understanding these differences helps in selecting the appropriate chart type based on the data
characteristics, the story you want to tell, and the insights you want to convey to your audience
effectively.

Create combination charts like: column and line, column and are

Combination charts, such as column and line or column and area charts, are effective for
visualizing multiple datasets that have different scales or units of measurement. Here’s how you
can create these combination charts:

Column and Line Chart Purpose: This combination is useful when you want to compare two
datasets that may have different units of measurement, such as sales revenue (in dollars) and
customer count (numeric).

Steps to Create:

1. Prepare Your Data:


o You should have two sets of data: one for the column chart (typically a count or
sum) and another for the line chart (typically a trend or percentage).
2. Insert a Clustered Column Chart:
o Select your data range including both sets of data.
o Go to the Insert tab in Excel or similar spreadsheet software.
o Choose "Clustered Column Chart" from the Charts group.
3. Add a Line Series:
o Right-click on the chart, then choose "Select Data".
o Click "Add" under "Legend Entries (Series)".
o Select your line series data (usually the data with a different scale or type).
o Ensure the line series uses the secondary axis.
4. Format the Chart:
o Format the secondary axis to ensure the line data fits the scale properly.
o Adjust colors, labels, and other formatting options as needed.

Example: Comparing monthly sales revenue (column) with monthly customer satisfaction
percentage (line).

Column and Area Chart Purpose: This combination is effective when you want to show
cumulative totals (area) alongside individual values (columns), such as cumulative sales (area)
and monthly sales (columns).

Steps to Create:

1. Prepare Your Data:


o You need two sets of data: one for the column chart (individual values) and
another for the area chart (cumulative totals).
2. Insert a Clustered Column Chart:
o Select your data range including both sets of data.
o Insert a Clustered Column Chart as described above.
3. Add an Area Series:
o Right-click on the chart, then choose "Select Data".
o Click "Add" under "Legend Entries (Series)".
o Select your area series data (cumulative totals).
o Ensure the area series uses the secondary axis.
4. Format the Chart:
o Adjust the secondary axis to fit the area series properly.
o Customize colors, labels, and other formatting elements.

Example: Showing monthly sales (column) alongside cumulative sales (area).

By combining different types of charts in this way, you can effectively convey multiple
dimensions of your data, making your visualizations more insightful and engaging. Adjust the
specifics based on the software you are using, such as Excel, Google Sheets, or other data
visualization tools.
Assignment 6

1.What is Column Chart?

Ans. A column chart is used to compare discrete categories of data by showing bars of different
heights.

Steps to Create:

1. Prepare Your Data:


o Ensure you have your data organized with categories (such as months, products,
regions) in one column and their corresponding values (such as sales numbers,
quantities) in another column.
2. Select Your Data:
o Highlight the data you want to include in your chart, including column headers.
3. Insert the Column Chart:
o In Excel or similar spreadsheet software:
 Go to the Insert tab.
 Click on "Column" in the Charts group.
 Choose the type of column chart you want (e.g., clustered column, stacked
column).
4. Customize the Chart:
o Once the chart is inserted, you can customize various elements:
 Axis Titles: Add titles to the x-axis (category axis) and y-axis (value axis).
 Chart Title: Give your chart a descriptive title.
 Data Labels: Display values on top of each column for clarity.
 Legend: Modify the legend if necessary to clearly label each series.
5. Format and Style:
o Adjust colors, fonts, and other formatting options to make your chart visually
appealing and easy to understand.
o You can right-click on elements (bars, axes, titles) to access formatting options.
6. Review and Finalize:
o Double-check your chart for accuracy and clarity.
o Make sure all necessary labels and titles are included.

Example: Creating a column chart to compare monthly sales figures.

Tips for Effective Column Charts:

 Use Clear Categories: Ensure your categories are clearly labeled on the x-axis for easy
comparison.
 Avoid Overcrowding: If you have many categories, consider grouping them or using a
horizontal bar chart for better readability.
 Highlight Key Data: Use colors or patterns to highlight important data points or trends.
 Provide Context: Include axis labels and a chart title to provide context and clarify what
the chart represents.

Column charts are versatile and widely used for presenting categorical data comparisons. They
are effective for showing trends, comparisons, and distributions across different categories or
groups. Adjust the specifics based on your data and the software you are using for chart creation.

2.What is Bar Chart

Ans. To create a bar chart, you typically need some data that you want to visualize. Bar charts
are useful for comparing categories of data or showing how different variables compare against
each other. Here’s a general outline of how you can create a bar chart:

Steps to Create a Bar Chart:

1. Define your categories (x-axis): Determine what categories or groups you want to
compare. This could be different items, time periods, locations, etc.
2. Gather your data (y-axis): Collect the numerical data corresponding to each category.
This data will determine the height of each bar in the chart.
3. Choose a tool or software: You can use tools like Excel, Google Sheets, Python
(Matplotlib or Seaborne), R (ggplot2), or online chart generators to create your bar chart.
4. Input your data: Enter your data into the chosen tool or software. Typically, you list
your categories along the x-axis and their corresponding values along the y-axis.
5. Create the chart: Use the charting options to select a bar chart type. Customize the chart
as needed (colors, labels, titles).
6. Label your axes: Ensure your x-axis (horizontal) and y-axis (vertical) are properly
labeled to indicate what each represents.
7. Add a title: Give your chart a clear and descriptive title that summarizes what the chart is
showing.
8. Review and finalize: Double-check your chart for accuracy and clarity. Make any
necessary adjustments to improve readability.

Interpretation:

 Each bar represents a grade level (Grade 9 to Grade 12).


 The height of each bar corresponds to the number of books read by students in that grade.
 The x-axis (horizontal axis) shows the different grades.
 The y-axis (vertical axis) shows the number of books read.

How to Read the Chart:

 Grade 12 students read the most books (35), followed by Grade 10 (30), Grade 9 (25),
and Grade 11 (20).
 The bar chart makes it easy to compare the reading habits across different grades
visually.

Creating the Chart:

You can create a similar bar chart using tools like Excel, Google Sheets, Python (Matplotlib or
Seaborne), or any other charting software. Simply input the grade-wise data, select the bar chart
type, customize the colors and labels as needed, and your chart will be ready to interpret and
share
3.What is Line Chart?

Ans. A line chart is another type of visualization that is useful for showing trends over time or
relationships between continuous variables. Here’s how you can create a line chart and interpret
it:

Steps to Create a Line Chart:

1. Define your variables:


o Decide which variable you want to plot on the x-axis (typically time or another
continuous variable).
o Determine the variable for the y-axis, which represents the values you want to
track or compare.
2. Gather your data:
o Collect the data pairs (x, y) that you want to plot on the line chart. For example, if
you're tracking sales over months, you'll have pairs like (January, 100), (February,
120), etc.
3. Choose a tool or software:
o Use software like Excel, Google Sheets, Python (Matplotlib or Seaborn), R
(ggplot2), or online chart generators to create your line chart.
4. Input your data:
o Enter your data into the chosen tool or software. Typically, your x-axis data will
be time points or another continuous variable, and your y-axis data will be the
corresponding values.
5. Create the chart:
o Select the line chart type in your chosen tool. Customize the chart as needed
(colors, labels, titles).
6. Label your axes:
o Ensure your x-axis (horizontal) and y-axis (vertical) are properly labeled with
descriptive names or units.
7. Add a title:
o Give your chart a clear and informative title that summarizes what the chart is
showing.
8. Review and finalize:
o Double-check your line chart for accuracy and clarity. Adjust formatting or
styling to enhance readability if necessary.

Interpretation:

 The x-axis shows the months of the year.


 The y-axis shows the sales figures.
 Each point on the line represents the sales figure for that particular month.
 The line helps visualize the trend in sales over the course of the year.

Creating the Chart:

You can create a similar line chart using any of the mentioned tools. Input your monthly sales
data, select the line chart type, customize it with colors, labels, and titles, and your line chart will
effectively illustrate the sales trend over time.

4.What is Line Chart?

Ans. A pie chart is a circular graph that is divided into slices to illustrate numerical proportions.
Each slice represents a category's contribution to the whole. Pie charts are useful for showing
relative sizes or percentages of different categories in a dataset.

Here are some key points about pie charts:

1. Circular Representation: The entire pie represents 100% of the data or the whole. Each
slice represents a proportionate part of that whole.
2. Slice Size: The size of each slice is proportional to the quantity it represents. Larger slices
indicate a larger proportion of the whole dataset.
3. Categories: Each slice is labeled with the category it represents, often with a percentage
or numerical value showing its exact proportion.
4. Comparison: Pie charts are effective for comparing parts of a whole at a single point in
time. However, they may not be as effective for comparing multiple datasets or changes
over time.
5. Limitations: Pie charts can become difficult to interpret if there are too many slices or if
the slices are very small, making it hard to distinguish between them.
6. Usage: They are commonly used in business reports, presentations, and academic papers
to visually represent percentages or proportions.

Creating a pie chart graph typically involves using software or tools that support data
visualization. Here’s a general outline of how you can create a pie chart graph:

1. Choose Your Data: You need data that represents different categories and their
corresponding values or percentages. For example, let's say you have data on the market
share of different smartphone brands: Apple, Samsung, Huawei, and others.
2. Calculate Percentages (if necessary): Ensure that your data adds up to 100% if you're
representing proportions. If your data is already in percentages, you can skip this step.
3. Select a Tool: There are many tools available for creating pie charts, ranging from
spreadsheet software like Microsoft Excel or Google Sheets to dedicated data
visualization tools like Tableau, Power BI, or online services like Google Charts or
Plotly.
4. Input Your Data: Enter your data into the chosen tool. Most tools will have specific
ways to input data for pie charts. Usually, you’ll input the category names and their
corresponding values or percentages.
5. Create the Pie Chart: Once your data is inputted, select the option to create a pie chart.
The software will generate a pie chart based on your data.
6. Customize (if needed): You can often customize aspects of the pie chart such as colors,
labels, font sizes, and the order of slices to improve readability and visual appeal.
7. Save or Export: After creating and customizing your pie chart, save it in your preferred
format (e.g., image file, PDF) or embed it directly into your document or presentation.
Fig 6.1

5.What is XY scatter chart?

Ans. An XY scatter chart, also known as a scatter plot, is a type of graph that shows the
relationship between two variables plotted as points on a Cartesian coordinate system. Each point
represents a single data point with specific values for both variables. Here’s how you can create
an XY scatter chart:

1. Prepare Your Data: You need two sets of data—one for each variable you want to plot
against each other. For example, if you're plotting height (independent variable) against
weight (dependent variable), you should have pairs of height and weight values.
2. Select a Tool: Like with pie charts, there are various software tools that can create XY
scatter plots. Common choices include Microsoft Excel, Google Sheets, Python's
matplotlib library, R programming language with ggplot2, and others.
3. Input Your Data: Input your data into the selected tool. Typically, one column will
represent the independent variable (e.g., height) and another column the dependent
variable (e.g., weight).
4. Create the Scatter Plot:
o Excel: Select your data, then go to the Insert tab and click on Scatter or Scatter
with Straight Lines.
o Google Sheets: Select your data, then go to Insert > Chart > Scatter chart.
o Python (matplotlib): Use the matplotlib library to create a scatter plot.
5. Customize (if needed): You can customize the appearance of your scatter plot by
adjusting axis labels, title, point size, colors, and adding grid lines or trend lines.
6. Save or Export: Once satisfied with your scatter plot, save it in your desired format (e.g.,
image file, PDF) or embed it into your document or presentation.

6.What is Area chart?

Ans. An area chart is a type of graph that displays quantitative data visually, similar to a line
graph but with the area below the line filled in with color or shading. Here’s how you can
understand and create an area chart:

Understanding Area Charts:

1. Data Representation:
o An area chart represents data points connected by lines, where the area between
the line and the x-axis (or another baseline) is filled with color or shading.
o Each data point typically represents values over time or categories.
2. Use Cases:
o Area charts are useful for showing how different data series contribute to the
whole over time or across categories.
o They can highlight trends and patterns effectively, especially when multiple series
are plotted on the same chart.
3. Comparison to Line Charts:
o Area charts are similar to line charts but emphasize the magnitude of change over
time or across categories more visibly due to the filled area.
o Line charts are clearer for exact data points, while area charts emphasize the
relative contribution of each data series.

Creating an Area Chart:

To create an area chart, you typically use software tools like Microsoft Excel, Google Sheets,
Python's matplotlib library, R's ggplot2 package, or similar tools:
 Excel / Google Sheets:
o Arrange your data with categories or time periods in columns and corresponding
values in rows.
o Select your data range, including headers.
o In Excel, go to the Insert tab > Area Chart. Choose a subtype that suits your data
arrangement (stacked area, 100% stacked area, etc.).
o In Google Sheets, go to Insert > Chart > Chart type > Area chart.

Tips for Using Area Charts:

 Stacked vs. Unstacked: Choose between stacked (to show total magnitude and
contribution of parts) and unstacked (to compare trends without stacking).
 Data Clarity: Ensure your data is suitable for an area chart, where patterns and trends are
clear and meaningful.
 Color and Contrast: Use contrasting colors for different series to enhance readability,
especially when overlapping.

7.What is Surface chart?

Ans. A surface chart is a type of 3-dimensional plot that displays data points defined by three
variables—typically two independent variables plotted on the x-axis and y-axis, and a dependent
variable represented by the z-axis. It visualizes how the values of the dependent variable (z-axis)
change in response to changes in the independent variables (x-axis and y-axis).

Understanding Surface Charts:

1. Representation:
o A surface chart consists of a grid of data points where each point has coordinates
(x, y, z).
o The x and y axes represent the independent variables, often numerical values that
define positions on the plot.
o The z-axis represents the dependent variable, usually a numerical value that
determines the height (or color intensity) of the surface at each (x, y) coordinate.
2. Use Cases:
o Surface charts are useful for visualizing complex data relationships, such as
terrain elevation, temperature distribution, or other continuous variables.
o They are commonly used in scientific research, engineering, geography, and
finance to analyze data with multiple variables.
3. Comparison to Other Charts:
o Unlike 2D charts (like line graphs or scatter plots), surface charts provide a more
comprehensive view of data that varies continuously across two dimensions.
o They can be more visually striking and provide deeper insights into how variables
interact and influence each other.

Creating a Surface Chart:

Creating a surface chart typically requires specialized software or libraries capable of 3D


plotting. Here’s how you can create a surface chart using popular tools:

 Excel:
o Arrange your data with x-values in one column, y-values in another column, and
corresponding z-values (dependent variable) in a grid format.
o Select your data range, including headers.
o Go to the Insert tab > 3D Surface > Surface chart.

Tips for Using Surface Charts:

 Data Preparation: Ensure your data is structured with three variables (x, y, z) in a grid
format suitable for 3D plotting.
 Color Mapping: Use color gradients (color maps) to represent the z-axis values, making
it easier to interpret changes in the dependent variable.
 Interaction: Some tools allow for interactive exploration of surface charts, enabling
users to rotate, zoom, and explore data dynamically.
Surface charts are powerful tools for visualizing complex relationships in data where multiple
variables interact. They provide insights into how changes in one variable affect another across a
continuous range, making them valuable in various fields of study and analysis.

8.What is Bubble chart?

Ans. A bubble chart is a type of chart that displays three dimensions of data. It is similar to a
scatter plot but adds a third dimension by representing data points as bubbles, where the size of
each bubble corresponds to the value of a third variable. Here’s how you can understand and
create a bubble chart:

Understanding Bubble Charts:

1. Data Representation:
o Bubble charts use three variables for each data point: two variables that are
plotted on the x-axis and y-axis, and a third variable that determines the size of
the bubble (or marker).
o The x-axis and y-axis variables are typically independent variables, while the size
of the bubble represents a dependent variable.
2. Use Cases:
o Bubble charts are useful for visualizing and comparing relationships between
three variables.
o They are effective in showing clusters and patterns within data, especially when
dealing with large datasets or when outliers need to be emphasized.
3. Comparison to Other Charts:
o Unlike scatter plots, where each point is represented by a marker of the same size,
bubble charts use varying bubble sizes to encode additional information about a
third variable.
o They are more visually impactful and allow for quick interpretation of data
patterns and trends.
Creating a Bubble Chart:

Creating a bubble chart can be done using various software tools and programming languages.
Here’s how you can create a bubble chart using Excel, Python (matplotlib), and R (ggplot2):

 Excel:
o Arrange your data with x-values in one column, y-values in another column, and
the size of the bubble (dependent variable) in a third column.
o Select your data range, including headers.
o Go to the Insert tab > Bubble Chart.

Tips for Using Bubble Charts:

 Scale of Bubble Sizes: Ensure that the scale of bubble sizes accurately represents the
magnitude of the third variable. Use proportional scaling to avoid misleading
interpretations.
 Color and Transparency: Use color coding and transparency (alpha) to distinguish
groups or categories within the bubble chart, especially when overlapping bubbles.
 Interactivity: Some tools offer interactive features that allow users to hover over bubbles
for additional information or drill down into specific data points.

You might also like