Advanced Excel - Unit I
Advanced Excel - Unit I
UNIT I
Basics of Excel
Microsoft Excel is a versatile spreadsheet program widely used for organizing, analyzing, and storing data. It allows users to
work with data through formulas, functions, and visualizations. The basic components include workbooks, worksheets, rows,
columns, and cells. Each worksheet is organized in a grid structure, enabling data to be entered in rows (horizontal) and
columns (vertical).
Key Features:
•Data Types: Text, Numbers, Dates, and Formulas.
•Basic Operations: Addition (=A1+B1), Multiplication (=A1*B1), and Sum (=SUM(A1:A10)).
•Formatting: Adjust fonts, alignment, borders, and colors for better data representation.
A B C
10 20 =A1+B1 → 30
15 25 =A2+B2 → 40
Customizing Common Options in Excel
Excel provides customization options to enhance user experience. These are accessible via File > Options.
Key Customizations:
Quick Access Toolbar: Add commands like Save, Undo, and Redo for quick access.
Default Save Location: Specify the folder where files are saved.
Font and Size: Set default font and size for all new workbooks.
AutoRecover: Automatically save changes at specified intervals.
.
Customization Purpose Example
AutoRecover Prevent Data Loss Saves every 5 minutes
Quick Access ToolBar Add Commonly used Save, Undo and Redo
Commands
Default Save Location Prevent Data Loss Saves every 5 minutes
Absolute and Relative References
Cell references in Excel play a critical role in formulas and calculations. They define the cells that a formula uses as inputs.
Excel allows you to use relative references, absolute references depending on how you want the formula to behave when
copied to other cells.
Relative References
A relative reference automatically adjusts when the formula is copied to another cell. It is the default behavior in Excel.
Example: If cell C1 has the formula =A1+B1 and you copy it to C2, the formula automatically changes to =A2+B2.
. A B C(FORMULA) D(RESULT)
10 20 =A1+B1 30
15 25 =A1+B1 40
Explanation:
When the formula =A1+B1 is copied down, Excel adjusts the references to use the values in the new row. This is useful for repetitive
calculations.
Absolute References
An absolute reference remains fixed, even when the formula is copied to another cell. To create an
absolute reference, use a dollar sign ($) before the column letter and row number (e.g., $A$1).
Example:
If C1 has the formula =$A$1+B1, copying it to C2 does not change $A$1. It always refers to cell A1.
.
A B C(FORMULA) D(RESULT)
10 20 =$A$1+B1 30
15 25 =$A$1+B1 35
Explanation:
The $A$1 reference remains constant, while the reference to B1 changes based on the row.
10 20 30
15 25 35
Protecting and UnProtecting WorkSheets and Cells
Excel allows you to protect worksheets or specific cells to prevent unauthorized cells.
Steps to Protect a Worksheet:
1. Go to Review > Protect Sheet.
2. Set a password.
3. Select allowed actions (e.g., selecting cells).
.
Working with Functions
Functions are predefined formulas that perform specific calculations.
Common Functions:
• SUM: Adds values (=SUM(A1:A5)).
• AVERAGE: Calculates the mean (=AVERAGE(A1:A5)).
• COUNT: Counts numeric entries (=COUNT(A1:A10)).
• NOW: Returns the current date and time (=NOW()).
A B
10 60
10 =SUM( A1:A3) -> 60 20 20
30
20 =AVERAGE(A1:A3) -> 20
30
Writing Conditional Expressions
Conditional expressions use logical checks to return different results based on conditions.
IF Function:
• Syntax: =IF(condition, value_if_true, value_if_false).
• Example: =IF(A1>50, "Pass", "Fail").
A B
1 80 =IF(A1>50, “Pass”, “Fail”) -> Pass
2
40 =IF(A2>50, “Pass”, “Fail”) -> Fail
Logical Functions
Logical functions evaluate conditions and return TRUE or FALSE.
Functions:
•AND: Returns TRUE if all conditions are met.
•OR: Returns TRUE if any condition is met.
•NOT: Reverses a logical value.
A B Formula Result
15 25 =AND(A1>10, B1<30) TRUE
5 35 =OR(A2>10, B2<30) FALSE
50 =NOT(A3>100) TRUE
15 25 TRUE
5 35 FALSE
50 TRUE
LookUp and Reference Functions:
Lookup and reference functions help retrieve data from a specific location in a range, table, or
worksheet. These functions are essential for managing large datasets efficiently.
1. VLOOKUP
The VLOOKUP function searches for a value in the first column of a table and returns a value in the
same row from another column.
Syntax: =VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])
Argument Description
Formula:
=HLOOKUP("Price", A1:C2, 2, FALSE) → 100
3. MATCH
The MATCH function returns the relative position of a value in a row or column.
5 2
Syntax: 10
15
=MATCH(lookup_value, lookup_array, [match_type]) 20
Argument Description
lookup_value The value to search for.
lookup_array The range to search in.
match_type 1 for less than, 0 for exact match, -1 for greater than.
Formula: =INDEX(A1:B3, 2, 2)
Result : Jane
101 John Jane
102 Jane
103 Sam
VLOOKUP WORKS ACROSS SHEETS
When using VLOOKUP across sheets, you must specify the sheet name as part of the table_array
argument in the formula. The syntax remains the same, but you include the sheet name followed by an
exclamation mark (!) before the range.
Syntax:
=VLOOKUP(lookup_value, 'SheetName'!table_array, col_index_num, [range_lookup])
lookup_value - The value to search for (e.g., employee ID or product code).
table_array - The range of data, specified with the sheet name.
col_index_num - The column number in the range from which to return the value.
range_lookup - TRUE for approximate match, FALSE for exact match.
Practical Steps for Consolidating Data
Step 1: Organize Data Across Sheets
Each sheet should contain structured data with a unique
identifier (e.g., Employee ID, Product Code) in the first column.
Example sheets:
Sheet1: Sales data
Sheet2: Employee data
Sheet3: Regional data
Step 2: Use VLOOKUP to Consolidate Data
Create a summary sheet that pulls relevant information from all
other sheets using VLOOKUP.
Examples of VLOOKUP Across Sheets
Example 1: Consolidating Employee Names from Multiple Sheets
Formula:
=VLOOKUP(VLOOKUP(A2, 'Table1'!A:B, 2, FALSE), 'Table2'!A:B, 2, FALSE)
First VLOOKUP: Finds Department Code for Employee ID.
Second VLOOKUP: Finds Department Name based on the code.
Result: "HR" for Employee ID 101.