Advanced Excel
Advanced Excel
)
DEPARTMENT OF COMPUTER SCIENCE
ADVANCED EXCEL
Unit I:
Basics of Excel- Customizing common options- Absolute and relative cells- Protecting and un-
protecting worksheets and cells- Working with Functions - Writing conditional expressions -
logical functions - lookup and reference functions- VlookUP with Exact Match, Approximate
Match- Nested VlookUP with Exact Match- VlookUP with Tables, Dynamic Ranges- Nested
VlookUP with Exact Match- Using VLookUP to consolidate Data from Multiple Sheets
Unit – II:
Data Validations - Specifying a valid range of values - Specifying a list of valid values- Specifying
custom validations based on formula - Working with Templates Designing the structure of a
template- templates for standardization of worksheets - Sorting and Filtering Data Sorting tables-
multiple-level sorting- custom sorting- Filtering data for selected view - advanced filter options-
Working with Reports Creating subtotals- Multiple-level subtotal.
Unit – III:
Creating Pivot tables Formatting and customizing Pivot tables- advanced options of Pivot tables-
Pivot charts- Consolidating data from multiple sheets and files using Pivot tables- external data
sources- data consolidation feature to consolidate data- Show Value As % of Row, % of Column,
Running Total, Compare with Specific Field- Viewing Subtotal under Pivot- Creating Slicers.
Unit – IV:
More Functions Date and time functions- Text functions- Database functions- Power Functions
- Formatting Using auto formatting option for worksheets- Using conditional formatting option
for rows, columns and cells- What If Analysis - Goal Seek- Data Tables- Scenario Manager.
Unit – V:
Charts - Formatting Charts- 3D Graphs- Bar and Line Chart together- Secondary Axis in Graphs-
Sharing Charts with PowerPoint / MS Word, Dynamically- New Features Of Excel Sparklines,
Inline Charts, data Charts- Overview of all the new features.
UNIT – I
Basics of Excel
Excel is an incredibly powerful tool for getting meaning out of vast amounts of data. But it also
works really well for simple calculations and tracking almost any kind of information. The key for
unlocking all that potential is the grid of cells. Cells can contain numbers, text, or formulas. You
put data in your cells and group them in rows and columns. That allows you to add up your data,
sort and filter it, put it in tables, and build great-looking charts
Excel documents are called workbooks. Each workbook has sheets, typically called spreadsheets.
You can add as many sheets as you want to a workbook, or you can create new workbooks to keep
your data separate.
For example, cell A1 on a new sheet. Cells are referenced by their location in the row and
column on the sheet, so cell A1 is in the first row of column A.
2. On the Home tab, in the Font group, click the arrow next to Borders, and then click the
border style that you want.
Apply cell shading
1. Select the cell or range of cells that you want to apply cell shading to.
2. On the Home tab, in the Font group, choose the arrow next to Fill Color , and then
under Theme Colors or Standard Colors, select the color that you want.
When you’ve entered numbers in your sheet, you might want to add them up. A fast way to do
that is by using AutoSum.
1. Select the cell to the right or below the numbers you want to add.
2. Click the Home tab, and then click AutoSum in the Editing group.
Adding numbers is just one of the things you can do, but Excel can do other math as well. Try
some simple formulas to add, subtract, multiply, or divide your numbers.
2. Type a combination of numbers and calculation operators, like the plus sign (+) for addition,
the minus sign (-) for subtraction, the asterisk (*) for multiplication, or the forward slash (/)
for division.
3. Press Enter.
You can also press Ctrl+Enter if you want the cursor to stay on the active cell.
Apply a number format
To distinguish between different types of numbers, add a format, like currency, percentages, or
dates.
2. Click the Home tab, and then click the arrow in the General box.
A simple way to access Excel’s power is to put your data in a table. That lets you quickly filter or
sort your data.
1. Select your data by clicking the first cell and dragging to the last cell in your data.
To use the keyboard, hold down Shift while you press the arrow keys to select your data.
2. Click the Quick Analysis button in the bottom-right corner of the selection.
3. Click Tables, move your cursor to the Table button to preview your data, and then click
the Table button.
5. To filter the data, clear the Select All check box, and then select the data you want to show in
your table.
6. To sort the data, click Sort A to Z or Sort Z to A.
7. Click OK.
Sort your data
1. Select a range of data, such as A1:L5 (multiple rows and columns) or C1:C80 (a single
column). The range can include titles that you created to identify columns or rows.
1. Select a single cell anywhere in the range that you want to sort.
2. On the Data tab, in the Sort & Filter group, choose Sort.
4. In the Sort by list, select the first column on which you want to sort.
5. In the Sort On list, select either Values, Cell Color, Font Color, or Cell Icon.
6. In the Order list, select the order that you want to apply to the sort operation —
alphabetically or numerically ascending or descending (that is, A to Z or Z to A for text or
lower to higher or higher to lower for numbers).
2. On the Data tab, in the Sort & Filter group, click Filter.
3. Click the arrow in the column header to display a list in which you can make filter
choices.
4. To select by values, in the list, clear the (Select All) check box. This removes the check
marks from all the check boxes. Then, select only the values you want to see, and
click OK to see the results.
Save your work
1. Click the Save button on the Quick Access Toolbar, or press Ctrl+S.
a. Under Save As, pick where to save your workbook, and then browse to a folder.
c. Click Save.
2. Preview the pages by clicking the Next Page and Previous Page arrows.
The preview window displays the pages in black and white or in color, depending on your
printer settings.
If you don’t like how your pages will be printed, you can change page margins or add page
breaks.
3. Click Print.
Customizing common options
To open the Excel Options dialog box:
By default, Excel uses Calibri (body font) font size 11. you can change the default by following
these steps:
In General options, within ‘When creating new workbooks’ section, change the default
font type and font size.
Now when you open a new workbook, it will use the new font setting by default.
2. Always Save Files in .xls format
If you are sharing your excel workbooks with people who have 2003 version, you need to
manually change the format to .xls. Instead of doing this manually every time, you can change the
default file format Save setting.
In Save options, within ‘Save workbooks’ section, change the Save File format to Excel
97-2003 Workbook.
To save time, you can change the calculation setting to manual. To do this:
References are used in formulas to do calculations, and the fill function can be used to continue
formulas sidewards, downwards and upwards.
1. Relative references
2. Absolute references
Absolute reference is a choice we make. It is a command which tells Excel to lock a reference.
Relative reference
References are relative by default, and are without dollar sign ($).
The relative reference makes the cells reference free. It gives the fill function freedom to continue
the order without restrictions.
Let's have a look at a relative reference example, helping the Pokemon trainers to count their
Pokeballs (B2:B7) and Great balls (C2:C7).
The references being relative allows the fill function to continue the formula for rows downwards.
Have a look at the formulas in D2:D7. Notice that it calculates the next row as you fill.
Absolute References:
Let's have a look at an example helping the Pokemon trainers to calculate prices for Pokeballs
Data explained
There are 6 trainers: Iva, Liam, Adora, Jenny, Iben and Kasper.
They have different amount of Pokeballs each in their shop cart
The price per Pokeball is 2 coins
The price's reference is B11, we do not want the fill function to change this, so we lock it.
1. Select all cells in the worksheet by clicking the Select All button, found above
the row numbers and to the left of the column headers.
4. Uncheck the box for the Locked option, then click OK.
5. In the worksheet, select the cell you want to lock and protect.
7. Click the Protection tab, check the box for the Locked option, then click OK.
11. In the Allow all users of this worksheet to section, make sure only the box for
the Select unlocked cells option is checked, then click OK.
12. Enter the password again in the Confirm Password window and click OK.
How to protect a Sheet
1. Select all cells in the worksheet by clicking the Select All button, found above
the row numbers and to the left of the column headers.
4. Make sure the box for the Locked option is checked. Click the box to check it if
it's not already checked.
8. In the Allow all users of this worksheet to section, make sure only the box for
the Select unlocked cells option is checked, then click OK.
9. Enter the password again in the Confirm Password window and click OK.
3. In the Unprotect Sheet sheet window that pops up, enter the password to unlock
the worksheet, then click OK.
Working with Formulas
1. Select a cell.
2. Type the equal sign =.
6. Press Enter. The result of the calculation appears in the cell with the formula.
See a formula
When a formula is entered into a cell, it also appears in the Formula bar.
These three functions are often included in the "logical_test" for slightly more advanced
conditions.
Cell E3 - Return the opposite of a True or False value you would use the NOT function.
Cell E4 - Return the logical AND for two different conditions you would use the AND function.
Cell E5 - Return the logical OR for two different conditions you would use the OR function.
Multiple Conditions - IF Function (nested)
If you want to check for multiple conditions you can use "nested" IF functions.
When you nest the IF functions, you specify an IF function as the value of either of the
"value_if_true" or "value_if_false". arguments
You can combine or nest up to 64 levels of IF functions within one formula.
The SWITCH function can return a value based on a list of exact matches.
Vlookup
The VLOOKUP (Vertical lookup) function looks for a value in the leftmost column of a table, and then returns
a value in the same row from another column you specify.
Note: when we drag the VLOOKUP function down, the absolute reference ($E$4:$G$7) stays the same, while
the relative reference (A2) changes to A3, A4, A5, etc
Hlookup
In a similar way, you can use the HLOOKUP (Horizontal lookup) function.
Note: if you have Excel 365 or Excel 2021, you can also use XLOOKUP to perform a horizontal lookup.
Match
The MATCH function returns the position of a value in a given range.
Explanation: Yellow found at position 3 in the range E4:E7. The third argument is optional. Set this argument to
0 to return the position of the value that is exactly equal to lookup_value (A2) or a #N/A error if not found.
Use INDEX and MATCH in Excel and impress your boss.
Index
The INDEX function below returns a specific value in a two-dimensional range.
Explanation: 92 found at the intersection of row 3 and column 2 in the range E4:F7.
Explanation: 97 found at position 3 in the range E4:E7. Use INDEX and MATCH in Excel and impress your
boss.
Choose
The CHOOSE function returns a value from a list of values, based on a position number.
Vertical lookup, often known as VLOOKUP, is one of the most popular functions in Excel. It’s
specifically designed to navigate through database sources and tables to retrieve data.
The function performs vertical searches down a specific column by looking for a value in the first
column of a table and returning a value on the same row in a specific column.
VLOOKUP syntax
Here’s the syntax of VLOOKUP:
Now, let’s look into the meaning behind each argument before we go through examples:
Lookup_value
The value to lookup in the leftmost column of a table.
Table_array
The range of cells that contains the data.
Col_index_num
The number of the column in the table, from which the matching value must be returned. The first
column is 1, the second column is 2, and so on.
[Range_lookup]
It’s optional — not necessary to enter. This is the parameter used to define exact match or
approximate match. Should you wish to specify, there are two options:
VLOOKUP example
A customer data analyst has been given the data set below and asked to look up the city of three
particular clients by using their client ID, under column G.
To compose the formula in cell H2, let’s break it down in arguments:
Lookup_value
100002 is the first client to lookup, so the lookup_value is cell
G2.
Table_array
The table from which the value is available is within
A1:E11.
Col_index_num
There are five columns in total within the table. Information related to the city is under Column D,
or the fourth column from the leftmost column. So, we enter 4 as the argument.
[Range_lookup]
In the meantime, let’s enter FALSE – exact match.
The full formula is:
=VLOOKUP(G2,A1:E11,4,FALSE)
Approximate match is the default range_lookup in the formula. When no instruction is given, Excel
assumes the lookup refers to an approximate match.
In most cases, it’s less frequently used compared to exact match, though it is useful when the lookup
value is not available within the table array.
For instance, the annual income of $39,000 is not available in the leftmost column of the table. In
this situation, TRUE is useful in requesting Excel to return an approximate match. As $39,000 is not
available, it will return a value smaller than $39,000 ($30,000 in this example) — 8% of salary tax.
If we use FALSE (exact match in this situation), since there’s no value of $39,000 available in the
leftmost column, Excel will return #N/A.
In the ranges B3:C6 and B9:C13, we have two tables with similar structures, but different data values.
The tables consist of “Product ID” (column B) and “Product Description” (column C). In the column
G, we want to get Product description from the two VLOOKUP tables, based on “Lookup table” and
“Product ID” cells values (columns E and F).
To be able to reference dynamically the table, we will first need to create named ranges for both
VLOOKUP tables.
Create Named Ranges
Follow these steps to create named ranges:
1. Select the table for which we want to create a named range (B3:C6)
2. In Formula tab click on the Name Manager
3. In popup screen select New, A new window will appear and we will have to define “Name”,
“Scope” and “Refers to”
4. Name of the range will be “Table1”, Scope will be the Workbook, while Refers to will be
Table1 (B3:C6)
5. Just click OK and we created a named range “Table1”
6. In order to create the same named range for the other table, just repeat steps above, but first
select the range B9:C13.
#2 – Dept Worksheet
#3 – Salary Worksheet
#4 – Summary Worksheet
We have three pieces of information in three different worksheets, and for the “Summary Sheet,” we
need to fetch the data from three other worksheets.
In the “Summary Sheet,” open the VLOOKUP function.
Choose the LOOKUP value as the A3 cell.
Since we are fetching the DOJ, for Table Array selection, go to the DOJ worksheet and choose
the table range.
Now, mention column number 2 and the range lookup 0.
Similarly, do the same to get “Dept” and “Salary” details. For “Dept,” choose the table range
from the “Dept” worksheet. For “Salary,” choose the table range from the “Salary” worksheet.
Like this, we can fetch the data from different worksheets using the VLOOKUP function.
END OF UNIT - I