Advanced Excel
Advanced Excel
net/publication/388173790
ADVANCED EXCEL
CITATIONS READS
0 1,995
1 author:
SEE PROFILE
All content following this page was uploaded by Dinesh Kumar Manickam on 19 January 2025.
Steps to Create a Spreadsheet for Sorting Data and Printing Portions of a Worksheet in Advanced
Excel
SORTING DATA
Scenario: Sorting a table of employees by name, department, and salary
Steps to Sort Data:
•Highlight the Data: Select the range of your table (A1:C6).
•Go to the “Data” Tab: Click on “Sort” in the Ribbon.
•Choose Sorting Criteria:
1.Sort by Name (Ascending A-Z).
2.Add a level to sort by Department.
Further, sort by Salary (Descending, Largest to Smallest).
NP = BP + TA + DA + HRA -
101 John 30,000 2,000 6,000 4,500 3,000 1,500
IT - PF
NP = BP + TA + DA + HRA -
102 Alice 35,000 2,500 7,000 5,250 3,500 2,000 IT - PF
NP = BP + TA + DA + HRA -
103 Bob 25,000 1,800 5,000 3,750 2,500 1,200 IT - PF
NP = BP + TA + DA + HRA -
104 Sarah 40,000 3,000 8,000 6,000 4,000 2,500 IT - PF
Steps to Create and Calculate Fields in Advanced Excel
•Enter Field Names in Row 1:
1.Input the field names in Row 1: Empno, Ename, BP, TA, DA, HRA, IT, PF, NP.
•Input Data:
1.Enter employee details in Rows 2 to n for columns Empno, Ename, BP (Basic Pay), TA
(Travelling Allowance), DA (Dearness Allowance), HRA (House Rent Allowance), IT (Income
Tax), and PF (Provident Fund).
•Net Pay (NP) Calculation:
1.Use the following formula to calculate Net Pay in the NP column:
NP = BP + TA + DA + HRA - IT - PF
•Enter Formula in Excel:
1.In cell I2 (first row under NP), enter this formula:
=C2 + D2 + E2 + F2 - G2 - H2
Press Enter. Drag the formula down for all employees.
Result Example:
Calculate Net Pay (NP) in Advanced Excel, considering the given percentages for allowances and
deductions:
Steps to Create the Worksheet:
•Fields/Columns Required:
a)Emp. No., E. Name, BP (Basic Pay), DA, HRA, TA, IT, PF, NP.
•Given Percentages:
a)DA = 30% of BP
b)HRA = 20% of BP
c)TA = 17.5% of BP
d)IT = 15% of BP
e)PF = 12.5% of BP
NP (Net Pay) = BP + DA + HRA + TA - IT - PF
Example Data Table in Excel:
Month January February March April May June July August September October November December
Sales (₹) 50,000 45,000 60,000 55,000 70,000 65,000 80,000 75,000 85,000 90,000 95,0001,00,000
Creating a Spreadsheet Using IF, Nested IF, VLOOKUP, and HLOOKUP Functions in Excel
Below is a guide on how to create a spreadsheet that demonstrates the use of the IF, Nested IF,
VLOOKUP, and HLOOKUP functions in Advanced Excel.
Step 1: Example Data
Let’s start by creating some sample data for the demonstration:
Student Grades Table (for VLOOKUP and IF)
Student ID Name Marks Grade Category
101 Alice 85
102 Bob 72
103 Charlie 55
104 David 91
105 Eve 66
Step 2: Using IF Function
Purpose: The IF function is used to perform logical tests. It checks whether a condition is TRUE
or FALSE and returns one value for TRUE and another for FALSE.
Formula Example:
•Determine Grade based on Marks: In the Grade column, we will use the IF function to categorize
the grades based on the marks.
1.Formula for Grade (Cell D2):
=IF(C2>=80, "A", IF(C2>=60, "B", "C"))
Explanation:
1.If marks are greater than or equal to 80, assign grade A.
2.If marks are greater than or equal to 60 but less than 80, assign grade B.
If marks are below 60, assign grade C.
Output for Grade:
Student ID Name Marks Grade
101 Alice 85 A
102 Bob 72 B
103 Charlie 55 C
104 David 91 A
105 Eve 66 B
Student ID Grade
101 A
102 B
103 C
104 A
105 B
1.Formula to Find Grade (Cell F2):
=VLOOKUP(A2, $A$2:$D$6, 4, FALSE)
Explanation:
1.A2 is the lookup value (Student ID).
2.$A$2:$D$6 is the table array where the lookup data is stored.
3.4 is the column index number (Grade is in the 4th column).
4.FALSE ensures an exact match.
Output for Grade Using VLOOKUP (for a lookup table):
Student ID Name Marks Grade Category Grade Lookup
101 Alice 85 A Excellent A
102 Bob 72 B Good B
103 Charlie 55 C Needs Improvement C
104 David 91 A Excellent A
105 Eve 66 B Needs Improvement B
Step 5: Using HLOOKUP Function
Purpose: The HLOOKUP function is similar to VLOOKUP, but it looks for a value in a horizontal row instead of a
vertical column.
Formula Example:
Find Student Grade Based on Marks (Using Horizontal Lookup): We have the following data in a horizontal format for
grade lookup:
Marks 55 60 70 80 90
Grade C B B A A
1.Formula to Find Grade Using HLOOKUP (Cell F2):
=HLOOKUP(C2, $B$8:$F$9, 2, TRUE)
Explanation:
1.C2 is the lookup value (Marks).
2.$B$8:$F$9 is the table array (Marks and corresponding grades).
3.2 is the row index number (Grade is in the second row).
4.TRUE indicates an approximate match (closest value to the left).
Output for Grade Using HLOOKUP (based on Marks):
Student ID Name Marks Grade Category Grade Lookup HLOOKUP Grade
101 Alice 85 A Excellent A A
102 Bob 72 B Good B B
103 Charlie 55 C Needs Improvement C C
104 David 91 A Excellent A A
105 Eve 66 B Needs Improvement B B
Summary of Functions
Function Purpose Example Formula Use Case
Checks a condition and returns
IF =IF(C2>=80, "A", "B") Grade assignment based on marks
values based on TRUE/FALSE
Performs multiple logical tests in =IF(C2>=85, "Excellent", IF(C2>=70, "Good",
Nested IF Advanced categorization of students
sequence "Needs Improvement"))
VLOOKUP Looks up a value in a vertical column =VLOOKUP(A2, $A$2:$D$6, 4, FALSE) Retrieve data from a vertical table
HLOOKUP Looks up a value in a horizontal row =HLOOKUP(C2, $B$8:$F$9, 2, TRUE) Retrieve data from a horizontal table
9. Demonstrate any FIVE Statistical functions using MS-Excel.(
MEAN,MEDIAN,MODE,Standard Deviation, Quartiles Functions,etc.,)
Demonstrating Five Statistical Functions in MS Excel:
Below, I'll demonstrate the use of five key statistical functions in MS Excel: MEAN, MEDIAN,
MODE, Standard Deviation, and Quartiles.
Step 1: Sample Data
First, let's create a sample data set that we will use to demonstrate the functions.
Data 12 15 10 18 20 15 18 22 19 14
Explanation:
•The X-axis represents the score ranges (bins), and the Y-axis shows the number of students who fall into each range.
The histogram will display bars that correspond to each score range and how many students' scores fall into that range.
11. Use the data below to create a histogram for annual returns on stocks, bills, and bonds. Which
investment has the highest average return?
Year Stocks T. Bills T. Bonds
1928 43.81% 3.08% 0.84%
1929 -8.30% 3.16% 4.20%
1930 -25.12% 4.55% 4.54%
1931 -43.84% 2.31% -2.56%
1932 -8.64% 1.07% 8.79%
1933 49.98% 0.96% 1.86%
1934 -1.19% 0.30% 7.96%
1997 31.86% 4.91% 9.94%
1998 28.34% 5.16% 14.92%
1999 20.89% 4.39% -8.25%
2000 -9.03% 5.37% 16.66%
2001 -11.85% 5.57% 5.57%
Creating a Histogram for Annual Returns on Stocks, T. Bills, and T. Bonds
Create a histogram for the annual returns on Stocks, T. Bills, and T. Bonds. Additionally, calculate the average return for
each investment to determine which one has the highest average return.
Step 1: Enter the Data in Excel
Enter the data as follows in Excel:
Year Stocks T. Bills T. Bonds
1928 43.81% 3.08% 0.84%
1929 -8.30% 3.16% 4.20%
1930 -25.12% 4.55% 4.54%
1931 -43.84% 2.31% -2.56%
1932 -8.64% 1.07% 8.79%
1933 49.98% 0.96% 1.86%
1934 -1.19% 0.30% 7.96%
1997 31.86% 4.91% 9.94%
1998 28.34% 5.16% 14.92%
1999 20.89% 4.39% -8.25%
2000 -9.03% 5.37% 16.66%
2001 -11.85% 5.57% 5.57%
Step 2: Create the Histogram
To create the histogram for each investment, follow these steps:
•Select the Data for Stocks:
1.Highlight the data for Stocks (B2:B13).
•Insert the Histogram:
1.Go to the Insert tab in the ribbon.
2.In the Charts group, select Insert Statistic Chart > Histogram.
3.This will insert a histogram showing the distribution of annual returns for Stocks.
•Repeat the Process for T. Bills and T. Bonds:
1.For T. Bills, select the data for T. Bills (C2:C13) and repeat the histogram creation process.
For T. Bonds, select the data for T. Bonds (D2:D13) and repeat the histogram creation process.
Step 3: Calculate the Average Return for Each
Investment
Thus, Stocks have the highest average
Now, let's calculate the average return for each investment:
return over the given period.
•For Stocks:
a.In a new cell, use the formula:
=AVERAGE(B2:B13)
•For T. Bills:
a.In another cell, use the formula:
=AVERAGE(C2:C13)
•For T. Bonds:
a.In another cell, use the formula:
=AVERAGE(D2:D13)
Step 4: Results of Average Return
After calculating the average returns, the results will look
something like this:
Step 5: Conclusion
From the calculated average returns:
•Stocks have the highest average return at 7.43%.
•T. Bonds have an average return of 4.89%.
T. Bills have the lowest average return at 3.83%.
12. Calculate correlation coefficient in Excel AND plot a correlation graph in Excel.
Calculating the Correlation Coefficient and Plotting a Correlation Graph in Excel
The correlation coefficient is a measure that quantifies the relationship between two variables. It ranges
from -1 to 1, where:
• 1 indicates a perfect positive correlation,
• -1 indicates a perfect negative correlation,
• 0 indicates no correlation.
To calculate the correlation coefficient and plot a correlation graph in Excel, follow these steps:
Step 1: Enter the Data
Assume we have two sets of data: X (e.g., Sales) and Y (e.g., Advertising Budget). The data is as follows:
X (Sales) Y (Advertising Budget)
10 200
12 240
15 300
18 360
20 400
22 440
25 500
Regression Statistics
Multiple R 1.00
R Square 1.00
Adjusted R Square 1.00
Standard Error 0.00
Observations 7.00
ANOVA
df SS MS F Significance F
Standard
Coefficients Error t Stat P-value Lower 95%
Intercept 0.00 0.00 0.00 1.00 0.00
X (Advertising 313742030183814
Budget) 0.05 0.00 00.00 0.000 0.05
Creating a Pivot Table and Carrying Out Analysis with Charts in Excel
A Pivot Table is a powerful tool in Excel that allows you to summarize, analyze, explore, and present
your data. It enables you to transform a large dataset into a more manageable and insightful format.
In this example, we'll walk through how to create a Pivot Table, analyze the data, and then generate charts
based on the Pivot Table.
Step-by-Step Guide: Step 1: Sample Data
Assume you have the following dataset with sales data across different regions and months:
Region Month Sales Expenses
North Jan 5000 2000
South Jan 4000 1500
East Jan 6000 2500
North Feb 7000 3000
South Feb 5000 2000
East Feb 8000 3500
North Mar 7500 3200
South Mar 4500 1800
East Mar 7000 2900
Step 2: Insert a Pivot Table
•Select the Data Range:
a.Highlight the range of your data (e.g., A1:D10).
•Create Pivot Table:
a.Go to the Insert tab in the Excel ribbon.
b.Click PivotTable in the Tables group.
c.In the Create PivotTable dialog box, ensure the range is correct (e.g., A1:D10).
Choose to place the PivotTable in a New Worksheet or in an Existing Worksheet.
•Drag Fields to the Pivot Table:
a.In the PivotTable Field List:
oDrag Region to the Rows area.
oDrag Month to the Columns area.
oDrag Sales to the Values area (it will automatically sum the sales).
oDrag Expenses to the Values area (it will automatically sum the expenses).
The Pivot Table will now summarize sales and expenses by region and month.
Step 3: Analyze the Pivot Table
You should now have a Pivot Table like the one below:
Region Jan Feb Mar Grand Total
North 5000 7000 7500 19500
South 4000 5000 4500 13500
East 6000 8000 7000 21000
Grand Total 15000 20000 19000 54000
To calculate the Pearson's Coefficient of Correlation in Excel using the provided data, follow these
steps: Given Data:
X 10 15 12 17 13 16 24 14
Y 30 42 45 46 33 34 40 35