Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
264 views

Advanced Excel

Uploaded by

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

Advanced Excel

Uploaded by

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

LOYOLA COLLEGE OF ARTS AND SCIENCE (CO. ED.

)
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

Create a new workbook

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.

1. Click File, and then click New.

2. Under New, click the Blank workbook.

Enter your data

1. Click an empty cell.

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. Type text or a number in the cell.

3. Press Enter or Tab to move to the next cell.

Apply cell borders


1. Select the cell or range of cells that you want to add a border to.

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.

Use AutoSum to add your data

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.

Create a simple formula

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.

1. Pick a cell, and then type an equal sign (=).

That tells Excel that this cell will contain a formula.

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.

For example, enter =2+4, =4-2, =2*4, or =4/2.

3. Press Enter.

This runs the calculation.

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.

1. Select the cells that have numbers you want to format.

2. Click the Home tab, and then click the arrow in the General box.

3. Pick a number format.


Put your data in a table

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.

4. Click the arrow in the table header of a column.

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

To quickly 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.

2. Select a single cell in the column on which you want to sort.

3. Click to perform an ascending sort (A to Z or smallest number to largest).

4. Click to perform a descending sort (Z to A or largest number to smallest).

To sort by specific criteria

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.

3. The Sort dialog box appears.

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).

Filter your data

1. Select the data that you want to filter.

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.

If you’ve saved your work before, you’re done.

2. If this is the first time you've save this file:

a. Under Save As, pick where to save your workbook, and then browse to a folder.

b. In the File name box, enter a name for your workbook.

c. Click Save.

Print your work


1. Click File, and then click Print, or press Ctrl+P.

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:

In Excel 2010/13 and more: Go to File –> Options.


In Excel 2007: Go to Menus –> Tools –> Excel Options.

1. Change the Default Font Type and Size

By default, Excel uses Calibri (body font) font size 11. you can change the default by following
these steps:

 In Excel Options, select General.

 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.

Here are the steps to do this:

 In Excel Options, select Save.

 In Save options, within ‘Save workbooks’ section, change the Save File format to Excel
97-2003 Workbook.

3. Change Calculation mode from Automatic to Manual

With automatic calculation, a recalculation is triggered whenever there is a change in a cell/value


that affects formulas (more so with volatile formulas). With worksheets that are loaded with a lot
of data and formulas, this recalculation can waste a lot of time (and most of the time it is
unnecessary) and make our workbooks slow.

To save time, you can change the calculation setting to manual. To do this:

 In Excel Options, select Formulas.

 In Formulas options, change calculation options to Manual.


Absolute and Relative cells

Cells in Excel have unique references, which is its location.

References are used in formulas to do calculations, and the fill function can be used to continue
formulas sidewards, downwards and upwards.

Excel has two types of references:

1. Relative references
2. Absolute references

Absolute reference is a choice we make. It is a command which tells Excel to lock a reference.

The dollar sign ($) is used to make references absolute.

Example of relative reference: A1

Example of absolute reference: $A$1

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 result is: D2(5):


Next, fill the range D2:D7:

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:

Absolute reference is when a reference has the dollar sign ($).

It locks a reference in the formula.

Add $ to the formula to use absolute references.

The dollar sign has three different states:

 Absolute for column and row. The reference is absolutely locked.


Example =$A$1
 Absolute for the column. The reference is locked to that column. The row remains relative.
Example =$A1
 Absolute for the row. The reference is locked to that row. The column remains relative.
Example =A$1

Let's have a look at an example helping the Pokemon trainers to calculate prices for Pokeballs

Type or copy the following data:

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

Help them to calculate the prices for the Pokeballs.

The price's reference is B11, we do not want the fill function to change this, so we lock it.

The reference is absolutely locked by using the formula $B$11.

How to do it, step by step:


1. Type C2(=)
2. Select B11
3. Type ($) before the B and 11 ($B$11)
4. Type (*)
5. Select B2
6. Hit enter
7. Auto fill C2:C7
Protecting and un-protecting worksheets and cells
When you create a spreadsheet, you may enter data or formulas that you do not want other users to
change. Protecting a cell or worksheet can be essential to maintaining the integrity of data and
formulas in a spreadsheet.

How to protect a cell

To protect a cell in Microsoft Excel, follow the steps below.

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.

2. Press Review Menu and click the Format Cells window.

3. In the Format Cells window, click the Protection tab.

4. Uncheck the box for the Locked option, then click OK.

5. In the worksheet, select the cell you want to lock and protect.

6. Open the Format Cells window again.

7. Click the Protection tab, check the box for the Locked option, then click OK.

8. In the menu bar, click the Review tab.

9. In the Protect group, click the Protect Sheet option.


10. The Protect Sheet window opens. Enter a password for unlocking the protected
cells in the Password to unprotect sheet text field.

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

To protect a worksheet in Microsoft Excel, follow the steps below.

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.

2. open the Format Cells window by clicking Review Menu

3. In the Format Cells window, click the Protection tab.

4. Make sure the box for the Locked option is checked. Click the box to check it if
it's not already checked.

5. In the menu bar, click the Review tab.

6. In the Protect group, click the Protect Sheet option.


7. The Protect Sheet window opens. Enter a password for unlocking the protected
cells in the Password to unprotect sheet text field.

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.

How to unprotect a cell or worksheet

To unprotect a cell or worksheet in Microsoft Excel, follow the steps below.

1. In the menu bar, click the Review tab.

2. In the Protect group, click the Unprotect Sheet option.

3. In the Unprotect Sheet sheet window that pops up, enter the password to unlock
the worksheet, then click OK.
Working with Formulas

Create a formula that refers to values in other cells

1. Select a cell.
2. Type the equal sign =.

Note: Formulas in Excel always begin with the equal sign.

3. Select a cell or type its address in the selected cell.

4. Enter an operator. For example, – for subtraction.


5. Select the next cell, or type its address in the selected cell.

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.

 To see a formula in the formula bar, select a cell.

Enter a formula that contains a built-in function

1. Select an empty cell.


2. Type an equal sign = and then type a function. For example, =SUM for getting the total sales.
3. Type an opening parenthesis (.
4. Select the range of cells, and then type a closing parenthesis).

5. Press Enter to get the result.

Writing conditional expressions and Logical Functions


If you want to perform a calculation when a cell contains a specific value you can create a
conditional formula.
A conditional formula returns one value if the condition is True and a different value if the
condition is False.
A conditional formula can be created in several different ways.
There are 3 useful functions that can be used to create conditional formulas.
The IF function can return a value based on whether a certain condition is True or False.

The IFS function can return a value based on multiple conditions.


The SWITCH function can return a value based on a list of exact matches.
Single Condition - IF Function
You can use any combination of cell references, operators, constants and even other functions to
create this logical test.
The following Operators can be used to generate True or False values.
These operators include: greater than (>), less than (<) and equal to (=).

Single Condition - NOT, AND and OR Functions

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.

Multiple Conditions - IFS Function


The IFS function can return a value based on multiple conditions.
If you want to perform multiple conditions, instead of using nested IF functions you could use
the IFS function.

Multiple Conditions - SWITCH Function

The SWITCH function can return a value based on a list of exact matches.

Lookup and Reference Functions

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.

1. Insert the VLOOKUP function shown below.


Explanation: the VLOOKUP function looks for the ID (104) in the leftmost column of the range $E$4:$G$7 and
returns the value in the same row from the third column (third argument is set to 3). The fourth argument is set
to FALSE to return an exact match or a #N/A error if not found.

2. Drag the VLOOKUP function in cell B2 down to cell B11.

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.

The INDEX function below returns a specific value in a one-dimensional range.

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.

Explanation: Boat found at position 3.


VLOOKUP WITH EXACT MATCH, APPROXIMATE MATCH

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:

=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])

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:

1. FALSE to search for an exact match


2. TRUE to find an approximate match.
TRUE is the default value if no specific instruction is given.

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)

What is approximate match in VLOOKUP and how to use it

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.

Nested VlookUP with Exact Match


Let us say, for example, I have a spreadsheet where I have two separate tables. The first table lists all
the book names along with their corresponding IDs. The second table lists the price of each book
ID. to find the price of a certain book based on its name, you can use two separate VLOOKUP
formulas as shown below:
All you have to do is nest the first VLOOKUP formula inside the input of the second VLOOKUP
formula.
It will look something like this:

VlookUP with Tables, Dynamic Ranges


While using the VLOOKUP function in Excel, sometimes we need to lookup multiple tables. In order
to create the dynamic VLOOKUP formula, we will nest the INDIRECT function inside of a
VLOOKUP function to dynamically reference multiple tables within the lookup formula. In this
tutorial, we will see how to create a dynamic lookup table with INDIRECT function.
Syntax of the INDIRECT and VLOOKUP formula
The generic formula for creating a dynamic lookup table:
=VLOOKUP(lookup_value, INDIRECT(text), 2, 0)

The components of the formula are:


 INDIRECT – by this Excel function we can reference the specific sheet and the cell range
where we want to summarize the data
 VLOOKUP – =VLOOKUP(lookup_value, table_array, col_index_num, range_lookup)
The parameters of the VLOOKUP function are:
lookup_value – a value that we want to find in the VLOOKUP table
table_array – a range in which we want to lookup
col_index_num – a column number from which we would like to pull a value
range_lookup – default value 0. This means that we want to find an exact match for a lookup
value.
1. Named range – a range of values which we want to sum
Setting up Our Data

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.

Application of the modified VLOOKUP formula with the INDIRECT function


The formula looks like:
=VLOOKUP(F4, INDIRECT(E4), 2, 0)
 In our example, the lookup_value is the cell F4. The parameter table_array.
 The parameter table_array is the result of INDIRECT(E4) function.
 Col_index_numhas value 2, as we want to pull value from the second column of the range.
 Finally, range_lookup has value 0, because we want to find an exact match of “Lookup
column” values.
To apply the VLOOKUP with dynamic tables, we need to follow these steps:
 Define named ranges for the tables
 Select cell G4 and click on it
 Insert the formula: =VLOOKUP(F4, INDIRECT(E4), 2, 0)
 Press enter
The INDIRECT(E4) function returns “Table1”, which will be table_array parameter in the
VLOOKUP function. This means that we want to find Product B (F4) in Table1 (B3:C6). The value
of the Product description for 1002 in Table1 is Product B, which is the result of the function in the
cell G4.
Using VLookUP to consolidate Data from Multiple Sheets
Now, we have divided the data into multiple worksheets.
#1 – DOJ Worksheet

#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

You might also like