Cse-Data Analytics With Excel - Laboratory Manual
Cse-Data Analytics With Excel - Laboratory Manual
III Semester
LAB MANUAL
(Effective for the Academic Year 2023 -2024)
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.
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.
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).
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.
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:
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.
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.
2. Prepare a salary statement for the following information and plot a graph
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.
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:
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'.
○ 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.
○ 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 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.
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.
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.
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]
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.
Note: any changes you make to the pivot chart are immediately reflected in the pivot table and vice versa.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Result:
Note: enter a title by clicking on Chart Title. For example, Wildlife Population.
2. On the Chart Design tab, in the Type group, click Change Chart Type.
Switch Row/Column
If you want to display the animals (instead of the months) on the horizontal axis, execute the following steps.
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.
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.
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:
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.
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.
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.
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 −
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.
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.
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
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.
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 −
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 −
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.
DateAdd Function
Returns a Variant (Date) containing a date to which a specified time interval has been added.
Syntax DateAdd ( interval, number, date )
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.
You can use Excel WORKDAY and WORKDAY.INTL functions for such operations.
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 −
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.
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.
Experiment No: 7
Aim:
Conditional Formatting: formatting, parsing, and highlighting data in spreadsheets during data analysis
Step 3: As you can see in the excel table Quarter column change the color of the values that are greater than 6.
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.
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.
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.
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 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.
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.
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
A
1 0001 | Baker | Ryan
A B C
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
1 Carder Sauk
2 Katie Richardson
3 Blair Smith
4 Amanda McLaurin
A B C
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.
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.
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.
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.
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.
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
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:
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.
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
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 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 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