Excel Lab Manual
Excel Lab Manual
S J C Institute of Technology
(VTU affiliated, AICTE approved, and NBA and NAAC Accredited)
Prepared by
Mr. Yashwantha N
Assistant Professor
Department of Artificial Intelligence and Data Science
SJCIT
2023-2024
1.Getting Started with Excel: Creation on of spread sheets, Insertion on of rows and columns, Drag &
Fill, use of Aggregate functions.
Excel is a powerful spreadsheet program that allows users to organize, analyse, and manipulate
data. Here are steps to get started with basic tasks in Excel:
1. Opening Excel and Creating a Spreadsheet:
•Launch Microsoft Excel.
•To create a new spreadsheet, click on "Blank Workbook" or press Ctrl + N.
•You'll see a grid of cells organized in columns (labelled A, B, C, etc.) and rows (labeled1, 2,
3, etc.). This is where you can input your data.
2. Inserting Rows and Columns:
•To insert a row: Right-click on the row number (on the left) below where you want the new
row to appear. Then select "Insert" from the context menu.
•To insert a column: Right-click on the column letter (at the top) to the right of where you want
the new column to appear. Then select "Insert" from the context menu.
3. Drag & Fill:
•Enter data or a formula in a cell.
•Click on the lower-right corner of the cell (you'll see a small square, known as the fill handle).
•Drag the fill handle across adjacent cells to automatically fill them with a series, pattern, or
copy the content from the initial cell.
4. Using Aggregate Functions (SUM, AVERAGE, MAX, MIN):
•SUM
: To add a range of cells, select the cell where you want the total to appear and use the formula
"=SUM ("select range")". For example, "=SUM (A1:A5)" adds the values in cells A1 through
A5.
•AVERAGE
: To find the average of a range of cells, use the formula"=AVERAGE ("select range")".
For instance, "=AVERAGE (B1:B10)" calculates the average of cells B1 through B10.
•MAX/MIN
: To find the maximum or minimum value in a range, use "=MAX ("select range")" or "=MIN
("select range")". For example, "=MAX (C1:C20)" finds the maximum value in cells C1
through C20.
2. Working with Data: Importing data, Data Entry & Manipulation, Sorting & Filtering. using excel
steps
A guide on how to perform various data-related tasks using Microsoft Excel:
1.Importing Data:
•Open Excel and go to the "Data" tab.
•Click on "Get Data" or "From Text/CSV" depending on your Excel version.
•Choose the file format (Text/CSV, Excel, JSON, etc.) and select the file you want to import.
•Follow the steps in the data import wizard to specify delimiter, encoding, column headers, etc.
2.Data Entry & Manipulation:
•Cleaning Data: Use Excel functions like Filter, Sort, Remove Duplicates under the “Data" tab to clean data.
•Transforming Data: Use formulas (e.g., =CONCATENATE, =IF, =VLOOKUP) to create new columns or
transform existing data.
3.Sorting Data:
•Select the range of cells or columns you want to sort.
•Go to the "Data" tab and click on "Sort."
•Choose the column to sort by and select ascending or descending order.
4.Filtering Data:
•Select the range of cells or columns containing your data.
•Go to the "Data" tab and click on "Filter."
•Use filter arrows in column headers to apply specific filters based on your criteria.
5.Visualization and Analysis:
•Use Excel's charting tools (Insert > Charts) to create visual representations of your data (bar
charts, pie charts, etc.).
•Utilize functions like SUM, AVERAGE, COUNT, etc., for basic statistical analysis.
6.Saving Data:
•After performing operations, save the modified data by clicking "File" > "Save As."
•Choose the desired file format (Excel Workbook, CSV, etc.) and save the file.
3. Working with Data: Data Validation, Pivot Tables & Pivot Charts.
Steps to perform various tasks related to working with data in Excel including Data Validation,
Pivot Tables, and Pivot Charts:
1.Data Validation:
Setting up Data Validation:
•Select the cells where you want to apply data validation.
•Go to the "Data" tab in Excel.
•Click on "Data Validation" in the Data Tools group.
•Choose the type of validation (e.g., whole number, decimal, list, date, etc.).
•Configure the validation criteria based on your requirements.
•Define an input message and error alert if needed.
•Click "OK" to apply data validation to the selected cells.
2.Pivot Tables:
Creating a Pivot Table:
•Select the data range you want to analyze.
•Go to the "Insert" tab in Excel.
•Click on "PivotTable" and select the data range.
•Choose where you want the Pivot Table to be placed (new worksheet or existing worksheet).
•Drag and drop fields from the field list to the rows, columns, and values area to define the Pivot
Table structure.
•Use the Pivot Table Field List to rearrange, filter, or summarize data.
3.Pivot Charts:
Creating a Pivot Chart:
•After creating a Pivot Table, select any cell within the Pivot Table.
•Go to the "Insert" tab in Excel.
•Click on "PivotChart" and select the desired chart type (bar chart, line chart, piechart, etc.).
•Customize the chart by adding or removing fields from the Pivot Table Field List.
•Format the chart elements, axes, titles, and legends as needed.
•The Pivot Chart dynamically updates based on changes made to the underlying PivotTable.
4.Enhancing Pivot Tables and Charts:
Refreshing Data:
•If the underlying data changes, right-click on the Pivot Table/chart and select "Refresh" to update
it.
4. Data Analysis Process: Conditional Formatting, What-If Analysis, Data Tables, Charts &
Graphs.
step-by-step instructions on performing data analysis processes including Conditional
Formatting, What-If Analysis, Data Tables, Charts, and Graphs in Excel:
1.Conditional Formatting:
Applying Conditional Formatting:
•Select the range of cells you want to format based on certain conditions.
•Go to the "Home" tab in Excel.
•Click on "Conditional Formatting."
•Choose the formatting rule you want to apply (e.g., Highlight Cells Rules, Top/Bottom Rules,
Data Bars, Color Scales, Icon Sets).
•Set the conditions and formatting options based on your criteria.
•Click "OK" to apply the conditional formatting.
2.What-If Analysis:
Using Goal Seek:
•Identify a cell containing a formula you want to adjust.
•Go to the "Data" tab in Excel.
•Click on "What-If Analysis" and select "Goal Seek."
•Set the "Set cell" (the cell you want to change), "To value" (the target value you want), and "By changing
cell" (the cell you want to adjust).
•Click "OK" to perform the What-If Analysis. Excel will calculate the value needed in the "By
changing cell" to reach the desired result in the "Set cell".
3.Data Tables:
Creating a Data Table for What-If Analysis:
•Set up a formula in a cell that refers to different input values.
•Select the cell range that contains the formula and input values.
•Go to the "Data" tab in Excel.
•Click on "What-If Analysis" and select "Data Table."
•Define the Row Input Cell and/or Column Input Cell to indicate which cell(s) contain different
values to substitute into the formula.
•Excel generates a table with calculated results for different input values.
5. Cleaning Data with Text Functions: use of UPPER and LOWER, TRIM function,
Concatenate.
Here are the steps to use various text functions such as UPPER, LOWER, TRIM, and
CONCATENATE in Excel for cleaning data:
1.UPPER Function:
Convert Text to Uppercase:
•Suppose your text is in cell A1.
•In another cell (let's say B1), enter the formula: =UPPER(A1).
•Press Enter. Cell B1 will display the text from cell A1 in uppercase.
2.LOWER Function:
Convert Text to Lowercase:
•Similar to the UPPER function, you can convert text to lowercase.
•If your text is in cell A1, in another cell (let's say B1), enter the formula: =LOWER(A1).
•Press Enter. Cell B1 will display the text from cell A1 in lowercase.
3.TRIM Function:
Remove Extra Spaces:
•If you have text with leading, trailing, or extra spaces, you can use the TRIM function to
remove them.
•If your text is in cell A1, in another cell (let's say B1), enter the formula: =TRIM(A1).
•Press Enter. Cell B1 will display the text from cell A1 without leading, trailing, or extra
spaces.
4.CONCATENATE Function:
Combine Text from Multiple Cells:
•You can concatenate (join together) text from different cells.
•For example, if you have text in cells A1 and B1 and want to combine them, in another cell (let's
say C1), enter the formula: =CONCATENATE(A1, " ", B1).
•The formula above will combine the text from cell A1, a space (" "), and the text from cell B1
into cell C1.
Alternatively, you can use the '&' operator to concatenate text in Excel. For example, =A1 &"
" & B1 achieves the same result as the CONCATENATE function used above. These text
functions in Excel are helpful for manipulating and cleaning data, such as changing text case,
removing extra spaces, and combining text from different cells into a single cell.
6.Cleaning Data Containing Date and Time Values: use of DATEVALUE function,
DATEADD and DATEDIF, TIME VALUE functions.
1.DATEVALUE Function:
Converting Text to Date:
•Suppose your date is in text format in cell A1.
•In another cell (let's say B1), enter the formula: =DATEVALUE(A1).
•Press Enter. Cell B1 will display the date converted from text to a date value. Make sure the text in cell A1
is in a recognizable date format.
2.DATEADD Function:
Adding/Subtracting Days to a Date:
•Suppose you have a date in cell A1 and want to add days to it.
•In another cell (let's say B1), enter the formula: =A1 + n (replace 'n' with the number of days
you want to add).
•Press Enter. Cell B1 will display the date alter adding the specified number of days.
3.DATEDIF Function:
Calculating the Difference Between Dates:
•Suppose you have two dates in cells A1 and B1.
•In another cell (let's say C1), enter the formula: =DATEDIF(A1, B1, "unit") (replace "unit"
with the desired unit - "Y" for years, "M" for months, "D" for days, etc.).
•Press Enter. Cell C1 will display the difference between the two dates in the specified unit.
4.TIMEVALUE Function:
Converting Text to Time:
•Suppose your time is in text format in cell A1.
•In another cell (let's say B1), enter the formula: =TIMEVALUE(A1).
•Press Enter. Cell B1 will display the time converted from text to a time value. Ensure the text in cell A1 is
in a recognizable time format.
•Remember to ensure that the date and time formats are consistent and recognizable by Excel functions
for accurate conversion and calculations. These functions are useful for manipulating and
performing operations on date and time values within Excel
8. Working with Multiple Sheets: work with multiple sheets within a workbook is crucial for organizing
and managing data, perform complex calculations and create comprehensive reports.
Working with multiple sheets within an Excel workbook allows you to organize data, perform
calculations, and create comprehensive reports. Here are steps to effectively work with
multiple sheets in Excel:
1.Adding Sheets:
•To add a new sheet, click the "+" icon near the bottom of the Excel window or use the shortcut
Shift + F11. Alternatively, right-click on an existing sheet tab, select "Insert," and choose the
type of sheet you want to add (Worksheet, Chart, etc.).
2.Navigating Between Sheets:
•Click on the sheet tabs at the bottom of the Excel window to switch between different sheets
within the workbook.
3.Renaming Sheets:
•Right-click on the sheet tab and select "Rename," then enter a new name for the sheet to make
it more descriptive.
4.Copying or Moving Data Between Sheets:
•Select the cells or range of data you want to copy or move.
•Right-click, choose "Copy" or "Cut."
•Navigate to the target sheet and paste the data using "Paste" or Ctrl + V.
5.Referencing Data Between Sheets:
•To reference data from one sheet to another, start a formula in the target sheet.
•Switch to the source sheet and select the cells you want to reference.
•Finish the formula in the target sheet by clicking on the cells in the source sheet. For example,
=Sheet Name! A1 refers to cell A1 in "Sheet Name."
6.Grouping Sheets:
•Hold down the Ctrl key and select multiple sheet tabs to group them together.
•Any changes made to one sheet will be applied to all sheets within the group.
7.Linking Sheets:
•Use formulas or functions to link data between sheets. For example, you can use cell references
(='SheetName'!A1) or functions like SUM or VLOOKUP to fetch data from other sheets.
8.Consolidating Data:
•Use Excel's data consolidation feature to combine data from multiple sheets into a summary sheet. Go to
the "Data" tab, select "Consolidate," and specify the ranges or references to consolidate.
9.Protecting Sheets:
•Right-click on a sheet tab, select "Protect Sheet," and set a password to prevent accidental
or unauthorized changes to specific sheets within the workbook.
10.Creating References Across Sheets:
•Use 3D references to perform calculations across multiple sheets. For instance, =SUM
(Sheet1:Sheet3! A1) sums cell A1 from Sheet1 through Sheet3.
•By employing these steps, you can efficiently manage and organize data across multiple sheets
in an Excel workbook, facilitating complex calculations, data organization, and report generation.
9. Create worksheet with following fields: Empno, Ename, Basic Pay (BP), Travelling
Allowance (TA), Daily 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
Here are the steps to create a worksheet in Excel with the mentioned fields, calculate the payroll
components using appropriate formulas, analyze the data using a chart, and generate a report:
1.Creating the Worksheet:
•Open Excel and create a new workbook.
•In the first row (Row 1), enter the following headers: Empno, Ename, BasicPay(BP),
Travelling Allowance(TA), Daily Allowance(DA), House RentAllowance(HRA), Income
Tax(IT), Provident Fund(PF), Net Pay(NP).
2.Enter Sample Data:
•Starting from Row 2, enter sample employee data in columns A to H. Fill in values for Empno,
Ename, BP, TA, DA, HRA. (For example, A2: Employee ID, B2:Employee Name, C2: Basic
Pay, D2: Travel Allowance, E2: Dearness Allowance,F2: House Rent Allowance)
3.Calculating Fields:
•In the cell for Income Tax (IT), Provident Fund (PF), and Net Pay (NP), use appropriate
formulas to calculate these values based on the Basic Pay (BP) and other allowances. For
example:
•For Income Tax (IT), Provident Fund (PF), and Net Pay (NP), you might use formulas like:
•IT:=(BP + TA + DA + HRA) * Tax_Rate
•PF:=(BP + TA + DA + HRA) * PF_Rate
•NP:=(BP + TA + DA + HRA) - IT - PF
•You should define the Tax_Rate and PF_Rate as constants or set them in separate cells to refer
to them in your formulas.
4.Creating a Chart:
•Highlight the data range containing the calculated values (including headers).
•Go to the "Insert" tab and select the desired chart type (e.g., Column Chart, Bar Chart, etc.).
•Customize the chart by adding titles, axes labels, legend, etc., based on your preferences.
5.Generating a Report:
•Create a new worksheet/tab for your report.
•Summarize the key insights from the data, like total payroll amount, average allowances,
highest and lowest Net Pay, etc.
•Use Excel functions like SUM, AVERAGE, MAX, MIN to calculate these values from the
data in your original worksheet.
6.Formatting and Finalizing:
•Format the cells, charts, and report to enhance readability and visual appeal
•Label the report sections appropriately, adding titles, subtitles, and explanations as needed.
By following these steps, you can create a payroll worksheet in Excel, calculate payroll
components using formulas, visualize the data with a chart, and generate a comprehensive
report summarizing key insights from the data. Adjust formulas and formatting as per your
specific payroll calculation requirements.
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.
Here are the steps to create an Inventory Management worksheet in Excel, input data, calculate
the cost after a percentage of discount, analyze the data using a chart, and generate a report:
1.Creating the Worksheet:
•Open Excel and create a new workbook.
•In the first row (Row 1), enter the following headers: Product code, Product_name, Product
type, MRP, Discount (%), Cost after Discount, Date of purchase.
2.Enter Sample Data:
•Starting from Row 2, enter sample product data in columns A to G. Fill in values for Product
code, Product name, Product type, MRP, Discount (%), Date of purchase. (For example, A2:
Product Code, B2: Product Name, C2: Product Type, D2: MRP, E2: Discount %, F2: Cost after
Discount, G2: Date of Purchase)
3.Calculating Cost after Discount:
•In the cell for "Cost after Discount" (F2), use a formula to calculate the cost after applying the
discount percentage to the MRP. For example:
•F2:=D2 - (D2 * (E2 / 100))
•This formula subtracts the discount amount from the MRP to calculate the cost after the
discount.
4.Creating a Chart:
•Highlight the data range containing the calculated values (including headers).
•Go to the "Insert" tab and select the desired chart type (e.g., Bar Chart, Line Chart, etc.).
•Choose the appropriate data series for the chart (e.g., MRP, Cost after Discount) to visualize.
5.Generating a Report:
•Create a new worksheet/tab for your report.
•Summarize the key insights from the data, such as the total cost after discount, average
discount percentage, product types distribution, etc.
•Use Excel functions like SUM, AVERAGE, COUNTIF, etc., to calculate these values from
the data in your original worksheet.
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.
Here are the steps to create a worksheet for sales analysis of a merchandise store in Excel, using
formulas to segregate different categories, performing a comparative study using pivot tables,
and various charts:
1.Creating the Worksheet:
•Open Excel and create a new workbook.
•In the first row (Row 1), enter the following headers: Order ID, Customer ID, Gender, Age,
Date of Order, Month, Online Platform, Category of Product, Size, Quantity, Amount,
Shipping City, and other relevant details.
2.Enter Sample Sales Data:
•Starting from Row 2, input sample sales data in columns A to L. Fill in information for Order
ID, Customer ID, Gender, Age, Date of Order, Month, Online Platform, Category of Product,
Size, Quantity, Amount, Shipping City, etc.
3.Segregating Different Categories Using Formulas:
•Use formulas like IF, VLOOKUP, INDEX/MATCH, or combinations of functions to
segregate and categorize data. For instance:
•Use IF or INDEX/MATCH functions to categorize products into different categories based on
their types (e.g., Clothing, Electronics, Accessories).
•Use IF or VLOOKUP functions to categorize sales by different age groups or genders.
4.Creating Pivot Tables:
•Highlight the data range.
•Go to the "Insert" tab and select "PivotTable."
•Choose where to place the PivotTable and select the fields you want to analyze (e.g., Category
of Product, Quantity Sold, Amount).
•Arrange fields in rows, columns, and values to analyze data in different dimensions.
5.Comparative Study Using Pivot Tables:
•Experiment with different configurations in the PivotTable, such as filtering by month,
product category, age group, or gender.
•Use features like slicers, filters, and pivot charts to visualize the data from different angles.
Below are steps to generate a report and presentation using Autofilter and macros in Excel:
1.Preparing the Data:
•Ensure your data is well-organized with headers in the first row and contains the information
you want to include in the report and presentation.
2.Creating a Report Using Autofilter:
•Select the data range.
•Go to the "Data" tab and click on "Filter" (or use the shortcut
Ctrl + Shift + L
)to apply Autofilter to your data.
•Use Autofilter to filter data based on specific criteria (e.g., date, category, region, etc.) relevant
to your report.
3.Generating the Report:
•With the data filtered, create a separate worksheet/tab for your report.
•Copy the filtered data from the original sheet and paste it into the report sheet.
•Format the data, add titles, and organize it as needed to create a clear and concise report.
4.Creating a Presentation Using Macros:
•To create a presentation, consider using VBA (Visual Basic for Applications)macros to
automate the process.
•Press
Alt + F11
to open the Visual Basic for Applications editor.
•Insert a new module by right-clicking on "Modules" in the Project Explorer and selecting
"Insert" > "Module".
•Write a VBA macro to generate your presentation based on the filtered data. For example, the
macro might create slides with charts or tables based on the filtered data.
•Here's an example structure of a simple macro to create slides: vbaCopy codeSub
CreatePresentation() Dim PowerPointApp As Object Dim Presentation As Object DimSlide
As Object 'Create PowerPoint application Set PowerPointApp
=CreateObject("PowerPoint.Application") PowerPointApp.Visible = True 'Create
newpresentation Set Presentation = PowerPointApp.Presentations.Add 'Create slide and add
content Set Slide = Presentation.Slides.Add(1, 1) '1 denotes slide type 'Add content to theslide
(e.g., charts, tables) based on the filtered data '... 'Release PowerPoint objects Set Slide=
Nothing Set Presentation = Nothing Set PowerPointApp = Nothing End Sub
•Customize the macro code to suit your specific requirements, such as creating different types
of slides or adding specific content.
5.Running the Macro:
•Save your Excel file with macros enabled.
•Go back to the Excel workbook and run the macro by pressing Alt + F8, selecting the macro,
and clicking "Run".
6.Finalizing Report and Presentation:
•Review the report and presentation for accuracy and formatting.
•Make necessary adjustments to enhance the visual appeal and clarity of both the report and
presentation. By following these steps, you can generate a report using Auto filter in Excel and
create a presentation using macros to automate the process of populating slides with filtered
data. Adjust the VBA code to match your specific data and presentation requirements.