0% found this document useful (0 votes)
15 views176 pages

Cse-Data Analytics With Excel - Laboratory Manual

The document is a lab manual for a Data Analytics with Excel course (BCS358A) for the III Semester, outlining course objectives, experiments, and outcomes for the academic year 2023-2024. It covers various Excel functionalities such as data manipulation, pivot tables, and dashboard creation, along with practical experiments to enhance students' proficiency in data analysis. Additionally, it provides an introduction to Microsoft Excel, its features, shortcuts, benefits, and applications in data management.
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)
15 views176 pages

Cse-Data Analytics With Excel - Laboratory Manual

The document is a lab manual for a Data Analytics with Excel course (BCS358A) for the III Semester, outlining course objectives, experiments, and outcomes for the academic year 2023-2024. It covers various Excel functionalities such as data manipulation, pivot tables, and dashboard creation, along with practical experiments to enhance students' proficiency in data analysis. Additionally, it provides an introduction to Microsoft Excel, its features, shortcuts, benefits, and applications in data management.
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/ 176

T.

JOHN INSTITUTE OF TECHNOLOGY

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

Data Analytics with Excel


(BCS358A)

III Semester
LAB MANUAL
(Effective for the Academic Year 2023 -2024)

Data Analytics with Excel


Course Code BCS358A Semester 3
Teaching Hours/Week (L: T: P: S) 0:0:2:0 CIE Marks 50
Credits 01 SEE Marks 50
Exam Hours 100
Examination type (SEE) Practical
Course objectives:
● To Apply analysis techniques to datasets in Excel
● Learn how to use Pivot Tables and Pivot Charts to streamline your workflow in Excel.
● Understand and identify the principles of data analysis.
● Become adept at using Excel functions and techniques for analysis.
● Build presentation ready dashboards in Excel
Sl.NO Experiments
Getting Started with Excel: Creation of spread sheets, Insertion of rows and columns, Drag
1 & Fill, use of Aggregate functions.

2
Working with Data: Importing data, Data Entry & Manipulation, Sorting & Filtering.

3
Working with Data: Data Validation, Pivot Tables & Pivot Charts.
Data Analysis Process: Conditional Formatting, What-If Analysis, Data Tables, Charts &
4 Graphs.

5 Cleaning Data with Text Functions: use of UPPER and LOWER, TRIM function,
Concatenate.

Cleaning Data Containing Date and Time Values: use of DATEVALUE function,
6
DATEADD and DATEDIF, TIMEVALUE functions.

Conditional Formatting: formatting, parsing, and highlighting data in spreadsheets during


7
data analysis.

Working with Multiple Sheets: work with multiple sheets within a workbook is crucial for
8 organizing and managing data, perform complex calculations and create comprehensive
reports.
Create worksheet with following fields: Empno, Ename, Basic Pay (BP), Travelling
Allowance (TA), Dearness Allowance (DA), House Rent Allowance (HRA), Income Tax
9 (IT), Provident Fund (PF), Net Pay (NP). Use appropriate formulas to calculate the above
scenario. Analyze the data using appropriate chart and report the data.
Data Analytics with Excel
Create worksheet on Inventory Management: Sheet should contain Product code, Product
name, Product type, MRP, Cost after % discount, Date of purchase. Use appropriate formulas
10
to calculate the above scenario. Analyze the data using appropriate chart and report the data.

Create a worksheet on Sales analysis of Merchandise Store: data consisting of Order ID,
Customer ID, Gender, age, date of order, month, online platform, Category of product, size,
11 quantity, amount, shipping city and other details. Use of formula to segregate different
categories and perform a comparative study using pivot tables and different sort of charts.

12 Generation of report & presentation using Autofilter &macro.

Course outcomes (Course Skill Set):


At the end of the course the student will be able to:
● Use advanced functions and productivity tools to assist in developing worksheets.
● Manipulate data lists using Outline and PivotTables.
● Use Consolidation to summarise and report results from multiple worksheets.
● Apply Macros and Autofilter to solve the given real world scenario.
Data Analytics with Excel

Introduction to Microsoft Excel


The use of computer technology in the experimental sciences has facilitated the way physicists, engineers,
chemists, mathematicians, and many others are able to acquire and analyze large amounts of experimental data.
There are several hardware and software programs available for this purpose. Examples of software include
Microsoft EXCEL, Mathematica, Math Cad, Data Studio, and Cricket Graph. One of the objectives of this
laboratory course is that the student becomes proficient in using computer technology for analyzing data. In
industry most data is acquired and analyzed using some type of hardware and software and seldom is it touched
by human hands. Therefore, providing the science student with a proficiency in using computer technology to
analyze data in the laboratory will be a very valuable skill that will certainly benefit them in their future careers.

Microsoft Excel is a spreadsheet program used to record and analyze numerical and statistical data. Microsoft
Excel provides multiple features to perform various operations like calculations, pivot tables, graph tools, macro
programming, etc. It is compatible with multiple OS like Windows, macOS, Android and iOS. An Excel
spreadsheet can be understood as a collection of columns and rows that form a table. Alphabetical letters are
usually assigned to columns, and numbers are usually assigned to rows. The point where a column and a row
meet is called a cell. The address of a cell is given by the letter representing the column and the number
representing a row.

MS Excel is a spreadsheet program where one can record data in the form of tables. It is easy to analyze data in
an Excel spreadsheet. The image given below represents how an Excel spreadsheet looks like as shown in Fig.
1 below:
Fig. 1. Excel Spreadsheet
How to open MS Excel?
To open MS Excel on your computer, follow the steps given below:

● Click on Start
● Then All Programs
● Next step is to click on MS Office
● Then finally, choose the MS-Excel option
Alternatively, you can also click on the Start button and type MS Excel in the search option available.

What is a cell?
A cell is a smallest but most powerful part of a spreadsheet. You can enter your data into a cell either
by typing or by copy-paste. Data can be a text, a number, or a date. You can also customize it by changing
its size, font color, background color, borders, etc. Every cell is identified by its cell address, cell address
contains its column number and row number (If a cell is on the 11th row and on column AB, then its
address will be AB11).

Understanding the worksheet (Rows and Columns, Sheets, Workbooks)


A worksheet is a collection of rows and columns. When a row and a column meet, they form a cell.
Cells are used to record data. Each cell is uniquely identified using a cell address. Columns are usually
labelled with letters while rows are usually numbers.

A worksheet is made up of individual cells which can contain a value, a formula, or text. It also has an
invisible draw layer, which holds charts, images, and diagrams. Each worksheet in a workbook is
accessible by clicking the tab at the bottom of the workbook window. In addition, a workbook can store
chart sheets; a chart sheet displays a single chart and is accessible by clicking a tab.

A workbook is a collection of worksheets. By default, a workbook has three cells in Excel. You can
delete or add more sheets to suit your requirements. By default, the sheets are named Sheet1, Sheet2 and
so on and so forth. You can rename the sheet names to more meaningful names i.e. Daily Expenses,
Monthly Budget, etc.
A workbook is a separate file just like every other application has. Each workbook contains one or
more worksheets. You can also say that a workbook is a collection of multiple worksheets or can be a
single worksheet. You can add or delete worksheets, hide them within the workbook without deleting
them, and change the order of your worksheets within the workbook.

Microsoft Excel Window Components


Various editing and formatting can be done on an Excel spreadsheet. Discussed below are the various
features of MS Excel. The image in Fig. 2. below shows the composition of features in MS Excel:

Fig. 2. Features in MS-EXCEL


Active Cell
An Active Cell in Excel is a cell that is currently selected. It will be highlighted by a rectangular box
and its address will be shown in the address bar. You can activate a cell by clicking on it or by using
your arrow buttons. To edit a cell, you double-click on it or use F2 as well.
Column
A COLUMN in Excel is a vertical set of cells. A single worksheet contains 16384 total columns. Every
column has its own alphabet for identity, from A to XFD. You can select a column by clicking on its
header.
Row
A ROW in Excel is a horizontal set of cells. A single worksheet contains 1048576 total rows. Every
row has its own number for identity, starting from 1 to 1048576. You can select a row by clicking on the
row number marked on the left side of the window.
Fill Handle
Fill Handle a small dot present in the lower right corner of the active cell. It helps you to fill numeric
values, text series, insert ranges, insert serial numbers, etc.
Address Bar
It shows the address of the active cell. If you have selected more than one cell, then it will show the
address of the first cell in the range.
Formula Bar
The formula bar is an input bar, below the ribbon. It shows the content of the active cell, and you can
also use it to enter a formula in a cell.
Title Bar
The title bar will show the name of your workbook, followed by the application name (“Microsoft
Excel”).
File Menu
The file menu is a simple menu like all other applications. It contains options like (Save, Save As,
Open, New, Print, Excel Options, Share, etc).
Quick Access Toolbar
A toolbar to quickly access the options which you frequently use. You can add your favorite options
by adding new options to the quick access toolbar.
Ribbon
Starting from Microsoft Excel 2007, all the options menus are replaced with the RIBBON. Ribbon
tabs are a bunch of specific option group which further contains the option. Worksheet Tab
This tab shows all the worksheets which are present in the workbook. By default, you will see, three
worksheets in your new workbook with the names Sheet1, Sheet2, and Sheet3 respectively. Status
Bar
Status Bar in Excel is a thin bar at the bottom of the Excel window. It will give you instant help once
you start working in Excel.
Features of Excel
● Home
Comprises options like font size, font styles, font colour, background colour, alignment, formatting
options and styles, insertion and deletion of cells and editing options.
● Insert
Comprises options like table format and style, inserting images and figures, adding graphs, charts and
sparklines, header and footer option, equation and symbols.
● Page Layout Themes, orientation and page setup options are available under the page layout
option.
● Formulas Since tables with a large amount of data can be created in MS excel, under this feature,
you can add formulas to your table and get quicker solutions.
● Data
Adding external data (from the web), filtering options and data tools are available under this category.
● Review Proofreading can be done for an excel sheet (like spell check) in the review category and
a reader can add comments in this part.
● View
Different views in which we want the spreadsheet to be displayed can be edited here. Options to zoom
in and out and pane arrangement are available under this category.

Ms-Excel shortcuts:
1. Ctrl+N: To open a new workbook.
2. Ctrl+O: To open a saved workbook.
3. Ctrl+S: To save a workbook.
4. Ctrl+C: To copy the selected cells.
5. Ctrl+V: To paste the copied cells.
6. Ctrl+X: To cut the selected cells.
7. Ctrl+W: To close the workbook.
8. Delete: To remove all the contents from the cell.
9. Ctrl+P: To print the workbook.
10. Ctrl+Z: To undo.
Benefits of Using MS Excel
MS Excel is widely used for various purposes because the data is easy to save, and information can be added
and removed without any discomfort and less hard work.
Given below are a few important benefits of using MS Excel:
● Easy to Store Data: Since there is no limit to the amount of information that can be saved in a
spreadsheet, MS Excel is widely used to save data or to analyse data. Filtering information in Excel is
easy and convenient.
● Easy to Recover Data: If the information is written on a piece of paper, finding it may take longer,
however, this is not the case with excel spreadsheets. Finding and recovering data is easy.
● Application of Mathematical Formulas: Doing calculations has become easier and less time-taking
with the formulas option in MS excel
● More Secure: These spreadsheets can be password secured in a laptop or personal computer and the
probability of losing them is way lesser in comparison to data written in registers or piece of paper.
● Data at One Place: Earlier, data was to be kept in different files and registers when the paperwork was
done. Now, this has become convenient as more than one worksheet can be added in a single MS
Excel file.
● Neater and Clearer Visibility of Information: When the data is saved in the form of a table, analyzing
becomes easier. Thus, information in a spreadsheet is more readable and understandable.

Applications of MS Excel:
● Data Entry and Storage
● Performing Calculations
● Data Analysis and Interpretation
● Reporting and Visualizations
● Accounting and Budgeting
● Collection and Verification of Business Data
● Calendars and Schedules
● Administrative and Managerial Duties
● Forecasting
● Automating Repetitive Tasks
Experiment No: 1

Aim:
Getting Started with Excel: Creation of spread sheets, Insertion of rows and columns, Drag & Fill, use of Aggregate
functions.

1. Create a suitable examination database and find the sum of the marks(total) of each Student, Average, pass or
fail and grade secured by each student.
Rules
● Pass if marks in each subject >=35,
● Distinction if average>=70,
● First class if average>=60 but <70,
● Second class if average>=50 but<60, ● Third class if average>=35andbut<50, ● Fail if marks in
any subject is<35.
Display average marks of the class, subject wise and pass percentage

Solution:
To find the grade of a student we need to do the following steps
Step1: Typing Student database in Excel
Type the student database with the required fields starts from A1 cell as follows:

Step2: To find Total Marks of Student


To find the total marks of a student click on the cell “G2” and type the following formula
=SUM(B2:F2)
To find the total marks for the remaining students select “G2” cell and drag down to the
remaining students.
Step 3: To find Average marks
To find the average marks of the student click on the cell “H2”and type the following formula =G2/500*100 To
find the average marks for the remaining students select “H2” cell and drag down to the all the students.

Step4: To Check Pass or Fail


To check whether the student is Pass or Fail select the cell “I2” and type the following formula
=IF(AND(B2>=35,C2>=35,D2>=35,E2>=35,F2>=35),"Pass","Fail")
To check the remaining students are Pass/Fail select the cell “I2”and drag down to all the students.
Step5: To find Grade
To find the grade of a student click on the cell “J2” and type the following formula
=IF(AND(B2>=35,C2>=35,D2>=35,E2>=35,F2>=35),IF(H2>=75,"Distinction",IF(H2>=65,"First
Class",IF(H2>=50,"Second Class",IF(H2>=35,"Third Class")))),"Fail")

Finally, we get the following student database with total, average and grade

Experiment No: 2
Aim:
Working with Data: Importing data, Data Entry & Manipulation, Sorting & Filtering.
Microsoft Excel is a powerful tool for managing and analysing data. Whether you are dealing with a large dataset
or a simple list, Excel offers various features for importing data, entering information, manipulating content, sorting,
and filtering.

Importing Data:
Excel allows you to import data from various sources, making it a versatile tool for handling diverse datasets.

Step 1: Open Excel and Navigate to Data Import


Opening Excel:
Start by launching Microsoft Excel on your computer.
Access Data Import:
Click on the "File" tab in the ribbon at the top of Excel.
Select "Open" from the menu to open a previously saved file.
Alternatively, choose "Get External Data" or "Import" based on your Excel version and select the source of data
(e.g., CSV, Database, Web).
Import Data:
If you choose "From Text/CSV," navigate to the location of your CSV file and click "Import."
Excel will guide you through the import process, allowing you to specify delimiters, data types, and other settings.
Data Entry and Manipulation:
Excel provides a user-friendly interface for entering data and performing basic manipulations.

Step 2: Data Entry and Basic Manipulation


Entering Data:
Click on a cell and start typing your data. Press Enter to move to the cell below or use the arrow keys to navigate.
Excel automatically adjusts the width of the cell to fit your data.
Data Manipulation:
Copying and Pasting:
Select a range of cells, right-click, and choose "Copy."
Move to the destination, right-click, and choose "Paste" to copy the data.
Formulae and Functions:
Enter formulas in cells to perform calculations. For example, =SUM(A2:A10) calculates the sum of cells A2 to
A10.
Excel offers a wide range of functions (AVERAGE(), IF(), VLOOKUP(), etc.) for advanced calculations.

Data Validation:
Select a range, go to the "Data" tab, and click on "Data Validation."
Set criteria to restrict data entry, such as allowing only numbers between a specific range.
Sorting Data:
Sorting data helps in organizing information in a meaningful way for better analysis.
Step 3: Sorting Data
Sorting Ascending/Descending:
Select the column you want to sort.
Click on the "Data" tab and choose "Sort A to Z" for ascending or "Sort Z to A" for descending order.
Alternatively, right-click the selected column and choose "Sort." Complex Sorting:
For sorting based on multiple criteria (e.g., first sort by Category, then by Price within each Category), use the
"Sort" dialog box.
Specify the primary and secondary sort columns along with the sort order for each.
To Sort the Data:
Steps: 1. Select data on list to be sorted.

For example salary in the above figure.


2. Click the Data Menu and select the sort option. The sort dialog box appears. 3.
Select the ascending and descending option in the Sort by section
4. Click the OK button
Filtering Data:
Filtering data allows you to focus on specific subsets of information within your
dataset. Step 4: Filtering Data Applying Filters:
Select your data range.
Click on the "Data" tab and select "Filter."
Dropdown arrows will appear next to each column header.
Click on these arrows to filter data based on specific criteria.
Filtering Criteria:
For text columns, you can filter by specific text values.
For numeric columns, you can filter by numbers greater than, less than, or within a specific range.
For date columns, filter options include dates within a specific period.

2. Prepare a salary statement for the following information and plot a graph

I. Using MS-Excel calculate the following


a. DA is 3% of basic
b. HRA is 5% of basic
c. Tax is 5% of Gross
II. Find maximum and minimum of Basic pay
III. Count the number of employees where net salary is more than 10,000
IV. Sort the data on the basis of employee name in ascending order
V. Plot the column graph by taking employee name on x-axis and net salary on y-axis
VI. Apply custom filter and display the empnames for whom the Basic pay>=10000 Solution:

1. Type the text i.e. “EMPLOYEES SALARY STATEMENT” in the cell from “A1 to H1” using the merge and
centre button.
2. Type the SL NO, EMP NAME, BASIC PAY, DA, HRA, GROSS, TAX, NET SALARY in A2, B2, C2, D2,
E2, F2, G2, H2 respectively.
3. Put the data for SL NO, EMP NAME, BASIC PAY
4. Calculation for
a. DA = D3*3%
b. HRA = D3*5%
c. GROSS = D3+E3+F3
d. TAX = G3*5%
e. NET SLARY = G3-H3
5. Calculation for
a. MAXIMUM = max(D3:D8)
b. MINIMUM = min(D3:D8)
c. COUNT = countif(D3:D8,”>=10000”)
6. For Sort
a. Select data range -> Click data menu ->Sort -> Sort by -> Emp Name -> Sort on -> Values ->
Order -> A to Z
7. For Graph
a. Select data range -> Click insert menu -> Chart -> Select column chart -> OK
8. For Filtering
a. Apply filter selecting Basicpay, then -> click Number filter -> Select greater than and equal to
-> enter 10000.
9. Click OK
Experiment No: 3
Aim:
Working with Data: Data Validation, Pivot Tables & Pivot Charts

Data Validation
Data validation is a feature in Excel which is used to control what users can enter into a cell. It allows you to
dictate specific rules. It also allows users to display a custom message if users try to enter invalid data.

How to Validate Data in Excel?


Step 1: Launch the Data Validation dialogue Box
First, we must select all the cells or a range to which we wish to apply validation. Next, we need to navigate the
Data tab - Data Tools group and select 'Data Validation' to launch the data validation dialogue box.

Step 2: Set the Data Validation Rule


After the data validation dialogue box is displayed, we need to go to the Settings tab to define validation criteria.
We can provide the desired values, cell references, or formulas in the validation criteria.
Suppose we need to restrict users to enter marks for each student, but the marks must be supplied in between 0
to 100. This way, we can eliminate the chances of wrong inputs to some extent. For this, we need to set the
criteria in the Settings tab as the following image:
After all the validation settings have been set, we need to click the OK button to close the validation dialogue
box or move to the next tab to insert an input message and/or error alerts. The other two tabs are optional and
used to inform users to enter appropriate values according to the validation rules.
Step 3: Create an Input Message to Display (Optional)
If we want to display a message to the user saying which type of data is supported or allowed in the selected
cell, we can use the input message tab. Using the input message, we can inform the user regarding the allowed
data type format when the user selects a corresponding cell/ cells.
For example, we can display the following message into the desired fields (cell/cells/range).
Once the input message is entered, we can click the OK button or move to the Error Alert tab further. After
setting up an input message, the corresponding cell (s) displays the message like this:

Step 4: Add an Error alert (Optional)


In addition to an input message, we can also set an error alert to display when the user enters invalid data into
the respective cells. Moreover, we can also add a custom error message.

In the above image, we used the option 'Stop' as an error alert style. We can use the other two styles, Warning
and Information, accordingly. Lastly, we must click the OK button.
When the user enters invalid data, it triggers an error window with a message, and the invalid input is not
allowed.

If we don't set a custom error alert and set the validation rules ins Excel cell(s), Excel automatically displays
the default error alert with the predefined error message. It looks like this:

[NOT TO BE INCLUDED IN LAB RECORD]


Settings Tab
The settings tab is where you enter the validation criteria. There are eight options available to validate for user
input:
● Any Value - It removes any existing data validation.
● Whole Number - It allows only whole numbers. For example, you can specify that the user must enter
the number between 0 to 30.
● Decimal - The user must enter a number with decimal values.
● List - The user will have to create a drop-down list to choose from.
● Date - The user will have to enter the date format.
● Time - The user should enter a time.
● Text Length - It validates input based on the length of the data.
● Custom - It validates the user input using a custom formula.
Input Message Tab
● You can set the input message to explain what data is allowed in a given cell. This tab is optional.
● Check the 'show input message when the cell is selected'.
● Enter a title.
● Enter an Input message.

Error Alert Tab


You can show the error message if the user tries to enter the invalid data.
On the error message tab:
● Check the ‘Show error alert after invalid data is entered’ box.
● Enter a title.
● Enter an error message.

Now, when you try to enter the value beyond the range, you will get an error message.
Now that we are familiar with the basic concepts, let’s look at a step-by-step process to implement data validation
in excel.
Example 1: Restricting users to enter/choose specified values from the drop-down menu
Suppose we want to restrict users to select an option/ value from a list of predefined values. This case of data
validation is used in most of the Excel sheets. In our example, we want to restrict users to select a gender from
the predefined values, such as 'MALE', FEMALE' or 'OTHER'.

For this, we need to perform the following steps:


○ First, we need to select a cell(s) to apply the validation. In our example, we select cell B1.
○ Next, we launch the Data Validation dialogue box by clicking the Data Validation icon under the Data tab
on the toolbar.

○ After that, we need to choose the List option from the drop-down menu under the Settings tab and
specify the list items into the source box separated by a comma. However, if we want to specify
several list items, we must refer to a range of cells containing list items instead of entering them
directly inside the source box.
○ Lastly, we need to click the OK button. We can also specify the input message from the next tab, as shown
in the following images:

In addition to the input message, we can also specify the error alert message from the next tab:
When the user clicks on the restricted cell(s), the drop-down icon is displayed. Users can click the icon
to open a list and select the desired option.

When the user clicks on the restricted cell(s), the input message is displayed:
When the user enters the custom text, the error message is displayed:

That is how we can use the data validation feature in Excel and create drop-down lists.
Example 2: Restricting users to enter valid Email Id
Suppose we want to apply data validation in specific cells to restrict users to enter an email id with a valid
format, i.e. username@domain, where the domain refers to an email service provider.

For this, we need to perform the following steps:


○ First, we need to select a specific cell(s) to apply the data validation. In our case, we select cell B1.
○ Next, we need to navigate to the Data tab and select the 'Data validation' option.

○ After that, we need to choose the Custom option from the drop-down menu under the Settings We specify
a custom formula "=ISNUMBER(FIND("@",B1))" without outer quotes to allow only values with the
sign '@' in a selected cell.

○ We can specify the input message to instruct users to enter a valid email id, as shown below:
○ Lastly, we must specify the Error alert message, which will only be displayed if a user enters an invalid
email id.

○ Once all the options are configured in a data validation dialogue box, we need to click the OK button to
save the applied changes.
Now, when a user selects the corresponding cell, the input message is displayed:
When a user enters a valid email id, it is accepted in a cell after passing the applied validation:

When a user enters an invalid email id, the validation fails and triggers an error alert:

That is how we can restrict specific cells in Excel to accept only the valid email id/ address. Similarly, we can
type any other specific text to restrict the user inputs accordingly. However, it is important to note that the FIND
function is case sensitive. So, if we don't need to restrict the case of the text, we can use the SEARCH function
instead of the FIND function in the above process.
Example 3: Restricting users from entering future dates
Entering dates in an Excel sheet is one of the common data entry tasks. Sometimes, users may enter wrong dates
or future dates, even when all the dates we want in a sheet are recorded earlier. In this case, we can use data
validation to prevent future dates in a specific cell(s). For this, we need to perform the following steps:
○ First, we need to select the specific cell(s) and click the Data Validation icon from the toolbar. We must
choose an option Date in a Data Validation dialogue box under the Settings tab. It will display two more
sections, such as Date and End Date. Since we want to block future dates, we select the options 'less
than or equal to' and put the date formula "=TODAY()" without quotes in corresponding sections.
Once all the validations are set, the Settings tab looks like this:

○ After setting the validation rules, we can set an input message and the error alert using the next two tabs
similar to what we performed in the above two examples.
Now, when a user selects a respective cell(s), the input message is displayed:

When a user enters a future date, the error alert is displayed:


Similarly, we can allow other restrictions for dates using the Data Validation feature in Excel.
Example 4: Restricting users to enter values of the specified length
Sometimes, there may be cases when we want to restrict users to enter values of any particular length or
characters. Suppose there is a need to accept PAN Numbers in cells entered by users. Since the PAN number is
a ten-digit unique alphanumeric number, we can create validation rules to accept the values with length 10.
For this, we need to perform the following steps:
○ First, we need to select the specific cell(s) and click the Data Validation icon from the toolbar. We must
choose an option Text Length in a Data Validation dialogue box under the Settings tab. It will display
two more sections, such as Data and End Length. Since we want to allow 10 digits, we select the options
'equal to' and put the length '10' without quotes in corresponding sections, respectively. Once all the
validations are set, the Settings tab looks like this:
○ After setting the validation rules for a specific text length, we can set an input message and the error alert
using the next two tabs.
Now, when a user selects a respective cell(s), the input message is displayed:

When a user enters a value of less than 10 characters or more than 10 characters, the error alert message
is displayed:

Similarly, we can set other restrictions for length based values using the Data Validation feature in Excel.
Example 5: Restricting users to enter values in Uppercase only
If we want to receive user inputs only in uppercase, we can set the validations in Excel. Suppose we want to
accept the entry of a PAN number that contains both the text and numbers. However, we only want to take it in
uppercase by the user.
For this, we need to perform the following steps:
○ First, we need to select the specific cell(s) and click the Data Validation icon from the toolbar. We must
choose the option Custom in a Data Validation dialogue box under the Settings tab. Next, we need to
apply the custom formula "=EXACT(B1,UPPER(B1))" without quotes. We enter cell B1 in a formula
as B1 is the result cell in our example.
In the above image, the upper function is used to match characters with uppercase. Moreover, the
EXACT function ensures that cell entry matches with the uppercase version.
○ After setting the validation rules for uppercase entries only, we can set an input message and the error
alert using the next two tabs.
Now, when a user selects a respective cell(s), the input message is displayed:

When a user enters an invalid value (value in lowercase), the error alert is displayed:
Similarly, we can set other restrictions with a custom formula using the Data Validation in Excel. How
to edit Validation Rules in Excel?
Suppose we have applied the data validation in an Excel sheet earlier and now edit the validation rules. We must
perform the following steps to change or edit the validation rules:
○ Select the cells with validation.
○ Launch Data Validation Dialog Box from the toolbar.
○ Make the desired changes under the corresponding tabs in a dialogue box and click OK.
How to locate or find Data Validation?
Suppose we have an Excel sheet with the data validation rules applied to it. Now, we want to find out the cells
with validation. We must perform the following steps to find cells with data validation in Excel:
○ Navigate the Home tab on the toolbar.
○ Lick the drop-down icon in a shortcut, 'Find & Select' under the 'Editing' group. ○
Select the 'Data Validation' option from the list.

After using the steps, the corresponding cells with the validation will be selected/ highlighted.
How to copy Validation Rules to other cells?
Suppose we have some cells with validation rules, and we want to apply the same validation rules on other cells.
To do this, we can use Paste Special feature, as listed below:
○ Select and copy the cells with validation using the shortcut Ctrl + C.
○ Use the shortcut Ctrl + Alt + V + N to paste the copied cells onto the cells we wish to apply data validation.
Alternately, we can launch the paste special dialogue box using the right-click menu options and select
the 'Validation' option.
This will apply the same validation on other cells on which the contents are copied. How
to remove or clear Data Validation?
There are two common methods used to remove or clear all the validation in Excel:
Method 1: Clear Data Validation using the Data Validation Dialog Box ○
Select all the cells to remove data validation.
○ Launch the Data Validation dialogue box from the ribbon.
○ Click the option 'Clear All' under the Settings tab and the OK

This will remove/ clear data validation from the selected cell(s).
Method 2: Clear Data Validation using Paste Special Feature
○ Select empty cells without validation rules, and copy using the shortcut Ctrl +C.
○ Select cell(s) with the validation from which the data validation is to be removed.
○ Paste the contents using Ctrl + V and hit Enter
This method typically replaces the data validation with the empty cells, which is an indirect way of removing
data validation in Excel.

[FOR LAB RECORD]

Pivot Tables
Pivot tables are one of 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. Order ID, Product, Category, Amount, Date and Country.

Insert a Pivot Table


To insert a pivot table, execute the following steps.
1. Click any single cell inside the data set.
2. On the Insert tab, in the Tables group, click PivotTable.

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.
Drag fields
The PivotTable Fields pane appears. To get the total amount exported of each product, drag the following fields
to the different areas.

1. Product field to the Rows area.


2. Amount field to the Values area.
3. Country field to the Filters area.

Below you can find the pivot table. Bananas are our main export product. That's how easy pivot tables can be!
[NOT FOR LAB RECORD]

Sort a Pivot 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.

Result.
Filter
Because we added the Country field to the Filters area, we can filter this pivot table by Country. For example,
which products do we export the most to France?
1. Click the filter drop-down and select France.
Result. Apples are our main export product to France.

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.
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 pivot table. Next, to get the total amount exported to each country, of each product, drag the following
fields to the different areas.
1. Country field to the Rows area.
2. Product field to the Columns area.
3. Amount field to the Values area.
4. Category field to the Filters area.
Below you can find the two-dimensional pivot table.

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 Excel has to offer.
[FOR LAB RECORD]
Pivot Chart
A pivot chart is the visual representation of a pivot table in Excel. Pivot charts and pivot tables are connected with
each other.
Below you can find a two-dimensional pivot table. Go back to Pivot Tables to learn how to create this pivot table.

Insert Pivot Chart


To insert a pivot chart, execute the following steps.
1. Click any cell inside the pivot table.
2. On the PivotTable Analyze tab, in the Tools group, click PivotChart.
The Insert Chart dialog box appears.
3. Click OK.
Below you can find the pivot chart. This pivot chart will amaze and impress your boss.

Note: any changes you make to the pivot chart are immediately reflected in the pivot table and vice versa.

[NOT FOR LAB RECORD] Filter Pivot Chart


To filter this pivot chart, execute the following steps.
1. Use the standard filters (triangles next to Product and Country). For example, use the Country filter to only
show the total amount of each product exported to the United States.
2. Remove the Country filter.
3. Because we added the Category field to the Filters area, we can filter this pivot chart (and pivot table) by
Category. For example, use the Category filter to only show the vegetables exported to each country.

Change Pivot Chart Type


You can change to a different type of pivot chart at any time.
1. Select the chart.
2. On the Design tab, in the Type group, click Change Chart Type.
3. Choose Pie.

4. Click OK.
Result:
Note: pie charts always use one data series (in this case, Beans). To get a pivot chart of a country, swap the data
over the axis. First, select the chart. Next, on the Design tab, in the Data group, click Switch Row/Column.

Experiment 4
Aim:
Data Analysis Process: Conditional Formatting, What-If Analysis, Data Tables, Charts & Graphs.

Conditional Formatting
Conditional formatting in Excel enables you to highlight cells with a certain color, depending on the cell's value.
Highlight Cells Rules
To highlight cells that are greater than a value, execute the following steps.
1. Select the range A1:A10.

2. On the Home tab, in the Styles group, click Conditional Formatting.


3. Click Highlight Cells Rules, Greater Than.

4. Enter the value 80 and select a formatting style.

5. Click OK.
Result. Excel highlights the cells that are greater than 80.
6. Change the value of cell A1 to 81.
Result. Excel changes the format of cell A1 automatically.

Note: you can also use this category (see step 3) to highlight cells that are less than a value, between two values,
equal to a value, cells that contain specific text, dates (today, last week, next month, etc.), duplicates or unique
values.

[NOT FOR LAB RECORD] Clear Rules


To clear a conditional formatting rule, execute the following steps.
1. Select the range A1:A10.
2. On the Home tab, in the Styles group, click Conditional Formatting.

3. Click Clear Rules, Clear Rules from Selected Cells.

Top/Bottom
To highlight cells that are above average, execute the following steps.
1. Select the range A1:A10.
2. On the Home tab, in the Styles group, click Conditional Formatting.

3. Click Top/Bottom Rules, Above Average.

4. Select a formatting style.


5. Click OK.
Result. Excel calculates the average (42.5) and formats the cells that are above this average.

Note: you can also use this category (see step 3) to highlight the top n items, the top n percent, the bottom n
items, the bottom n percent or cells that are below average.
Conditional Formatting with Formulas
Take your Excel skills to the next level and use a formula to determine which cells to format. Formulas that
apply conditional formatting must evaluate to TRUE or FALSE.
1. Select the range A1:E5.

2. On the Home tab, in the Styles group, click Conditional Formatting.


3. Click New Rule.

4. Select 'Use a formula to determine which cells to format'.


5. Enter the formula =ISODD(A1) 6. Select a formatting style and click OK.

Result. Excel highlights all odd numbers.


Explanation: always write the formula for the upper-left cell in the selected range. Excel automatically copies
the formula to the other cells. Thus, cell A2 contains the formula =ISODD(A2), cell A3 contains the formula
=ISODD(A3), etc.
Here's another example.
7. Select the range A2:D7.

8. Repeat steps 2-4 above.


9. Enter the formula =$C2="USA" 10. Select a formatting style and click OK.
Result. Excel highlights all USA orders.

Explanation: we fixed the reference to column C by placing a $ symbol in front of the column letter ($C2). As
a result, cell B2, C2 and cell D2 also contain the formula =$C2="USA", cell A3, B3, C3 and D3 contain the
formula =$C3="USA", etc.
Color Scales
You can also use conditional formatting in Excel to assign different colors to different values. This allows you
to quickly identify high and low points in your dataset.
Tip: learn more about color scales and learn how to create the heat map shown above.
Highlight Blank Cells
You can also use conditional formatting in Excel to identify and format blank cells. This is useful for ensuring
data completeness and quickly shows where information is missing.

[FOR LAB RECORD]


What-If Analysis
What-If Analysis in Excel allows you to try out different values (scenarios) for formulas. The following
example helps you master what-if analysis quickly and easily.
Assume you own a bookstore and have 100 books in storage. You sell a certain % for the highest price of $50
and a certain % for the lower price of $20.

If you sell 60% for the highest price, cell D10 calculates a total profit of 60 * $50 + 40 * $20 = $3800.
Create Different Scenarios
But what if you sell 70% for the highest price? And what if you sell 80% for the highest price? Or 90%, or even
100%? Each different percentage is a different scenario. You can use the Scenario Manager to create these
scenarios.
Note: You can simply type in a different percentage into cell C4 to see the corresponding result of a scenario in
cell D10. However, what-if analysis enables you to easily compare the results of different scenarios. Read on.
1. On the Data tab, in the Forecast group, click What-If Analysis.

2. Click Scenario Manager.

The Scenario Manager dialog box appears.


3. Add a scenario by clicking on Add.
4. Type a name (60% highest), select cell C4 (% sold for the highest price) for the Changing cells and click on
OK.

5. Enter the corresponding value 0.6 and click on OK again.

6. Next, add 4 other scenarios (70%, 80%, 90% and 100%).


Finally, your Scenario Manager should be consistent with the picture below:
Note: to see the result of a scenario, select the scenario and click on the Show button. Excel will change the
value of cell C4 accordingly for you to see the corresponding result on the sheet.

[NOT TO INCLUDE IN LAB RECORD] Scenario Summary


To easily compare the results of these scenarios, execute the following steps.
1. Click the Summary button in the Scenario Manager.
2. Next, select cell D10 (total profit) for the result cell and click on OK.

Result:
Conclusion: if you sell 70% for the highest price, you obtain a total profit of $4100, if you sell 80% for the
highest price, you obtain a total profit of $4400, etc. That's how easy what-if analysis in Excel can be.
Goal Seek
What if you want to know how many books you need to sell for the highest price, to obtain a total profit of
exactly $4700? You can use Excel's Goal Seek feature to find the answer.
1. On the Data tab, in the Forecast group, click What-If Analysis.

2. Click Goal Seek.

The Goal Seek dialog box appears.


3. Select cell D10.
4. Click in the 'To value' box and type 4700.
5. Click in the 'By changing cell' box and select cell C4.
6. Click OK.

Result. You need to sell 90% of the books for the highest price to obtain a total profit of exactly $4700.
[INCLUDE IN LAB RECORD]
Data Tables

Instead of creating different scenarios, you can create a data table to quickly try out different values for formulas.
You can create a one variable data table or a two variable data table.
Assume you own a book store and have 100 books in storage. You sell a certain % for the highest price of $50
and a certain % for the lower price of $20. If you sell 60% for the highest price, cell D10 below calculates a
total profit of 60 * $50 + 40 * $20 = $3800. One Variable Data Table
To create a one variable data table, execute the following steps.
1. Select cell B12 and type =D10 (refer to the total profit cell).
2. Type the different percentages in column A.
3. Select the range A12:B17.
We are going to calculate the total profit if you sell 60% for the highest price, 70% for the highest price, etc.
4. On the Data tab, in the Forecast group, click What-If Analysis.

5. Click Data Table.

6. Click in the 'Column input cell' box (the percentages are in a column) and select cell C4.
We select cell C4 because the percentages refer to cell C4 (% sold for the highest price). Together with the
formula in cell B12, Excel now knows that it should replace cell C4 with 60% to calculate the total profit,
replace cell C4 with 70% to calculate the total profit, etc.
Note: this is a one variable data table so we leave the Row input cell blank.
7. Click OK.
Result.

Conclusion: if you sell 60% for the highest price, you obtain a total profit of $3800, if you sell 70% for the
highest price, you obtain a total profit of $4100, etc.
Note: the formula bar indicates that the cells contain an array formula. Therefore, you cannot delete a single
result. To delete the results, select the range B13:B17 and press Delete.

[NOT TO INCLUDE IN LAB RECORD] Two Variable Data Table


To create a two variable data table, execute the following steps.
1. Select cell A12 and type =D10 (refer to the total profit cell).
2. Type the different unit profits (highest price) in row 12.
3. Type the different percentages in column A.
4. Select the range A12:D17.
We are going to calculate the total profit for the different combinations of 'unit profit (highest price)' and '%
sold for the highest price'.
5. On the Data tab, in the Forecast group, click What-If Analysis.

6. Click Data Table.

7. Click in the 'Row input cell' box (the unit profits are in a row) and select cell D7.
8. Click in the 'Column input cell' box (the percentages are in a column) and select cell C4.
We select cell D7 because the unit profits refer to cell D7. We select cell C4 because the percentages refer to
cell C4. Together with the formula in cell A12, Excel now knows that it should replace cell D7 with $50 and
cell C4 with 60% to calculate the total profit, replace cell D7 with $50 and cell C4 with 70% to calculate the
total profit, etc.
9. Click OK.
Result.

Conclusion: if you sell 60% for the highest price, at a unit profit of $50, you obtain a total profit of $3800, if
you sell 80% for the highest price, at a unit profit of $60, you obtain a total profit of $5200, etc.
Note: the formula bar indicates that the cells contain an array formula. Therefore, you cannot delete a single
result. To delete the results, select the range B13:D17 and press Delete.

[TO BE INCLUDED IN LAB RECORD]

Charts
A simple chart in Excel can say more than a sheet full of numbers. As you'll see, creating charts is very easy.
Create a Chart
To create a line chart, execute the following steps.
1. Select the range A1:D7.
2. On the Insert tab, in the Charts group, click the Line symbol.

3. Click Line with Markers.

Result:
Note: enter a title by clicking on Chart Title. For example, Wildlife Population.

[NOT TO INCLUDE IN LAB RECORD] Change Chart Type


You can easily change to a different type of chart at any time.

1. Select the chart.

2. On the Chart Design tab, in the Type group, click Change Chart Type.

3. On the left side, click Column.


4. Click OK. Result:

Switch Row/Column
If you want to display the animals (instead of the months) on the horizontal axis, execute the following steps.

1. Select the chart.

2. On the Chart Design tab, in the Data group, click Switch Row/Column.
Result:

Legend Position
To move the legend to the right side of the chart, execute the following steps.

1. Select the chart.

2. Click the + button on the right side of the chart, click the arrow next to Legend and click Right.
Result:

Data Labels
You can use data labels to focus your readers' attention on a single data series or data point.

1. Select the chart.

2. Click a green bar to select the Jun data series.

3. Hold down CTRL and use your arrow keys to select the population of Dolphins in June (tiny green bar).

4. Click the + button on the right side of the chart and click the check box next to Data Labels.
Result:

[INCLUDE IN LAB RECORD]


How to Make a Graph in Excel 1. Fill the Excel Sheet with Your Data & Assign the Right Data Types
The first step is to actually populate an Excel spreadsheet with the data that you need. If you have imported this
data from a different software, then it’s probably been compiled in a .csv (comma separated values) formatted
document.
Excel has two components to its spreadsheets:
1. The rows that are horizontal and marked with numbers
2. The columns that are vertical and marked with alphabets
After all the data values have been set and accounted for, make sure that you visit the Number section under the
Home tab and assign the right data type to the various columns. If you do not do this, chances are your graphs
will not show up right.

For example if column B is measuring time, ensure that you choose the option Time from the drop down menu
and assign it to B.

Choose the Type of Excel Graph You Want to Create


This will depend on the type of data you have and the number of different parameters you will be tracking
simultaneously.
If you are looking to take note of trends over time then Line graphs are your best bet. This is what we will be
using for the purpose of the tutorial.
Let us assume that we are tracking Average Number of Hours Worked/Week/Employee and Average Number
of Leaves/Employee/Year against a five year time span.
Highlight The Data Sets That You Want To Use
For a graph to be created, you need to select the different data parameters.
To do this, bring your cursor over the cell marked A. You will see it transform into a tiny arrow pointing
downwards. When this happens, click on the cell A and the entire column will be selected.
Repeat the process with columns B and C, pressing the Ctrl (Control) button on Windows or using the Command
key with Mac users.
Your final selection should look something like this:

Create the Basic Excel Graph


With the columns selected, visit the Insert tab and choose the option 2D Line Graph. You
will immediately see a graph appear below your data values.
Sometimes if you do not assign the right data type to your columns in the first step, the graph may not show in
a way that you want it to. For example, Excel may plot the parameter Average Number of
Leaves/Employee/Year along the X axis instead of the Year. In this case, you can use the option Switch
Row/Column under the Design tab of Chart Tools to play around with various combinations of X axis and Y
axis parameters till you hit on the perfect rendition.

[NOT TO BE INCLUDED IN LAB RECORD]

Graphs
Types of Graphs Available in Excel
Excel offers three varieties of graphs:
Line Graphs: Both 2 dimensional and three dimensional line graphs are available in all the versions of
Microsoft Excel. Line graphs are great for showing trends over time. Simultaneously plot more than one data
parameter – like employee compensation, average number of hours worked in a week and average number of
annual leaves against the same X axis or time.
Column Graphs: Column graphs also help viewers see how parameters change over time. But they can be
called “graphs” when only a single data parameter is used. If multiple parameters are called into action, viewers
can’t really get any insights about how each individual parameter has changed. As you can see in the Column
graph below, average numbers of hours worked in a week and average number of annual leaves when plotted
side by side do not provide the same clarity as the Line graph.

Bar Graphs: Bar graphs are very similar to column graphs but here the constant parameter (say time) is
assigned to the Y axis and the variables are plotted against the X axis.

Improve Your Excel Graph with the Chart Tools


To change colors or to change the design of your graph, go to Chart Tools in the Excel header.
You can select from the design, layout and format. Each will change up the look and feel of your Excel graph.
Design: Design allows you to move your graph and re-position it. It gives you the freedom to change the
chart type. You can even experiment with different chart layouts. This may conform more to your brand
guidelines, your personal style, or your manager’s preference.
Layout: This allows you to change the title of the axis, the title of your chart and the position of the legend.
You might go with vertical text along the Y axis and horizontal text along the X axis. You can even adjust the
grid lines. You have every formatting tool conceivable at your fingertips to improve the look and feel of your
graph.

Format: The Format tab allows you to add a border in your chosen width and color around the graph to properly
separate it from the data points that are filled in the rows and columns.
And there you have it. An accurate visual representation of the data that you have imported or entered manually
to help your team members and stakeholders better engage with the information and utilize it to create strategies
or be more aware of all the constraints while making decisions!
Challenges with Making a Graph In Excel
When manipulating simple data sets, you can create a graph fairly easily.
But when you start adding in several types of data with multiple parameters, then there will be glitches. Here
are some of the challenges that you’re going to have:
Data sorting can be problematic when creating graphs. Online tutorials might recommend data sorting to
make your “charts” look more aesthetically appealing. But beware of when the X axis is a time-based
parameter! Sorting data values by magnitude may mess up the flow of the graph because the dates are
sorted randomly. You may not be able to spot the trends very well.

You may forget to remove duplicates. This is especially true if you have imported the data from a third-party
application. Generally, this type of information is not filtered by redundancies. And you might end up corrupting
the integrity of your information if duplicates sneak into your pictorial representation of trends. When working
with copious volumes of data, it is best to use the Remove Duplicates option on your rows.
Experiment 5
Aim:
Cleaning Data with Text Functions: use of UPPER and LOWER, TRIM function, Concatenate.

Cleaning Data with Text Functions


The data that you obtain from different sources may not be in a form ready for analysis. Here we will understand
how to prepare data that is in the form of text for analysis.
Initially, you need to clean the data. Data cleaning includes removing unwanted characters from text. Next,
you need to structure the data in the form you require for further analysis. You can do the same by − ●
Finding required text patterns with the text functions. ● Extracting data values from text.
● Formatting data with text functions.
● Executing data operations with the text functions.
Removing Unwanted Characters from Text
When you import data from another application, it can have non printable characters and/or excess spaces.
The excess spaces can be − ● leading spaces, and/or
● extra spaces between words.
If you sort or analyze such data, you will get erroneous results.
Consider the following example −

This is the raw data that you have obtained on product information containing the Product ID, Product
description and the price. The character “|” separates the field in each row.
When you import this data into Excel worksheet, it looks as follows −
As you observe, the entire data is in a single column. You need to structure this data to perform data analysis.
However, initially you need to clean the data.
You need to remove any non printable characters and excess spaces that might be present in the data. You can
use the CLEAN function and TRIM function for this purpose.
S.No. Function & Description

CLEAN
1.
Removes all non printable characters from text

TRIM
2.
Removes spaces from text
Select the Cells C3 – C11.
Type =TRIM (CLEAN (B3)) and then press CTRL + Enter.
The formula is filled in the cells C3 – C11.
The result will be as shown below −

Executing Data Operations with the Text Functions


You might have to perform certain Text Operations on your Data. For example, if Login-IDs for the Employees
are changed to a New Format in an Organization, based on the Format Change, Text Replacements might have
to be done.
Following Text Functions help you in performing Text Operations on your data containing Text −
S.No. Function & Description

REPLACE
1.
Replaces characters within text

SUBSTITUTE
2.
Substitutes new text for old text in a text string

CONCATENATE
3.
Joins several text items into one text item
CONCAT
4. Combines the text from multiple ranges and/or strings, but it does not
provide the delimiter or IgnoreEmpty arguments.

TEXTJOIN
Combines the text from multiple ranges and/or strings, and includes a
5. delimiter you specify between each text value that will be combined. If
the delimiter is an empty text string, this function will effectively
concatenate the ranges.

REPT
6.
Repeats text a given number of times
CONCATENATE
This function allows users to combine multiple text strings into one. Text strings can be specified as arguments
separated by commas, or referred to as cell references that contain the text strings. For example,
=CONCATENATE("Hello", " ", "World") will
result in the text “Hello World”.

LEFT/RIGHT/MID
These functions allow users to extract a specified number of characters from the left, right, or middle of a text
string, respectively. Users need to provide the text string and the number of characters to extract as arguments.
For example,
=LEFT("Excel is Awesome", 5) will extract the leftmost 5
characters “Excel” from the text string.
This image shows the usage of the text function LEFT in Excel.
LEN
This function enables users to find the length or the number of characters in a text string. Users simply need to
provide the text string as an argument. For example,
=LEN("Excel") will result in the value 5, as “Excel”
has 5 characters.
UPPER/LOWER/PROPER
These functions allow users to convert text to uppercase, lowercase, or proper case (i.e., capitalize the first letter
of each word). Users only need to provide the text string as an argument. For example,
=UPPER("excel") will result in
the text “EXCEL”.
SUBSTITUTE
This function allows users to find and replace text within a text string. Users need to provide the original text
string, the text to find, the text to replace with, and an optional argument for the occurrence number (if a specific
occurrence of the text needs to be replaced). For example, =SUBSTITUTE("Excel is Awesome", "Excel",
"Power BI") will result in the text “Power BI is Awesome”.
TRIM
This function helps users remove extra spaces from a text string, except for single spaces between words. It can
be useful when working with text data imported from other sources that may contain unnecessary spaces.
For example,
=TRIM(" Excel is Awesome ") will result
in the text “Excel is Awesome”.
Somestimes unwelcome spaces can creep into the data material. Either through processing errors or when data
is imported into Excel from other software. Therefore, it can be good to use the TRIM function when using a
search and reference function, e.g. VLOOKUP or XLOOKUP.
FIND/SEARCH
These functions allow users to find the position of a specific text within a text string. FIND is case-sensitive,
while SEARCH is case-insensitive. Users need to provide the text to find and the text string as arguments. For
example,
=FIND("Excel", "Excel is Awesome") will
result in the value 1, as “Excel”.
This image shows the usage of the text function SEARCH.

[NOT TO BE INCLUDED IN LAB RECORD] Finding required Text Patterns with the Text Functions
To structure your data, you might have to do certain Text Pattern matching based on which you can extract the
Data Values. Some of the Text Functions that are useful for this purpose are −
S.No. Function & Description

EXACT
1.
Checks to see if two text values are identical

FIND
2.
Finds one text value within another (case-sensitive)

SEARCH
3.
Finds one text value within another (not case-sensitive)
Extracting Data Values from Text
You need to extract the required data from text in order to structure the same. In the above example, say, you
need to place the data in three columns – ProductID, Product_Description and Price. You can extract data in
one of the following ways −
● Extracting Data Values with Convert Text to Columns Wizard
● Extracting Data Values with Text Functions
● Extracting Data Values with Flash Fill
Extracting Data Values with Convert Text to Columns Wizard
You can use the Convert Text to Columns Wizard to extract Data Values into Excel columns if your fields are −
● Delimited by a character, or
● Aligned in columns with spaces between each field.
In the above example, the fields are delimited by the character “|”. Hence, you can use the Convert Text to
Columns wizard.
● Select the data.
● Copy and paste values in the same place. Otherwise, Convert Text to Columns takes the functions rather
than the data itself as the input.

● Select the data.


● Click on Text to Columns in the Data Tools group under Data Tab on the Ribbon.
Step 1 − Convert Text to Columns Wizard - Step 1 of 3 appears.
● Select Delimited. ● Click Next.
Step 2 − Convert Text to Columns Wizard - Step 2 of 3 appears.
● Under Delimiters, select Other.
● In the box next to Other, type the character | ● Click Next.

Step 3 − Convert Text to Columns Wizard - Step 3 of 3 appears.


In this screen, you can select each column of your data in the wizard and set the format for that column.
● For Destination, select the cell D3.
● You can click Advanced, and set Decimal Separator and Thousands Separator in the Advanced Text
Import Settings dialog box that appears. ● Click Finish.

Your data, which is converted to columns appears in the three Columns – D, E and F.
● Name the Column headers as ProductID, Product_Description and Price.

Extracting Data Values with Text Functions


Suppose the fields in your data neither are delimited by a character nor are aligned in columns with spaces
between each field, you can use text functions to extract data values. Even in the case the fields are delimited,
you can still use text functions to extract data.
Some of the text functions that are useful for this purpose are −

S.No. Function & Description

LEFT
1.
Returns the leftmost characters from a text value
RIGHT
2.
Returns the rightmost characters from a text value

MID
3. Returns a specific number of characters from a text string starting at the
position you specify

LEN
4.
Returns the number of characters in a text string
You can also combine two or more of these text functions as per the data you have at hand, to extract the
required data values. For example, using a combination of LEFT, RIGHT and VALUE functions or using a
combination of FIND, LEFT, LEN and MID functions.
In the above example,
● All the characters left to the first | give the name ProductID.
● All the characters right to the second | give the name Price.
● All the characters that lie between the first | and second | give the name Product_Description. ● Each |
has a space before and after.
Observing this information, you can extract the data values with the following steps − ●
Find the Position of First | - First | Position
○ You can use FIND function
● Find the Position of Second | - Second | Position
○ You can use FIND function again
● Beginning to (First | Position – 2) Characters of the Text give ProductID
○ You can use LEFT Function
● (First | Position + 2) to (Second | Position - 2) Characters of the Text give Product_Description ○ You
can use MID Function
● (Second | Position + 2) to End Characters of the Text give Price ○ You can use RIGHT Function

The result will be as shown below −


You can observe that the values in the price column are text values. To perform calculations on these values,
you have to format the corresponding cells. You can look at the section given below to understand formatting
text.
Extracting Data Values with Flash Fill
Using Excel Flash Fill is another way to extract data values from text. However, this works only when Excel is
able to find a pattern in the data.
Step 1 − Create three columns for ProductID, Product_Description and Price next to the data.

Step 2 − Copy and paste the values for C3, D3 and E3 from B3.

Step 3 − Select cell C3 and click Flash Fill in the Data Tools group on the Data tab. All the values for ProductID
get filled.
Step 4 − Repeat the above given steps for Product_Description and Price. The data is filled.

Formatting Data with Text Functions


Excel has several built-in text functions that you can use for formatting data containing text. These include −
Functions that format the Text as per your need −

S.No. Function & Description

1 LOWER
Converts text to lowercase
2
UPPER
Converts text to uppercase

3
PROPER
Capitalizes the first letter in each word of a text value
Functions that convert and/or format the Numbers as Text −

S.No. Function & Description

DOLLAR
Converts a number to text, using the $ (dollar) currency format
1.

FIXED
Formats a number as text with a fixed number of decimals
2.

TEXT
3.
Formats a number and converts it to text
Functions that convert the Text to Numbers −

S.No. Function & Description

VALUE
1.
Converts a text argument to a number
Experiment No: 6

Aim:
Cleaning Data Containing Date and Time Values: use of DATEVALUE function, DATEADD and DATEDIF,
TIMEVALUE functions.

Date Formats
Excel supports Date values in two ways −
● Serial Format
● In different Year-Month-Day Formats You can convert −
● A Date in Serial Format to a Date in Year-Month-Day Format
● A Date in Year-Month-Day Format to a Date in Serial Format
Converting Dates in Serial Format to Month-Day-Year Format
To convert dates from serial format to Month-Day-Year format, follow the steps given below −

Click the Number tab in the
Format Cells dialog box.
● Click Date under Category.
● Select Locale. The available
Date formats will be displayed as
a list under Type.
● Click on a Format under Type to
look at the preview in the box
adjacent to Sample.

● After choosing the Format, click OK.

Converting Dates in Month-Day-Year Format to Serial Format


You can convert dates in Month-Day-Year format to Serial format in two ways −
● Using Format Cells dialog box
● Using Excel DATEVALUE function
Using Format Cells dialog
box
● Click the Number tab in
the Format Cells dialog
box.
● Click General
under Category.
Using Excel
DATEVALUE
Function
You can use Excel
DATEVALUE
function to convert a Date to
Serial Number format. You
need to enclose the
Date argument in
“”. For
example,
=DATEVALUE
("6/8/2016") results in
42529
Using Excel DATEVALUE Function
You can use Excel DATEVALUE function to convert a Date to Serial Number format. You need to
enclose the Date argument in “”. For example,
=DATEVALUE ("6/8/2016") results in 42529

DateAdd Function
Returns a Variant (Date) containing a date to which a specified time interval has been added.
Syntax DateAdd ( interval, number, date )

The DateAdd function syntax has these arguments:


Argument Description

interval Required. String expression that is the interval of time you want
to add.
number Required. Numeric expression that is the number of intervals you
want to add. It can be positive (to get dates in the future) or
negative (to get dates in the past).
date Required. Variant (Date) or literal representing date to which the
interval is added.
Settings
The interval argument has these settings:
Setting Description
yyyy Year
q Quarter
m Month

y Day of year

d Day
w Weekday

ww Week
h Hour
n Minute

s Second
Remarks
You can use the DateAdd function to add or subtract a specified time interval from a date. For example,
you can use DateAdd to calculate a date 30 days from today or a time 45 minutes from now.
To add days to date, you can use Day of Year ("y"), Day ("d"), or Weekday ("w").
The DateAdd function will not return an invalid date. The following example adds one month to
January 31:
DateAdd("m", 1, "31-Jan-95")
In this case, DateAdd returns 28-Feb-95, not 31-Feb-95. If date is 31-Jan-96, it returns 29-Feb-96
because 1996 is a leap year.
If the calculated date would precede the year 100 (that is, you subtract more years than are in date), an
error occurs.
If a number isn't a Long value, it is rounded to the nearest whole number before being evaluated. Note:
The format of the return value for DateAdd is determined by Control Panel settings, not by the format
that is passed in the date argument.
Note: For date, if the Calendar property setting is Gregorian, the supplied date must be Gregorian. If the calendar
is Hijri, the supplied date must be Hijri. If month values are names, the name must be consistent with the current
Calendar property setting. To minimize the possibility of month names conflicting with the current Calendar
property setting, enter numeric month values (Short Date format).

DATEDIF:
This function calculates the difference between two dates in days, months, or years. It is useful for analyzing
time-based data and durations.
Syntax:
=DATEDIF(start_date, end_date, interval)

Example:
=DATEDIF(DATEVALUE("2023-10-26"), DATEVALUE("2024-01-26"), "m") // returns 3, the difference in
months

The following screenshot demonstrates that both calculations return identical results, except for row 4 where
the DATEDIF function returns the #NUM! error. Let's figure out why that happens.
When you subtract a more recent date (6-May-2015) from an earlier date (1-May-2015), the subtraction
operation returns a negative number (-5) exactly as it should. The syntax of the Excel DATEDIF function,
however, does not allow the start date to be greater than the end date and therefore it returns an error.

Time Formats
Excel supports Time Values in two ways −
● Serial Format
● In various Hour-Minute-Second Formats You can convert −
● Time in Serial Format to Time in Hour-Minute-Second Format
● Time in Hour-Minute-Second Format to Time in Serial Format
Converting Times in Serial Format to Hour-Minute-Second Format
To convert serial time format to
hour-min-sec format follow the
steps given below −
● Click the Number
tab in the Format
Cells dialog box
● Click Time under
Category.
● Select the Locale.
Available Time
formats will be
displayed as a list
under Type.
● Click on a Format
under Type to look
at the Preview in
the box adjacent to
Sample.
● After choosing the
Format, click OK
Using Excel TIMEVALUE Function
You can use Excel TIMEVALUE function to convert Time to Serial Number format. You need to enclose the
Time argument in “”. For example,
TIMEVALUE ("16:55:15") results in 0.70503472
Obtaining the Current Time
If you need to perform calculations based on current time, simply use the Excel function NOW (). The result
reflects the date and time when it is used.
The following screen shot of Now () function usage has been taken on 17th May, 2016 at 12:22 PM.

[NOT TO BE INCLUDED IN LAB RECORD]


Date in Serial Format
A Date in serial format is a positive integer that represents the number of days between the given date and
January 1, 1900. Both the current Date and January 1, 1900 are included in the count. For example, 42354 is a
Date that represents 12/16/2015.
Date in Month-Day-Year Formats
Excel supports different Date Formats based on the Locale (Location) you choose. Hence, you need to first
determine the compatibility of your Date formats and the Data Analysis at hand. Note that certain Date formats
are prefixed with *(asterisk) −
● Date formats that begin with *(asterisk) respond to changes in regional date and time settings
that are specified for the operating system
● Date formats without an *(asterisk) are not affected by operating system settings
For understanding purposes, you can assume the United States as the Locale. You find the following Date
formats to choose for the Date - 8th June, 2016 −
● *6/8/2016 (affected by operating system settings)
● *Wednesday, June 8, 2016 (affected by operating system settings)
● 6/8
● 6/8/16
● 06/08/16 ● 8-Jun
● 8-Jun-16
● 08-Jun-16
● Jun-16
● June-16
● J
● J-16
● 6/8/2016
● 8-Jun-2016
If you enter only two digits to represent a year and if −
● The digits are 30 or higher, Excel assumes the digits represent years in the twentieth century.
● The digits are lower than 30, Excel assumes the digits represent years in the twenty-first
century.
For example, 1/1/29 is treated as January 1, 2029 and 1/1/30 is treated as January 1, 1930.

Obtaining Today's Date


If you need to perform calculations based on today’s date, simply use the Excel function TODAY (). The result
reflects the date when it is used.
The following screenshot of TODAY () function usage has been taken on 16th May, 2016 −
Finding a Workday after Specified Days
You might have to perform certain calculations based on your workdays.
Work Days exclude weekend days and any holidays. This means if you can define your weekend and holidays,
whatever calculations you do will be based on workdays. For example, you can calculate invoice due dates,
expected delivery times, the next meeting date, etc.

You can use Excel WORKDAY and WORKDAY.INTL functions for such operations.

S.No. Function & Description

WORKDAY
1. Returns the serial number of the date before or after a specified number of
workdays

WORKDAY.INTL
Returns the serial number of the date before or after a specified number of
2. workdays using parameters to indicate which and how many days are weekend
days

For example, you can specify the 15th working day from today (the screenshot below is taken on 16th May 2016)
using the Functions TODAY and WORKDAY.
Suppose 25th May 2016 and 1st June 2016 are holidays. Then, your calculation will be as follows −

Customizing the Definition of a Weekend


By default, weekends are Saturday and Sunday, i.e. two days. You can also optionally define your weekend with
the WORKDAY.INTL function. You can specify your own weekend by a weekend-number that corresponds to
the weekend days as given in the table below. You need not remember these numbers, because when you start
typing the function, you get a list of numbers and the weekend days in the drop-down list.

Weekend Days Weekend-number

Saturday, Sunday 1 or omitted

Sunday, Monday 2

Monday, Tuesday 3

Tuesday, Wednesday 4

Wednesday, Thursday 5

Thursday, Friday 6

Friday, Saturday 7

Sunday only 11

Monday only 12

Tuesday only 13
Wednesday only 14

Thursday only 15

Friday only 16

Saturday only 17
Suppose, if the weekend is Friday only, you need to use the number 16 in the WORKDAY.INTL function.

Number of Workdays between two given Dates


There might be a requirement to calculate the number of workdays between two dates, for example, in the case
of calculating payment to a contract employee who is paid on per day basis.
You can find the number of workdays between two dates with the Excel functions NETWORKDAYS and
NETWORKDAYS.INTL. Just as in the case of WORKDAYS and WORKDAYS.INTL, NETWORKDAYS and
NETWORKDAYS.INTL allow you to specify holidays and with NETWORKDAYS.INTL you can additionally
specify the weekend.

S.No. Function & Description

NETWORKDAYS
1.
Returns the number of whole workdays between two dates

NETWORKDAYS.INTL
Returns the number of whole workdays between two dates
2.
using parameters to indicate which and how many days are
weekend days

You can calculate the number of workdays between today and another date with the functions TODAY and
NETWORKDAYS. In the screen shot given below, today is 16th May 2016 and end date is 16th June 2016. 25th
May 2016 and 1st June 2016 are holidays.
Again, the weekend is assumed to be Saturday and Sunday. You can have your own definition for weekend and
calculate the number of workdays between two dates with the NETWORKDAYS.INTL function. In the screen
shot given below, only Friday is defined as weekend.

Extracting Year, Month, Day from Date


You can extract from each date in a list of dates, the corresponding day, month and year using the excel functions
DAY, MONTH and YEAR.
For example, consider the following dates −
Extracting Day of the Week from Date
You can extract from each date in a list of dates, the corresponding day of the week with Excel WEEKDAY
function.
Consider the same example given above.

Obtaining Date from Year, Month and Day


You data might have the information about Year, Month and Day separately. You need to get the date combining
these three values to perform any calculation. You can use the DATE function for getting the date values.
Consider the following data −

Use the DATE function to obtain DATE values.


Calculating Years, Months and Days between two Dates
You might have to calculate the time lapsed from a given date. You might need this information in the form of
years, months and days. A simple example would be calculating the current age of a person. It is effectively the
difference between the birth date and today. You can use Excel DATEDIF, TODAY and CONCATENATE
functions for this purpose.

The output is as follows −


Subtract a date from the current date
To subtract a date from today's date, you can employ either of the above formulas. Just use the TODAY()
function instead of date 1:
=TODAY() - A2
Or
=DATEDIF(A2,TODAY(), "d")
Like in the previous example, both formulas work fine when today's date is greater than the date you are
subtracting from it, otherwise DATEDIF fails:

Obtaining Time from Hour, Minute and Second
Your data might have the information about hours, minutes and seconds separately. Suppose, you need to get
the Time combining these 3 values to perform any calculation. You can use Excel Function Time for getting the
Time values.

Extracting Hour, Minute and Second from Time


You can extract hour, minute and second from a given time using the Excel functions HOUR, MINUTE and
SECOND.

Number of hours between Start Time and End Time


When you perform computations on Time values, the result displayed depends on the format used in the cell.
For example, you can compute the number of hours between 9:30 AM and 6 PM as follows −
C4 is formatted as Time
C5 and C6 are formatted as Number.
You get the time difference as days. To convert to hours you need to multiply by 24.

Experiment No: 7

Aim:
Conditional Formatting: formatting, parsing, and highlighting data in spreadsheets during data analysis

Conditional Formatting and Highlighting data


Patterns and trends in your data may be highlighted with the help of conditional formatting. To use it, write
rules that determine the format of cells based on their values. In Excel for Windows, conditional formatting
can be applied to a set of cells, an Excel table, and even a PivotTable report. To execute conditional
formatting, adhere to the instructions listed below.
Step 1: Select any column from the table. Here we are going to select a Quarter column. After that go to the
home tab on the top of the ribbon and then in the styles group select conditional formatting and then in the
highlight cells rule select Greater than an option.
Step 2: Then a greater than dialog box appears. Here first write the quarter value and then select the color.

Step 3: As you can see in the excel table Quarter column change the color of the values that are greater than 6.

Color Scale Formatting Example


Highlight the Speed values of each Pokemon with Color scale conditional formatting.
Conditional formatting, step by step:
1. Select the range of Speed values C2:C9

2.Click on the Conditional Formatting icon


in the ribbon, from the Home menu
3. Select the Color Scales from the drop-down menu
There are 12 Color Scale options with different color variations.

The color on the top of the icon will apply to the highest values.
4. Click on the "Green - Yellow - Red Colour Scale" icon

Now, the Speed value cells will have a colored background highlighting:
Dark green is used for the highest values, and dark red for the lowest values.
Charizard has the highest Speed value (100) and Squirtle has the lowest Speed value (43). All
the cells in the range gradually change color from green, yellow, orange, then red.

[NOT TO BE INCLUDED IN LAB RECORD] Example


In a range containing the sales figures of the past quarter for a set of salespersons, you can highlight those cells
representing who have met the defined target, say, $2500.
You can set the condition as total sales of the person >= $2500 and specify a color code green. Excel checks
each cell in the range to determine whether the condition you specified, i.e., total sales of the person >= $2500
is satisfied.
Excel applies the format you chose, i.e. the green color to all the cells that satisfy the condition. If the content
of a cell does not satisfy the condition, the formatting of the cell remains unchanged. The result is as expected,
only for the salespersons who have met the target, the cells are highlighted in green – a quick visualization of
the analysis results.
You can specify any number of conditions for formatting by specifying Rules. You can pick up the rules that
match your conditions from
● Highlight cells rules
● Top / Bottom rules
You can also define your own rules. You can −
● Add a rule
● Clear an existing rule
● Manage the defined rules
Further, you have several formatting options in Excel to choose the ones that are appropriate for your Data
Visualization −
● Data Bars
● Color Scales
● Icon Sets
Conditional formatting has been promoted over the versions Excel 2007, Excel 2010, Excel 2013. The examples
you find in this chapter are from Excel 2013.

Highlight Cells Rules


You can use Highlight Cells rule to assign a format to cells whose contents meet any of the following criteria −
● Numbers within a given numerical range −
○ Greater Than
○ Less Than
○ Between
○ Equal To
● Text that contains a given text string.
● Date occurring within a given range of dates relative to the current date −
○ Yesterday
○ Today
○ Tomorrow
○ In the last 7 days
○ Last week
○ This week
○ Next week
○ Last month
○ This Month
○ Next month
● Values that are duplicate or unique.
● Follow the steps to conditionally format cells − ● Select the range to be conditionally formatted.
● Click Conditional Formatting in the Styles group under Home tab. ● Click Highlight Cells Rules from
the drop-down menu.

● Click Greater Than and specify >750. Choose green color.


● Click Less Than and specify < 500. Choose red color.
● Click Between and specify 500 and 750. Choose yellow color.

The data will be highlighted based on the given conditions and the corresponding formatting.
Top / Bottom Rules
You can use Top / Bottom Rules to assign a format to cells whose contents meet any of the following criteria −
● Top 10 items − Cells that rank in the top N, where 1 <= N <= 1000.
● Top 10% − Cells that rank in the top n%, where 1 <= n <= 100.
● Bottom 10 items − Cells that rank in the bottom N, where 1 <= N <= 1000.
● Bottom 10% − Cells that rank in the bottom n%, where 1 <= n <= 100. ● Above average − Cells that
are above average for the selected range.
● Below average − Cells that are below average for the selected range.
Follow the steps given below to assign the Top/Bottom rules.
● Select the range to be conditionally formatted.
● Click Conditional Formatting in the Styles group under Home tab.
● Click Top/Bottom Rules from the drop-down menu. Top/Bottom rules options appear.
● Click Top Ten Items and specify 5. Choose green color.
● Click Bottom Ten Items and specify 5. Choose red color.

The data will be highlighted based on the given conditions and the corresponding formatting.
● Repeat the first three steps given above.
● Click Top Ten% and specify 5. Choose green color.
● Click Bottom Ten% and specify 5. Choose red color.

The data will be highlighted based on the given conditions and the corresponding formatting.
● Repeat the first three steps given above.
● Click Above Average. Choose green color. ● Click Below Average. Choose red color.

The data will be highlighted based on the given conditions and the corresponding formatting.
Data Bars
You can use colored Data Bars to see the value in a cell relative to the values in the other cells. The length of
the data bar represents the value in the cell. A longer bar represents a higher value, and a shorter bar represents
a lower value. You have six solid colors to choose from for the data bars – blue, green, red, yellow, light blue
and purple.
Data bars are helpful in visualizing the higher, lower and intermediate values when you have large amounts of
data. Example - Day temperatures across regions in a particular month. You can use gradient fill color bars to
visualize the value in a cell relative to the values in other cells. You have six Gradient Colors to choose from
for the Data Bars – Blue, Green, Red, Yellow, Light Blue and Purple.
● Select the range to be formatted conditionally.
● Click Conditional Formatting in the Styles group under Home tab.
● Click Data Bars from the drop-down menu. The Gradient Fill options and Fill options appear.
Click the blue data bar in the Gradient Fill options.

● Repeat the first three steps.


● Click the blue data bar in the Solid Fill options.
You can also format data bars such that the data bar starts in the middle of the cell, and stretches to the left for
negative values and stretches to the right for positive values.

Color Scales
You can use Color Scales to see the value in a cell relative to the values in the other cells in a given range. As
in the case of Highlight Cells Rules, a Color Scale uses cell shading to display the differences in cell values. A
color gradient will be applied to a range of cells. The color indicates where each cell value falls within that
range.
You can choose from −
● Three - Color Scale −
○ Green – Yellow – Red Color Scale
○ Red – Yellow – Green Color Scale
○ Green – White – Red Color Scale
○ Red – White – Green Color Scale
○ Blue – White – Red Color Scale
○ Red – White – Blue Color Scale ●
Two-Color Scale −
○ White – Red Color Scale
○ Red – White Color Scale
○ Green – White Color Scale
○ White – Green Color Scale
○ Green – Yellow Color Scale
○ Yellow – Green Color Scale
● Follow the steps given below −
○ Select the Range to be conditionally formatted.
○ Click Conditional Formatting in the Styles group under Home tab.
○ Click Color Scales from the drop-down menu. The Color Scale options appear.
○ Click the Green – Yellow – Red Color Scale.
○ The Data will be highlighted based on the Green – Yellow – Red color scale in the selected range.

● Repeat the first three steps.


● Click the Green – White color scale.
The data will be highlighted based on the Green – White color scale in the selected range.
Icon Sets
You can use the icon sets to visualize numerical differences. The following icon sets are available −

As you observe, an icon set consists of three to five symbols. You can define criteria to associate an icon with
each value in a cell range. For example, a red down arrow for small numbers, a green up arrow for large
numbers, and a yellow horizontal arrow for intermediate values.
● Select the range to be conditionally formatted.
● Click Conditional Formatting in the Styles group under Home tab.
● Click Icon Sets from the drop-down menu. The Icon Sets options appear. ● Click the colored three
arrows.
Colored Arrows appear next to the Data based on the Values in the selected range.
Repeat the first three steps. The Icon Sets options appear.
Select 5 Ratings. The Rating Icons appear next to the data based on the values in the selected range.

New Rule
You can use New Rule to create your own formula as a condition to format a cell as you define. ●
There are two ways to use New Rule −
○ With New Rule option from the drop-down menu
○ With New Rule button in Manage Rules dialog box
○ With New Rule option from the Drop-Down Menu ●
Select the Range to be conditionally formatted.
○ Click Conditional Formatting in the Styles group under Home tab.
○ Click New Rule from the drop-down menu.
The New Formatting Rule dialog box appears.
● From the Select a Rule Type Box, select Use a formula to determine which cells to
format. Edit the Rule Description box appears.
● In the format values where this formula is true: type the formula. ● Click the format
button and click OK.

Cells that contain values with the formula TRUE, are formatted as defined.
With New Rule Button in Manage Rules dialog box
● Select the range to be conditionally formatted.
● Click Conditional Formatting in the Styles group under Home tab. ● Click Manage
Rules from the drop-down menu.

The Conditional Formatting Rules Manager dialog box appears. Click


the New Rule button.
The New Formatting Rule dialog box appears.
Repeat the Steps given above to define your formula and format.

The Conditional Formatting Rules Manager dialog box appears with defined New Rule highlighted. Click the
Apply button.

Cells that contain values with the formula TRUE, are formatted as defined.
Clear Rules
You can Clear Rules to delete all conditional formats you have created for
● Selected cells
● Current Worksheet
● Selected Table
● Selected PivotTable
Follow the given steps −
● Select the Range / Click on a Worksheet / Click the table > PivotTable where conditional formatting
rules need to be removed.
● Click Conditional Formatting in the Styles group under Home tab.
● Click Clear Rules from the drop-down menu. The Clear rules options appear.
Select the appropriate option. The conditional formatting is cleared from the Range / Worksheet / Table /
PivotTable.
Manage Rules
You can Manage Rules From the Conditional Formatting Rules Manager window. You can see formatting rules
for the current selection, for the entire current worksheet, for the other worksheets in the workbook or the tables
or PivotTables in the workbook.
● Click Conditional Formatting in the Styles group under Home tab. ●
Click Manage Rules from the drop-down menu.

The Conditional Formatting Rules Manager dialog box appears.


Click the arrow in the List Box next to Show formatting rules for Current Selection, This Worksheet and other
Sheets, Tables, PivotTable if exist with Conditional Formatting Rules, appear.
Select This Worksheet from the drop-down list. Formatting Rules on the current Worksheet appear in the order
that they will be applied. You can change this order by using the up and down arrows.

You can add a New Rule, Edit a Rule and Delete a Rule.

➢ You have already seen New Rule in the earlier section. You can delete a rule by selecting the Rule and
clicking Delete Rule. The highlighted Rule is deleted.
➢ To edit a Rule, select the RULE and click on Edit Rule. Edit Formatting Rule dialog box appears.
➢ You can
○ Select a Rule Type
○ Edit the Rule Description
○ Edit Formatting
➢ Once you are done with the changes, click OK.
➢ The changes for the Rule will be reflected in the Conditional Formatting Rules Manager dialog box.
Click Apply.
➢ The data will be highlighted based on the modified Conditional Formatting Rules.

[INCLUDE IN LAB RECORD] PARSING


What is parsing data?
Parsing data is changing a string of data into another format. The most common way people parse data is by
changing a single string of data into two or more strings using a series of rules. Other ways that you can parse
data include:
● Changing the data from a coding language to plain text
● Combining two or more strings into one string
● Converting mathematical symbols and formulas into plain text
● Changing data from plain text into a coding language, mathematical formula or data structure
Steps parse data in Excel
Below are steps you can use to parse data in an Excel spreadsheet:
1. Insert your data into an Excel spreadsheet
An example of how to input your data in an Excel column:
A

1 Smith, Jamie
2 Cooper, John

3 Richardson, Erik

4 Brynhild, Ragnar
2. Select the column that contains the data you want to parse
Once you've entered the data you want to parse, select the column where you've stored it. This in two ways:
1. The first method is to hover your mouse cursor over the top cell of the data you want to select until it
changes to a "+" symbol, then click and drag the mouse down until you highlight every cell. This method is
useful if the data you are using is unlikely to change and the entire data set is relatively small. Using the data
above, you can highlight starting at the cell that reads "Smith, Jamie."
2. The second method is to click the letter at the top of the column. This allows you to select every cell in the
column regardless of whether they have data in them. This method is useful if you have a lot of data you want
to parse or if more data is going to be added to the dataset because this method applies the formatting you
choose to the entire column and affects new data as you add it. Using the example data above, you can select
the letter "A" to choose the entire column.
3. Choose the "Data" tab in the ribbon
The ribbon is the section at the top of the Excel program that has all of your Excel tools. By default, the program
starts on the "Home" tab. In order, the tabs at the top of the ribbon are:
1. "File"
2. "Home"
3. "Insert"
4. "Page Layout"
5. "Formulas"
6. "Data"
7. "Review"
8. "View"
9. "Help"
10. "QuickBooks"
To select the data tab, click on it with your mouse.
4. Click the "Text to Columns" option
Once you've selected the "Data" tab, find the section labeled "Data Tools" and select the first option, "Text to
Columns." This option starts a dialog box with choices you can make to format the data based on several features
within your data. This is also the fastest way to parse your data in Excel. Overall, this method allows you to
format the data strings you have into two or more strings that apply to other empty columns in your spreadsheet,
which is useful for organizing your data. This selection also helps the Excel program format the data how you
want.
5. Select "Delimited" in the dialog box
The "Delimited" option is a method you can use to separate your data based on a delimiter. In Excel, the two
most common delimiters are spaces and commas. For example, if commas separate your data, such as "Carter,
Logan" then the comma is a delimiter in your data. As another example, if spaces separate your data, such as
"Logan Carter" then the space is your delimiter. Another type of delimiter is the pipe symbol, "|," which is used
in some Excel spreadsheets to separate items within a single cell.
6. Choose a delimiter that exists within your data
Once you've selected the "Delimited" option in the dialog box, you can choose what delimiter you want to use
for your data. The delimiter can change from one data set to another. For example, the data set below uses
commas as the delimiter:

1 Smith, Jamie

2 Cooper, John

3 Richardson, Erik

4 Brynhild, Ragnar
The next data set uses spaces as the delimiter:

1 Carder Sauk

2 Katie Richardson

3 Blair Smith

4 Amanda McLaurin

Finally, this data set uses pipes as the delimiter:

A
1 0001 | Baker | Ryan

2 0002 | Cash | Emily

3 0003 | Daniels | Doretha

4 0004 | Edwards | Veronica


7. Check the box next to "Treat consecutive delimiters as one"
This is an option in the dialog box that allows you to parse data more easily. It lets Excel understand multiple
delimiters next to each other only count as one, helping to transfer the data you want into the correct columns.
For example, if your data has both pipes and spaces as delimiters, it treats them as a single delimiter, only
moving the values on either side of the pipes into new cells within your spreadsheet. Similarly, if two pipes are
next to each other, Excel views them as a single delimiter, helping it transfer data correctly.
8. Choose "General" from the "Column data format" section
Opening this new section of the dialog allows you to change how you format your data. This is an important
step because it allows you to control exactly where you move your data to within the spreadsheet, how you
parse your data and the formatting of the new columns of data. This allows you the most control through the
entire process of moving data and gives you a way to try different formats or your data until it matches a
particular form you want or need for your work, presentations or submissions to other professionals for analysis
of the data.
9. Click the red arrow or spreadsheet symbol at the far right of the destination text box
This step allows you to select where you store your data after Excel parses it. Selecting the red arrow or
spreadsheet button gives you access to your spreadsheet, helping you find an empty column where you can
store your data. It also allows you to access other options within your spreadsheet and change how that data
looks. For example, if you need to move data from columns B and C to fit your parsed data, you can do so in
this step.
10. Select the columns where you want the parsed data to be displayed
This step is where you select where you store your new parsed data. The most common way that professionals
do this is to store their data in the next columns after the non-parsed data. For example, if you used column A
to store your data, you can use columns B and C to store the new parsed data. It is important to ensure you
select the number of columns that match the amount of space you need. If your data has a single delimiter, then
two columns fit your data. If it has two delimiters, three columns fit.
11. Return to the first dialog box and select "Finish"
The next-to-last step for parsing your data is to return to the dialog box and click "Finish" at the bottom. Once
you do, Excel transforms your data based on the rules and parameters you gave it in the dialog box. Once it
finishes its process, check your data to ensure Excel formatted it correctly and parsed it in the locations you
wanted it. This can help you keep your data accurate, and free from any challenging errors the program may
have created during the parsing process. Once Excel formats it correctly, you can save your Excel spreadsheet.
Below is an example of parsed data:

A B C

1 Smith, Jamie Smith Jamie

2 Cooper, John Cooper John

3 Richardson, Erik Richardson Erik

4 Brynhild, Ragnar Brynhild Ragnar


12. Save your Excel spreadsheet
There are three major ways you can save your data in Excel. The first is by navigating to the "File" tab at the
top of the program's ribbon. In that section, there is the option to "Save as" which allows you to select where
you save the file and the name of the file on your computer. The second option is to select the "Save" button
from the "File" tab, which automatically saves your file to a location on your computer and creates a name for
it. The last option is to press "Ctrl+S" on your keyboard.

[NOT TO BE INCLUDED IN LAB RECORD] PARSING


What is parsing data?
Parsing data is changing a string of data into another format. The most common way people parse data is by
changing a single string of data into two or more strings using a series of rules. Other ways that you can parse
data include:
● Changing the data from a coding language to plain text
● Combining two or more strings into one string
● Converting mathematical symbols and formulas into plain text
● Changing data from plain text into a coding language, mathematical formula or data structure
Parsing data in Excel has several benefits. The first is that it can help you organize your data more efficiently
for presentations and use by yourself or other data professionals. This includes separating data that is
important for meetings and sending it to other professionals when they need it. Another benefit to learning
to parse data in Excel is to increase your computer and Excel proficiency. Increasing these skills can help
you accomplish tasks at your job more efficiently, leading to increased productivity. Finally, parsing data
can help you convert data into a large variety of formats.
The ultimate benefit is that parsing data in Excel lets you change the format of large amounts of data. For
example, if you have 1,000 or more rows of data, changing each one to a specific format individually takes a
very long time. Being able to change the format of all your data at the same time saves time and helps you avoid
errors caused by fatigue and multiple sessions of changes.

Steps parse data in Excel


Below are steps you can use to parse data in an Excel spreadsheet:
1. Insert your data into an Excel spreadsheet
The first step toward parsing your data in Excel is to input it into an Excel spreadsheet. The most common way
professionals input their data is in organized columns and rows in the sheet. This is because it is easier to
manipulate these formats in the program than if the data is in multiple other locations. For data parsing,
organizing the data you want to parse into a column is important because you want to select all of your data at
the same time. Below is an example of how to input your data in an Excel column:
A

1 Smith, Jamie

2 Cooper, John

3 Richardson, Erik

4 Brynhild, Ragnar
2. Select the column that contains the data you want to parse
Once you've entered the data you want to parse, select the column where you've stored it. This in two ways:
1. The first method is to hover your mouse cursor over the top cell of the data you want to select until it
changes to a "+" symbol, then click and drag the mouse down until you highlight every cell. This method is
useful if the data you are using is unlikely to change and the entire data set is relatively small. Using the data
above, you can highlight starting at the cell that reads "Smith, Jamie."
2. The second method is to click the letter at the top of the column. This allows you to select every cell in the
column regardless of whether they have data in them. This method is useful if you have a lot of data you want
to parse or if more data is going to be added to the dataset because this method applies the formatting you
choose to the entire column and affects new data as you add it. Using the example data above, you can select
the letter "A" to choose the entire column.
3. Choose the "Data" tab in the ribbon
The ribbon is the section at the top of the Excel program that has all of your Excel tools. By default, the program
starts on the "Home" tab. In order, the tabs at the top of the ribbon are:
11. "File"
12. "Home"
13. "Insert"
14. "Page Layout"
15. "Formulas"
16. "Data"
17. "Review"
18. "View"
19. "Help"
20. "QuickBooks"
To select the data tab, click on it with your mouse.
4. Click the "Text to Columns" option
Once you've selected the "Data" tab, find the section labeled "Data Tools" and select the first option, "Text to
Columns." This option starts a dialog box with choices you can make to format the data based on several features
within your data. This is also the fastest way to parse your data in Excel. Overall, this method allows you to
format the data strings you have into two or more strings that apply to other empty columns in your spreadsheet,
which is useful for organizing your data. This selection also helps the Excel program format the data how you
want.
5. Select "Delimited" in the dialog box
The "Delimited" option is a method you can use to separate your data based on a delimiter. In Excel, the two
most common delimiters are spaces and commas. For example, if commas separate your data, such as "Carter,
Logan" then the comma is a delimiter in your data. As another example, if spaces separate your data, such as
"Logan Carter" then the space is your delimiter. Another type of delimiter is the pipe symbol, "|," which is used
in some Excel spreadsheets to separate items within a single cell.
6. Choose a delimiter that exists within your data
Once you've selected the "Delimited" option in the dialog box, you can choose what delimiter you want to use
for your data. The delimiter can change from one data set to another. For example, the data set below uses
commas as the delimiter:
A

1 Smith, Jamie

2 Cooper, John

3 Richardson, Erik
4 Brynhild, Ragnar

The next data set uses spaces as the delimiter:


A

1 Carder Sauk

2 Katie Richardson

3 Blair Smith

4 Amanda McLaurin

Finally, this data set uses pipes as the delimiter:


A

1 0001 | Baker | Ryan

2 0002 | Cash | Emily

3 0003 | Daniels | Doretha

4 0004 | Edwards | Veronica


7. Check the box next to "Treat consecutive delimiters as one"
This is an option in the dialog box that allows you to parse data more easily. It lets Excel understand multiple
delimiters next to each other only count as one, helping to transfer the data you want into the correct columns.
For example, if your data has both pipes and spaces as delimiters, it treats them as a single delimiter, only
moving the values on either side of the pipes into new cells within your spreadsheet. Similarly, if two pipes are
next to each other, Excel views them as a single delimiter, helping it transfer data correctly.
8. Choose "General" from the "Column data format" section
Opening this new section of the dialog allows you to change how you format your data. This is an important
step because it allows you to control exactly where you move your data to within the spreadsheet, how you
parse your data and the formatting of the new columns of data. This allows you the most control through the
entire process of moving data and gives you a way to try different formats or your data until it matches a
particular form you want or need for your work, presentations or submissions to other professionals for analysis
of the data.
9. Click the red arrow or spreadsheet symbol at the far right of the destination text box
This step allows you to select where you store your data after Excel parses it. Selecting the red arrow or
spreadsheet button gives you access to your spreadsheet, helping you find an empty column where you can
store your data. It also allows you to access other options within your spreadsheet and change how that data
looks. For example, if you need to move data from columns B and C to fit your parsed data, you can do so in
this step.
10. Select the columns where you want the parsed data to be displayed
This step is where you select where you store your new parsed data. The most common way that professionals
do this is to store their data in the next columns after the non-parsed data. For example, if you used column A
to store your data, you can use columns B and C to store the new parsed data. It is important to ensure you select
the number of columns that match the amount of space you need. If your data has a single delimiter, then two
columns fit your data. If it has two delimiters, three columns fit.
11. Return to the first dialog box and select "Finish"
The next-to-last step for parsing your data is to return to the dialog box and click "Finish" at the bottom. Once
you do, Excel transforms your data based on the rules and parameters you gave it in the dialog box. Once it
finishes its process, check your data to ensure Excel formatted it correctly and parsed it in the locations you
wanted it. This can help you keep your data accurate, and free from any challenging errors the program may
have created during the parsing process. Once Excel formats it correctly, you can save your Excel spreadsheet.
Below is an example of parsed data:

A B C

1 Smith, Jamie Smith Jamie

2 Cooper, John Cooper John

3 Richardson, Erik Richardson Erik

4 Brynhild, Ragnar Brynhild Ragnar


12. Save your Excel spreadsheet
There are three major ways you can save your data in Excel. The first is by navigating to the "File" tab at the
top of the program's ribbon. In that section, there is the option to "Save as" which allows you to select where
you save the file and the name of the file on your computer. The second option is to select the "Save" button
from the "File" tab, which automatically saves your file to a location on your computer and creates a name for
it. The last option is to press "Ctrl+S" on your keyboard.

Experiment 8
Aim:
Working with Multiple Sheets: work with multiple sheets within a workbook is crucial for organizing and
managing data, performing complex calculations and creating comprehensive reports.

Working with Multiple Sheets for organizing and managing data


Every workbook contains at least one worksheet by default. When working with a large amount of data, you
can create multiple worksheets to help organize your workbook and make it easier to find content. You can also
group worksheets to quickly add information to multiple worksheets at the same time. Watch the video below
to learn more about using multiple worksheets.
To insert a new worksheet:
Locate and select the New sheet button near the bottom-right corner of the Excel window.

A new blank worksheet will appear.

By default, any new workbook you create in Excel will contain one worksheet, called Sheet1. To change the
default number of worksheets, navigate to Backstage view, click Options, then choose the desired number of
worksheets to include in each new workbook.
[NOT TO INCLUDED IN LAB RECORD]
To copy a worksheet:
If you need to duplicate the content of one worksheet to another, Excel allows you to copy an existing worksheet.
Right-click the worksheet you want to copy, then select Move or Copy from the worksheet menu.

The Move or Copy dialog box will appear. Choose where the sheet will appear in the Before sheet:
field. In our example, we'll choose (move to end) to place the worksheet to the right of the existing
worksheet.
Check the box next to Create a copy, then click OK.
The worksheet will be copied. It will have the same title as the original worksheet, as well as a version
number. In our example, we copied the November worksheet, so our new worksheet is named
November (2). All content from the November worksheet has also been copied to the new worksheet.

You can also copy a worksheet to an entirely different workbook. You can select any workbook that is currently
open from the To book: drop-down menu.
To rename a worksheet:
Right-click the worksheet you want to rename, then select Rename from the worksheet menu.

Type the desired name for the worksheet.


Click anywhere outside the worksheet tab, or press Enter on your keyboard. The worksheet will be
renamed.
To move a worksheet:
Click and drag the worksheet you want to move until a small black arrow appears above the desired
location.

Release the mouse. The worksheet will be moved.

To change the worksheet tab color:


Right-click the desired worksheet tab, and hover the mouse over Tab Color. The Color menu will
appear.
Select the desired color.
The worksheet tab color will be changed.

The worksheet tab color is considerably less noticeable when the worksheet is selected. Select another
worksheet to see how the color will appear when the worksheet is not selected.

To delete a worksheet:
Right-click the worksheet you want to delete, then select Delete from the worksheet menu.
The worksheet will be deleted from your workbook.

If you want to prevent specific worksheets from being edited or deleted, you can protect them by right-clicking
the desired worksheet and selecting Protect Sheet from the worksheet menu.
Switching between worksheets
If you want to view a different worksheet, you can simply click the tab to switch to that worksheet. However,
with larger workbooks this can sometimes become tedious, as it may require scrolling through all of the tabs to
find the one you want. Instead, you can simply right-click the scroll arrows in the lower-left corner, as shown
below.
A dialog box will appear with a list of all of the sheets in your workbook. You can then double-click the sheet
you want to jump to.

Grouping and ungrouping worksheets


You can work with each worksheet individually, or you can work with multiple worksheets at the same time.
Worksheets can be combined together into a group. Any changes made to one worksheet in a group will be
made to every worksheet in the group.
To group worksheets:
Select the first worksheet you want to include in the worksheet group.

Press and hold the Ctrl key on your keyboard. Select the next worksheet you want in the group.

Continue to select worksheets until all of the worksheets you want to group are selected, then release the
Ctrl key. The worksheets are now grouped.
While worksheets are grouped, you can navigate to any worksheet within the group. Any changes made to one
worksheet will appear on every worksheet in the group. However, if you select a worksheet that is not in the
group, all of your worksheets will become ungrouped.
To ungroup worksheets:
Right-click a worksheet in the group, then select Ungroup Sheets from the worksheet menu.

The worksheets will be ungrouped. Alternatively, you can simply click any worksheet not included in
the group to ungroup all worksheets.

[TO BE INCLUDED IN LAB RECORD]


Perform Complex Calculations
A simple formula is a mathematical expression with one operator, such as 7+9. A complex formula has more
than one mathematical operator, such as 5+2*8. When there is more than one operation in a formula, the order
of operations tells your spreadsheet which operation to calculate first. In order to use complex formulas, you
will need to understand the order of operations.
The order of operations
All spreadsheet programs calculate formulas based on the following order of operations:
● Operations enclosed in parentheses
● Exponential calculations (3^2, for example)
● Multiplication and division, whichever comes first
● Addition and subtraction, whichever comes first
Creating complex formulas
In the example below, we'll demonstrate a complex formula using the order of operations. Here, we want to
calculate the cost of sales tax for a catering invoice. To do this, we'll write our formula as =(D2+D3)*0.075 in
cell D4. This formula will add the prices of our items together and then multiply that value by the 7.5% tax rate
(which is written as 0.075) to calculate the cost of sales tax.

The spreadsheet then follows the order of operations and first adds the values inside the parentheses:
(44.85+39.90) = $84.75. Then it multiplies that value by the tax rate: $84.75*0.075. The result will show that
the sales tax is $6.36.

It is especially important to enter complex formulas with the correct order of operations. Otherwise, the
spreadsheet will not calculate the results accurately. In our example, if the parentheses are not included, the
multiplication is calculated first and the result is incorrect. Parentheses are the best way to define which
calculations will be performed first in a formula.
To create a complex formula using the order of operations:
In our example below, we will use cell references along with numerical values to create a complex formula
that will calculate the total cost for a catering invoice. The formula will calculate the cost for each menu item
and add those values together.
Select the cell that will contain the formula. In our example, we'll select cell C4.

Enter your formula. In our example, we'll type =B2*C2+B3*C3. This formula will follow the order
of operations, first performing multiplication: 2.29*20 = 45.80 and 3.49*35 = 122.15. Then it will add
those values together to calculate the total: 45.80+122.15.

Double-check your formula for accuracy, then press Enter on your keyboard. The formula will
calculate and display the result. In our example, the result shows that the total cost for the order is
$167.95.

You can add parentheses to any equation to make it easier to read. While it won't change the result of the
formula in this example, we could enclose the multiplication operations within parentheses to clarify that they
will be calculated before the addition.
Your spreadsheet will not always tell you if your formula contains an error, so it's up to you to check all of your
formulas.

Reports
Creating Basic Charts and Tables for an Excel Report
Creating reports usually means collecting information and presenting it all in a single sheet that serves as the
report sheet for all of the information. These report sheets should be formatted in a way that's easy to print as
well.
One of the most common tools people use in Excel to create reports is the chart and table tools. To create a chart
in an Excel report sheet:
1. Select Insert from the menu, and in the charts group, select the type of chart you want to add to the report
sheet.

2. In the Chart Design menu, in the Data group, select Select Data.
3. Select the sheet with the data and select all cells containing the data you want to chart (include headers).

4. The chart will update in your report sheet with the data. The headers will be used to populate the labels in the
two axis.
5. Repeat the above steps to create new charts and graphs that appropriately represent the data you want to show
in your report. When you need to create a new report, you can just paste the new data into the data sheets,
and the charts and graphs update automatically.

There are different ways to lay out a report using Excel. You can include graphs and charts on the same page as
tabular (numeric) data, or you can create multiple sheets so visual reporting is on one sheet, tabular data is on
another sheet, and so on.

[NOT TO BE INCLUDED IN LAB MANUAL]

How to make reports in Excel


The following approaches show how you can create a report in Microsoft Excel, using several methods:
1. Display data in charts
One method to create a report is to display your data in a graph or chart. Excel has several types of charts you
can set up in your spreadsheet, including line graphs, pie charts and tables. To create a visual report using
graphs, use the following steps:
1. Enter the data into the sheet using the "Insert" option in the program toolbar.
2. After the data is in the sheet, find the "Select data" option to choose the information you want to display.
This gives you a basic chart display, but you can change the chart design to a different style.
3. Select the style of graph you want for your report from the "Chart design" tool in the menu.
2. Create a pivot table to organize data
A pivot table in Excel creates a table of summarized values from large sets of data. If you have an extensive
amount of data to aggregate into informational reports, you can create a pivot table to make this information
more accessible. Create your report using PivotTables by following these steps:
1. Under the "Insert" option, select "PivotTable" in the menu.
2. Select the range and location of the data you want to include in the table.
3. Enter the labels for the reference and values fields of the new table and arrange it in your sheet.
4. Choose the calculation you want the table to measure from the data, such as the average or maximum
and minimum, and update the pivot table.
As you update the various data connecting to the pivot table, the chart also updates to display the information
according to your parameters.
3. Separate the data types of your reports
With large data, consider separating numerical data values from visual and text information. Excel allows you
to create multiple sheets within a workbook and multiple pages within a sheet. This means you can visualize
data in charts and graphs on one sheet, tabular data on another and any text values on a different sheet. Using
this method when creating reports in Excel is beneficial for organizing and monitoring changes in data more
effectively.
4. Add page headers
To print or export, reports need to have page headers. Use the steps below to insert headers and prepare reports
for printing and exporting:
1. Navigate to the menu and select "Insert." From here, choose "Text," then "Header and footer."
2. Enter the name of your report in the related field and format the text according to your preferences, like
large or bold text.
3. Repeat this process for each of the pages you want to include in the printed report.
4. If you want to omit certain sheets from your report, right-click on the corresponding tabs and select
"Hide."
5. Format and print reports
When printing your report, you can change the layout so you're able to fit it to the printer paper. The following
steps show how to format and print Excel reports:
1. For visual data in graphs, charts or pivot tables, change the page to "Landscape" orientation under the
print settings.
2. Choose the option that allows you to fit all your report columns on a single page.
3. Click "OK" to print the workbook as individual pages.
4. If you're sending your reports through email, save the document as a .pdf file for compatible delivery.
Create a report using charts: Select Insert > Recommended Charts, then choose the one you want
to add to the report sheet.
Create a report with pivot tables: Select Insert > PivotTable. Select the data range you want to analyze in
the Table/Range field.
Print: Go to File > Print, change the orientation to Landscape, scaling to Fit All Columns on One Page,
and select Print Entire Workbook.
How to Print Your Excel Report
1. You can generate a printed report from all the sheets you created, but first you need to add page headers.
Select Insert > Text > Header & Footer.

2. Type the title for the report page, then format it to use larger than normal text. Repeat this process for each
report sheet you plan to print.

3. Next, hide the sheets you don't want included in the report. To do this, right-click the sheet tab and select
Hide.
4. To print your report, select File > Print. Change orientation to Landscape, and scaling to Fit All Columns on
One Page.

Select Print Entire Workbook. Now when you print your report, only the report sheets you created will print as
individual pages.

You can either print your report out on paper, or print it as a PDF and send it out as an email attachment. FAQ

How do I create an expense report in Excel?


Open an Excel spreadsheet, turn off gridlines, and enter your basic expense report information, such as a
title, time period, and employee name. Add data columns for Date and Description, and then add
columns for expense specifics, such as Hotel, Meals, and Phone. Enter your information and create an
Excel table.
How do I create a scenario summary report in Excel?
To use Excel's scenario manager function, select the cells with the information you're exploring, and then
go to the ribbon and select Data. Select What-If Analysis > Scenario Manager. In the Scenario Manager
dialog box, select Add. Name the scenario and change your data to see various outcomes.
How do I export a Salesforce report to Excel?
In Salesforce, go to Reports and find the report you want to export. Select Export and choose an export
view (Formatted Report or Details Only). Formatted Report will export in .xlsx format, while Details
Only gives you other choices. Select Export when ready.

Experiment 9

Aim
Create worksheet with following fields: Empno, Ename, Basic Pay(BP), Travelling Allowance(TA), Dearness
Allowance(DA), House Rent Allowance(HRA), Income Tax(IT), Provident Fund(PF), Net Pay(NP). Use
appropriate formulas to calculate the above scenario. Analyse the data using appropriate chart and report the
data.

Prepare a payroll statement of a company in the format given below in a spreadsheet to compute net salary
payable to TEN employees of the company:

The Gross salary consists of Basic pay, Dearness allowance (D.A), House Rent Allowance (H.R.A) . The rules
governing the payment of allowances are as enumerated below:
● Dearness Allowance: The D.A is calculated @ 39% of basic pay, subject to a minimum amount of Rs.2500.
● House Rent Allowance: The H.R.A is paid according to the following scales of basic pay: Basic pay H.R.A
Up to Rs 5,000 Rs 1,000 Next upto 10,000 Rs 2,000 Thereafter Rs 3,000

● Net salary is calculated as gross salary less deductions, rounded off to nearest rupee.
● The deductions are:
● Provident Fund Contribution: An employee is required to contribute 8% of his salary to P.F if the Is PF
Payable condition is “Yes”.

The Gross salary of an employee consists of Basic Salary + Dearness Pay + DA +HRA + TA+CCA.
The GPF and IT are the two Deductions. The components of salary are computed according to the following
terms of contract of service:
Rules for payment of Basic Salary, TA, and CCA are as under:

Rules for payment of DP, DA, and HRA are as under:

Rules for Deduction of GPF, and IT are as under:

You are required to prepare a payroll statement for the financial year 2023-24 in the given format making
maximum use of cell referencing facility
Steps:-
1. Create an Excel Worksheet for an employee pay roll system.
2. Enter the details of Employee as given and calculate the DA, TA, HRA, IT, PF as a percentage on the basis
of Basic Pay.
3. Calculate the Net Pay by using the formulae Gross Pay= DA+TA+HRA+BP Deductions=IT+PF Net Pay=
Gross Pay-Deductions

Experiment 10
Create worksheet on Inventory Management: Sheet should contain Product code, Product name, Product type,
MRP, Cost after % of discount, Date of purchase. Use appropriate formulas to calculate the above scenario.
Analyse the data using appropriate chart and report the data.

Experiment 11
Create worksheet on Sales analysis of Merchandise Store: data consisting of Order ID, Customer ID, Gender,
age, date of order, month, online platform, Category of product, size, quantity, amount, shipping city and other
details. Use of formula to segregate different categories and perform a comparative study using pivot tables and
different sort of charts.
Experiment 12
Generation of report & presentation using Autofilter and macros

Aim
Excel's AutoFilter features makes it quick and easy to sort through large quantities of data. We'll show you how
to use both pre-set and custom filters to boost your productivity in Excel in no time!
1. Create a table. Make sure that your data have column headings to specify the data below it. The heading is where
the filter will be placed and will not be included in the data that is sorted. Each column can have a unique dataset
(e.g. date, quantity, name, etc.) and contain as many entries as you wish to sort through.
● You can freeze your headings in
● place by selecting the containing row and going to “View > Freeze Panes”. This will help keep track of
filtered categories on large data sets.
2. Select all the data you wish to filter. Click and drag to select all of the cells you wish to be included in the filter.
Since AutoFilter is, as the name implies, an automatic process, you cannot use it to filter non-contiguous
columns. All columns in between will be set to filter with them.

3 Activate AutoFilter. Go to the “Data” tab, then press “Filter”. Once activated, the column headers will have
drop-down buttons. Using these buttons, you can set your filter options.
4. Select filter criteria. Filters options can vary based upon the type of data within the cells. Text cells will
filter by the textual content, while number cells will have mathematic filters. There are a few filters that are
shared by both. When a filter is active a small filter icon will appear in the column header.
■ Sort Ascending: sorts data in ascending order based on the data in that column; numbers are sorted 1, 2,
3, 4, 5, etc. and words are sorted alphabetically starting with a, b, c, d, e, etc.
■ Sort Descending: sorts data in descending order based on the data in that column; numbers are sorted in
reverse order 5, 4, 3, 2, 1, etc. and words are sorted in reverse alphabetical order, e, d, c, b, a, etc.
■ Top 10: The first 10 rows of data in your spreadsheet or the first 10 rows of data from the filtered
selection
■ Specific conditions: Some filter parameters can be set using value logic, like filtering values greater
than, less than, equal to, before, after, between, containing, etc. After selecting one of these you will
prompted to enter the parameter limits (e.g. After 1/1/2011 or greater than 1000).
■ Note: the filtered data is hidden from view, NOT deleted. You will not lose any data by filtering.

Customizing and Deactivating Autofilter

1. Utilize custom AutoFilter for more complex sorting. A custom filter allows for multiple filters to be applied
using “and/or” logic. The “Custom Filter…” option is listed at the bottom of the filter dropdown menu and
brings up a separate window. Here you can select up to two filter options, then select the “And” or “Or”
button to make those filter exclusive or inclusive.
■ For example: a column containing names could be filtered by those containing “A” or “B”, meaning
Andrew and Bob would both appear. But neither would appear in a filter set for those containing both
“A” and “B”.
2. Clear your filters. To clear a single filter, select the dropdown for the filtered column and select “Clear Filter
From [name]”. To clear all filters, select any cell in the table and go to the “Data” tab and press “Clear” (next
to the Filter toggle).

3. Deactivate AutoFilter. If you want to disable the filters completely, simply deselect the AutoFilter option
while the table is selected.
What is Macro in Excel
Macros can be considered as a set of programming instructions that can be recorded, named, saved, and executed
in VBA as and when required macros can help us to automate repetitive tasks associated with data manipulation
that must be accomplished repeatedly. You can also enable and disable macros in Excel. For example: suppose
for every month, a report is to be created for all the teachers of a school. As it is a repetitive task, macros can
come into action here.
How to Turn on the Developer Tab in Excel
The developer tab is hidden by default on the ribbon. To customize the Ribbon, Follow these steps: Step
1: Right-click on the Ribbon

Step 2: Navigate to Customize the ribbon and place a check on the Developer Checkbox
How to Record a Macro in Excel
The following steps can be performed to record a macro in Excel:
Step 1: Click on the Developer Tab in the Ribbon

Step 2: Click on the Record Macro


In the Code Group, the tool Record Macros is located. Click on it

Step 3: Fill the Record Macro Dialog Box


As macros are selected, a dialog box is opened which contains the following options to fill.
In the dialog box, enter the name of the macro in the Macro name. However, space cannot be used in the Macro
name to separate the words, underscore(_) can be used for this purpose. Example: Macro_name. There are some
other options also in the dialog box, i.e., where to store the macro, the shortcut key which can be used to activate
the macro, and the description for the macro created. They can be filled accordingly.
● After filling in the dialog box, click on OK.
● As soon as OK is clicked, Excel Macro records the set of operations the user is practicing.
● Once, the work is done, in the Developer Tab, an option “Stop Recording” can be seen. Clicking on
which the recording gets stopped and the created macro is saved.

How to Run the Macro in Excel


There are different methods by which a macro can run. Some of the methods are discussed here in this article.
Run the Macro by Clicking on a Shape
It is one of the easiest ways to run a macro to create any shape in the worksheet and use it for running the macro.
Step 1: Click on the Insert Tab on the ribbon

Step 2: Choose any Shape


Go to the Illustrations group and click on the Shapes icon. In the sheet, choose any shape we like and want it to
be assigned as the macro.
Step 3: Add the Shape
Click where you want to add the shape in the sheet and the shape will automatically get inserted.

Step 4: Edit the Shape


The shape can be resized or re-formatted accordingly to the way you want. Text can also be added to the shape.

Step 5: Right Click on the Shape and Click on Assign Macro


Then Right-Click on the shape and a dialog box would be opened. Then click on Assign Macro.

After right-clicking on the shape, another dialog box of Macro would be opened.
Step 6: Now Select the Macro
In the dialog box, select the macro from the list you want to assign to your shape and click the OK button.
Now the shape would work as a button and whenever you click on it, it will run the assigned macro.
How to Run Macro By Clicking a Button
While the shape is something you can format and play with it, a button has a standard format. A macro can also
be assigned to a button for easy use and then can run the macro by simply clicking that button.
Step 1: Go to the Developer Tab on the Ribbon

Step 2: In the Controls group, click on the Button Tool

Step 3: Click on the Excel Sheet and Fill the Details in the Dialog box
Now, click anywhere on the Excel sheet. As soon as you do this, the Assign Macro dialog box would be opened.
Step 4: Select the Macro you want to Assign and Click OK
Select the macro you want to assign to that button and fill in the other options. Then click on OK.
Step 5: Preview the Shape
After that, a rectangular button can be seen on the sheet, and ready to be used.
Step 6: Format the Button
The button which appears on the sheet has default settings, and you can’t format it like the color, or shape of
the button.
However, the text which appears on the button can be changed. Just a right-click on the button and a dialog box
would open. Click on Edit Alt Text and change the text.
How to run a Macro from Excel Ribbon (Developer Tab)
If you have multiple macros in the workbook defining different tasks, you can see a list of all the macros in the
Macros dialogue box and it makes it easy to run multiple macros from a single list.
Step 1: Go to the Developer Tab on the Ribbon

Step 2: Then in Code Group, click on the Macros Tool


Step 3:Select the Macro that you want to Run
A dialog box would be opened containing the list of all the macros created in that particular workbook.

Step 4: Click Run


How to Create Macro in VBA Editor
If the user and creator of the macros are the same, then instead of spending time creating buttons and shapes,
we can directly run the macro from the VB Editor.
Step 1: Go to the Developer Tab on the Ribbon

Step 2: Click on the Visual Basic


In the Code Group, click on Visual Basic and a new window would be opened.
Step 3: Click on Run Macro
Then click on the Run Macro sign, it will open a dialog box listing all the macros of that workbook.

Step 4: Select the Macro from the list


Select the macro you want to run from the list and click Run.
As soon as Run is clicked, the macro would be executed on the excel-sheet. If you can only see the VB Editor
window and not the sheet, then you may not see the changes happening in the worksheet. To see the changes,
minimize/close the VB Editor window. You can also edit a macro as per your need.

How to View Macros in Excel


Step 1: Open Microsoft Excel
Step 2: Click on the Developer Tab

Step 3: Click Macros to see a list of available macros in the active workbook
Step 4: Select a Macro to View
Step 5: You can run or edit the macro from here if needed.
Step 6: Close the Macro dialog when you’re done
How to Save the Recorded Macros in Excel
Step 1: Record your Actions
Step 2: Click on Stop Recording
Step 3: Save your workbook as “.xlsm” (macro-enabled)
Step 4: Your macro is now saved in the workbook

You might also like