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

Advanced Excel

Uploaded by

pandeyridhesh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views

Advanced Excel

Uploaded by

pandeyridhesh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

ADVANCED EXCEL PRACTICAL FILE

B.Tech 3rd Sem

Submitted By: (Name of student)


Roll No:
INDEX

Topic Page No Signature


Excel Practice Exercises
Simple arithmetic
Extending an operation by clicking and dragging
Absolute and Relative referencing
Simple statistical functions
Logical operations
Decision making using IF, SUMIF,COUNTIF etc.,
Text functions
Look up functions
Visualization using charts
Page referencing
Simple arithmetic

Problem 1: Add two numbers

Steps:
1. Open a spread sheet and type in the labels called number 1 and
number 2 in the cells A1 and B1 and add in the cell C1. This is just for
us to identify the values and they are not involved in actual execution
2. In A2 and B2, type in the numbers to be added.
3. In C2, type in =A2+B2 and press enter to display the result. In excel
calculations are prefixed with = sign followed by the operation on
cells
4. The cell number represents the numbers (For e.g A2 and B2 are used
which denote 3 and 5 respectively with a plus sign in between as in
the case of normal addition.
5. To add more than two numbers, add as many columns (number1,
number2, number3 etc., and extend the formula as =A2+B2+C2+….
Extending an operation by clicking and dragging

Problem 2: Add 5 sets of two numbers

Steps:

1. Type in as many number of sets of numbers you want under the


columns number1 and number2 and then click on the cell C2 and
move your cursor to the bottom right corner of the cell
2. The cursor changes to + sign. Now keeping the left mouse button
down drag the cursor till the last set of numbers and you can see that
the cells are filled with the results.
Absolute and Relative referencing

Problem 3:
Consider the problem of preparing a stationary order for the month of
March. The item description, quantity and cost per item are available. The
total cost per item is to be calculated and the final cost per item involves a
sales tax of 2% over the total cost. The gross total and the net total are to be
displayed.

Steps:

1. Create an excel sheet with the available data as shown below:


2. Add the columns total cost per item, VAT and Cost + VAT
3. Fill in the V.A.T value (2%) in one of the cells say G1 so as to not to
affect the other calculations.
4. Multiply quantity*cost per item to obtain the total cost
5. Multiply the V.A.T value with the total cost of each item to obtain
V.A.T column
a. Observe what happens when you drag the cells after you fill in
the formula for the first item
b. The first item gets filled correctly but the other items show zero
as shown below:

c. This is because the formula changes relatively for the


subsequent cells as D4*G2,D5*G3 etc.. Where as the value is
present only in one cell G1. To prevent this automatic changing
of cell values (also called relative referencing which excel does
by default), anchor the cell G1 as G$1. The $ infront of a row or
column prevents automatic updation of the row/column value
when dragged. Here G is stationary by default but rows change
as 1,2,3,.. etc so we anchor the row as G$1. and then drag the
formula which updates the cells properly as shown below:

6. Calculate Cost + VAT


7. Display the total cost
Simple statistical functions

Problem 4: Let us consider the problem of finding the total and average of 3
subject marks for five students in a class in the board exam. The data is
entered into the spread sheet as shown below:

Steps:

1. To calculate sum, type =sum( in the cell F2 and click and drag the
cells C2, D2 and E2 i.e., =sum(C2:E2) where : denotes the range to
add maths physics and chemistry marks of student no1.
2. For calculating sum for other students, click and drag the sum value of
F2 till F6
3. Similarly calculate average as =average(C2,D2,E2) or
=average(C2:E2). The first case is used if the cells are not continuous
whereas the second case is used when the cells are continos.
4. The result of the above problem is given below:
Problem 5:
Calculate the Maximum mark, minimum mark, mean, median, standard
deviation and variance for each subject.

Steps:

1. Type the labels Maximum, Minimum etc in the required columns as


shown above
2. Type in the required formulae or choose the formulae by going to the
menu Insert→Function and pick from the category as required and fill
in each value for the first subject (Maths)
3. For physics and chemistry just click and drag the formula cells of
maths horizontally to calculate each formula (Max,min etc)
Logical operations
Problem 6:
Consider the design of a light switch system that can turn the same light on
or off in three different places. One switch (A) is installed in the hall on the
first floor. Another switch (B) is located on the upstairs landing and the third
switch (C) is located on the ground floor as shown in the figure.

Each of the switches has 2 states (on and off). When an odd number of
switches are on, the bulb remains off and in all other cases, the bulb glows.
Design a truth table and find the various states of the bulb for various
combinations of the 3 switches.

Solution:
Steps:
1. Write the various combinations of the three switches in three columns
2. Write the truth values for the conditions where the switch is on as 1
and others as 0
3. Consider the conditions where the switch is on and combine the three
switch states using the logical operators AND,OR and NOT.
For e.g, for combination 2 in the above figure when switch A and B
are on and switch C is off we get the formula as B2 (for switch A),C2
(for Switch B) and not D2(for switch c) which is written as the excel
formula AND(B2,C2, NOT(D2)).
4. Likewise the formula is formed for all the conditions where the switch
is on and all such on state formulae are combined using OR operator
as follows:

=OR(AND(B2,C2,NOT(D2)),AND(B2,NOT(C2),D2),AND(NOT(B2),
C2,D2),AND(NOT(B2),NOT(C2),NOT(D2)))*1

5. This final formula can be dragged throughout the state column to fill
in the other states.
6. The formula gives TRUE or FALSE results which can be converted
into Boolean values by multiplying by 1

Problem 7:
Excel University provides Computers to its faculty members and the assets
team performs a periodical stock taking to check if the same machine is still
used by the faculty or it has been replaced by some other machine for some
reason by the systems team. A machine could be changed if it is upgraded or
it is repaired or if it is replaced by some other. A copy of the list resides in
the assets office and it is checked with the list noted by the stock taker and
those machines which do not match with the old list need to be updated with
the new details. Prepare a data sheet containing cabin numbers (numbered
F1,F2,…. F20) machine models (Excelsys1100,…) and verify with another
set similar data obtained by the stock taking operation and indicate the
matching and non-matching entries in the sheet which needs updation.

Solution:

Steps:

1. Create the two columns as indicated in the question with appropriate


headings
2. Apply the equality operator in the respective columns to verify for
cabin and models (E.g., =(A3=C3) verifies whether the contents of
cell A3 and C3 are the same
3. Drag the formula to fill the results for all the cabins and models.
Decision making using IF, SUMIF,COUNTIF etc.,

Problem 8:
In this problem you are given the name, gender, attendance, assignment,
midterm and final grades of five students. Find the total of the assessment
marks. Students who pass need to have a total score greater than or equal to
50. Display the word "Pass" or "Fail" under a column called Description

Steps:

1. Create a column called description


2. In the first student’s description cell type the IF function using the
total cell’s no to check pass or fail
3. For e.g., in the above fig, in Virak’s description cell, type
=if(G2>50,”pass”,”fail”)
4. Drag the results to all the remaining cells which need computation

Problem 9:
Extend the above pass/fail computation problem to include attendance also.
A student passes if he has an attendance greater than 8 else he fails even if
he has a total greater than 50

Solution:
Modify the formula in the previous problem as
=IF(AND(C12>8,G12>=50),"pass","fail")
Problem 10:
In the previous problem, without considering attendance as criteria for
passing, calculate the grades of the students as per the grade rule table given
below:

Marks Range Grade


Score>=90 A
90>Total B
Score>=80
80>Total C
Score>=70
70>Total D
Score>=60
60>Total E
Score>=50
Total Score < 50 F
If all the grades (A to F) are not displayed in your grade column add some
student entries that have marks falling in the appropriate grades and verify
your formula.

Solution:

Steps:
1. Add a column called grade
2. This problem needs to be solved using if function within if function as
follows:
For example if Virak’s total cell is G22 then the function is formulated as
=IF(G22>=90,"A",IF(AND(G22>=80,G22<90),"B",IF(AND(G22>=70,
G22<80),"C",IF(AND(G22>=60,G22<70),"D",IF(AND(G22>=50,G22<
60),"E","F")))))

3. The above function is written as an outer IF function which has one


grade in its true part if the condition is satisfied and the next grade
rule is written in the false part of the previous grade rule and the
writing continues for all the grades.

Problem 11:
You are given a file containing the name and age of people. You have to
count the number of people in each category as minor(<18), major(18-25),
middle aged(26-40), above middle age (40-60) and senior citizen (61-100)
using a single function for each scenario and print the count pertaining to the
conditions.

Steps:

1. There are multiple formulae for solving this problem


2. The most easiest one is to use countif for single criterion and countifs
for multiple criterion if you have Microsoft excel 2007 or later
3. For counting minor here we use the formula
=COUNTIF(B2:B21,"<18") since it contains only one condition
4. For counting major we can use =COUNTIFS(B2:B21,">=18",
B2:B21,"<=25")
5. If countifs is not available we can use countif to calculate the result as
=COUNTIF(B2:B21,">=18") - COUNTIF(B2:B21,">25")
6. We can also achieve the same result in two steps as using a logical
operator to find the people lying in a particular range and finding the
countif of people who fall in true type
7. For example, middle age category is calculated as
=AND(B2>=26,B2<=40) in column c
followed by
=COUNTIF(C2:C21,"true") in cell g9

Problem 12:
Consider a table containing the consignments of different fruits from
different suppliers as shown in the figure below. You have the fruit names in
column A, supplier’s names in column B, and quantity in column C. Find
out how many quantities of each fruit is received.
Solution:

Steps:
1. To find the number of apples the formula is
=SUMIF(A2:A9,"apples",C2:C9)
2. A2:A9 stands for range that is the type that we want
3. In the range A2:A9 we are searching for “apples”
4. Based on the search range and criteria “apples”, we need to sum the
column Quantity (C2:C9)
5. A word of caution while dragging the formula for other fruits:
a. When you drag the formula for other fruits aiming to just
change the name of the fruit be cautious to use absolute
referencing as the table reference will change as you drag (due
to the default relative referencing of excel)
b. Instead use the formula as
=SUMIF(A$2:A$9,"apples",C$2:C$9) which would prevent the
automatic updation of rows
6. To apply sum if on multiple criteria, for example to find the
number of apples supplied by pete, use SUMIFS which is available
Microsoft excel 2007 or later as follows:
=SUMIFS(C2:C9, A2:A9, "apples", B2:B9, "Pete")

Note: SUMIFS has the format:


SUMIFS(sum_range, criteria_range1, criteria1,[criteria_range2,
criteria2],...)
Text Functions

Problem 13:
Given the below worksheet Write appropriate text functions in excel to
calculate first name, last name and email id.

Solution:

Steps:

1. The formula for calculating last name is =LEFT(A2,FIND(" ",A2)-1)


2. The formula for calculating first name is =RIGHT(A2,LEN(A2)-
FIND(" ",A2))
3. The formula for calculating email is
=CONCATENATE(B2,"_",C2,"@gmail.com")
Look Up Functions

Problem 14:
Given the table below,
1. Use hlookup function to display student's name Sok Pagan
2. Use vlookup function to find the computer score of the students
named Khorn Channa and Cheng Sokun

Given the table:

Steps:

1. Hlookup is applied using the formula


=HLOOKUP("Name",A1:A7,5,FALSE)
2. Vlookup can be performed using the formula
=VLOOKUP("Khorn Channa",A1:D7,2,FALSE)
=VLOOKUP("Cheng Sokun",A1:D7,2,FALSE)
Problem 15:
From the student table given below, fetch Steve’s mark in English.

Solution:
In any one of the empty cells apply HLOOKUP(“Steve”,A1:I4,4,FALSE)
which returns 61. Here Steve is the lookup value,A!:I4 is the range/table of
search, 4th row which is the English marks must be returned and Range look
up is false as we require an exact match. Hence the output will be:
Problem 16:
Given the table below, use VLOOKUP to find the price of a photo frame

Steps:
1. In a cell say E2, type in the formula =VLOOKUP("Photo frame",
A2:B16, 2, FALSE)
2. When you press Enter, it should give you the answer, which is 9.99.
Problem 17:
In the above exercise, let us say you have a third column that has the
category for each item as shown in the below figure. This time, instead of
finding the price we'll find the category.

Steps:

1. To find the category, we'll need to change the second and third
arguments in our formula.
2. First, we'll change the range to A2:C16 so it includes the third
column.
3. Next, we'll change the column index number to 3 because our
categories are in the third column:

=VLOOKUP("Gift basket", A2:C16, 3, FALSE)

4. When you press Enter, you'll see that the Gift basket is in the Gifts
category.
Problem 18:
You are given two tables Element Table and Element Table 2 . Fetch the
melting points of the elements from the second table and fill in the first
table.

Steps:

1. First element in the first table is in C3


2. We write the VLOOKUP formula for the first element in the first
table in D3
3. The table from which we should fetch the values is F3:G14, we need
absolute referencing so it is $F$3:$G$14
4. We need the second column values form table 2; so the index is 2
5. The formula at D3 in table 1 is

=VLOOKUP(C3,$F$3:$G$14,2,FALSE)

6. Drag to get the melting points for other elements


Problem 19:
Fetch Florian’s first name, last name, Maths and Science mark from the
table. This requires us to fetch values for Florian from multiple columns ----
Florian’s record.

Steps: To fetch a record(values from multiple columns)

1. Table is referred using A:D ; this refers to the entire table ( Note: we
need not mention the row labels)
2. Values are to be fetched for Florian from columns 1,2,3,and 4; this is
specified within parenthesis as a comma separated list as {1,2,3,4}
3. The formula is :
=VLOOKUP("Florian",A:D,{1,2,3,4},FALSE)
----- Select 4 cells in a row
------Enter Formula
--------Press Shift+CTL and
Enter
Problem 20:
Find the revenue amount for Country Brazil for the Year 2014 in the
Revenue by Country and Year table.

Steps:

1. The strategy is to fetch the index for Year 2014 using HLOOKUP
and use that index in VLOOKUP for Brazil and get its revenue.

2. Modify the table to insert a row below the first row and enter the
column indices. It is shown in green in the modified table given
below.
2. First let us find the column index of 2014 using HLOOKUP.
Assume 2014 is stored in D5.

Moving horizontally across the top of the table array selected (green
border table -----C13:G14), stop at the lookup value (“2014“) and
return the value in the corresponding second row.
HLOOKUP ( D5 , C13:G14 , 2 , FALSE )

3. In this case, the formula resolves to 4. Therefore, 4 will be used as


your column reference for your VLOOKUP.

4. Next the VLOOKUP. Assume Brazil is stored in C5. The table


values are in C13:G14.

Moving vertically down the left side of the table array selected (red
border table--- C13:G14), stop at the lookup value (“Brazil“) and
return the value in the corresponding the column returned by
HLOOKUP (the formula is written in step 2.) The result of
HLOOKUP is 4.

VLOOKUP ( C5 , C13:G14, ---------- , FALSE )

---------- is to be filled with the formula in Step 2.

5. the complete formula is:

= VLOOKUP (C5 , C13:G14,HLOOKUP ( D5 ,


C13:G14 , 2 , FALSE ), FALSE )
Visualization using Charts

Problem 21:
Given the data below for fruit sales, Create a line chart .

Hints:

1. Goto Insert Chart and choose line chart


2. Select the data from A2 to I14
3. Give next→next and finish to display the chart
Problem 22:
Use the Stationary Order for the Month of March spreadsheet in Problem 3
to create the Pie Chart.

Hints:
1. Goto Insert Chart and choose pie chart and choose a sub chart type
with 3D visual effect
2. Select the data from A3 to B21
3. Give next→next and finish to display the chart
Page Referencing

Problem 23:
Consider the following scenario: the employee hourly rates of pay are stored
in one spreadsheet, and a list of hours worked during the last month, are
stored in a second spreadsheet as shown in the figures below:

Hourly Pay: Sales Team Hours Worked:

Complete the "Sales Team Hours" spreadsheet, so that it shows the pay
owed to each sales team member, by looking up each person’s rate of pay
from the "Hourly Pay" spreadsheet.

Solution:

The following figure shows the Vlookup function, in cells C2-C3 of the
"Sales Team Hours" spreadsheet, used to look up the hourly pay rates for
each of the sales team members. While writing the vlookup function’s
second value namely ‘HourlyPay’!A:B, Select the sheet in which the hourly
pay is present and select that table and press enter and excel would fill the
formula in the Sales team hours sheet
The results of these Vlookup functions are shown in the spreadsheet below.
As expected, each team member's hourly rate of pay has been inserted into
the corresponding cell in column C.

Following the above step calculate the payment due as a multiplication of


hours worked and hourly rate.

You might also like