Module 3
Module 3
MS EXCEL
1. Interface:
• Workbook: The main file you work with, which contains one or more worksheets.
• Worksheet: A single sheet within a workbook, consisting of a grid of cells organized into rows
and columns.
• Cells: The basic unit where data is entered. Each cell is identified by a unique address (e.g., A1,
B2).
2. Key Features:
• Formulas and Functions: Excel allows for calculations and data analysis using built-in functions
(e.g., SUM, AVERAGE) and custom formulas.
• Data Organization: Users can sort, filter, and format data to make it easier to analyze and
interpret.
• Charts and Graphs: Visual representations of data such as bar charts, line graphs, and pie charts.
• Data Analysis Tools: Features like PivotTables and PivotCharts for summarizing and analyzing
complex datasets.
• Conditional Formatting: Allows cells to be formatted based on their content, making patterns
and trends easier to spot.
3. Data Management:
• Data Validation: Ensures that data entered into cells meets specific criteria.
• Data Import and Export: Users can import data from various sources and export data to
different file formats (e.g., CSV, PDF).
4. Advanced Features:
• Macros and VBA: Automate repetitive tasks using recorded macros or write custom scripts in
VBA (Visual Basic for Applications).
• Power Query: For advanced data extraction, transformation, and loading (ETL) tasks.
• Power Pivot: For creating sophisticated data models and performing complex calculations.
• Shared Workbooks: Multiple users can work on the same workbook simultaneously.
Steps:
Steps:
1. Enter a Date:
o Click on the cell where you want to enter the date.
o Type the date in a recognizable format (e.g., MM/DD/YYYY or DD/MM/YYYY).
o Press Enter. Excel will automatically format the cell as a date.
2. Enter a Time:
o Click on the cell where you want to enter the time.
o Type the time in a format like HH:MM AM/PM or HH:MM.
o Press Enter. Excel will format the cell as a time.
Steps:
Steps:
Steps:
1. Select Cells:
o Click and drag to select the cell or range of
cells you want to format.
2. Open Format Dialog:
o Right-click on the selected cells and choose
Format Cells, or use the Home tab options.
3. Apply Formatting:
o In the Format Cells dialog, choose from
options like Number, Alignment, Font,
Border, and Fill.
o Make the desired changes and click OK.
Steps:
1. Select Cells:
o Click and drag to select the cells where you
want to align text.
2. Use Alignment Options:
o Go to the Home tab.
o Use the alignment buttons to choose
horizontal alignment (Left, Center, Right)
and vertical alignment (Top, Middle,
Bottom).
Steps:
1. Select Cells:
o Click and drag to select the cells
with text you want to wrap.
2. Enable Wrap Text:
o Go to the Home tab.
o Click on Wrap Text. Text will now
appear on multiple lines within the
cell if it exceeds the cell width.
Steps:
1. Select Cells:
o Click and drag to select the cells
you want to merge.
2. Merge Cells:
o Go to the Home tab.
o Click on Merge & Center, or use the
dropdown to select Merge Across
or Merge Cells based on your need.
Steps:
Steps:
Steps:
Steps:
Steps:
1. Select Cells:
o Click and drag to select the cells
where you want to apply
number formats.
2. Open Format Cells Dialog:
o Right-click on the selected cells
and choose Format Cells, or use
the options in the Home tab.
3. Choose Number Format:
o In the Format Cells dialog, go to
the Number tab.
o Choose from formats like
General, Number, Currency,
Date, Time, Percentage, etc.
o Adjust specific settings as
needed (e.g., decimal places,
currency symbols).
o Click OK to apply.
Sorting Data:
• Purpose: Sorting organizes data in a specified order, either alphabetically (A-Z or Z-A),
numerically (smallest to largest or largest to smallest), or by date.
• How to Sort:
o Select a column and use the "Sort A to Z" or "Sort Z to A" options in the "Data" tab.
o For multi-level sorting, use the "Sort" option to sort by multiple columns or custom
criteria.
Filtering Data:
• Purpose: Filtering allows you to display only the rows that meet certain criteria, making it easier
to focus on specific data subsets.
• How to Filter:
o Enable filters by selecting your data range and clicking "Filter" in the "Data" tab.
o Click the filter arrow in the column header to choose criteria, such as specific values, text,
or date ranges.
o You can clear or remove filters to view all data again.
a. Finding Data:
b. Replacing Data:
Steps:
Steps:
Custom Sort:
Steps:
The result will show only the rows where the Product is "Laptop":
You want to view only the sales records where the Sales amount is greater than 3000.
Steps:
The result will show rows where the Sales are greater than 3000:
Scenario 3: Filter by Multiple Criteria (Sales > 3000 AND Product = "Phone")
You want to view only the sales records for Phones where the Sales are greater than 3000.
Steps:
• Easy data analysis: Allows you to focus on specific information without modifying or
deleting other data.
• Custom filtering options: Can combine filters (e.g., by text, number, date) for more precise
data analysis.
• Efficient management: Makes large datasets manageable by hiding unnecessary
information.
Steps:
Purpose: Allows you to filter data based on complex criteria, including multiple conditions and
criteria across multiple columns. It can also be used to extract data to a different location.
The Advanced Filter in Excel allows you to filter data based on complex criteria and copy the
filtered data to another location. Unlike the basic filter, it gives you more control, such as filtering
by multiple conditions or criteria across multiple columns.
Example
Scenario:
Criteria Range:
Product Sales
Laptop >3000
Phone >3000
Steps:
1. Scenario Manager
2. Goal Seek
3. Data Table
Let's create a simple monthly budget with categories like Rent, Groceries, Utilities,
Entertainment, and Savings.
Scenario Manager:
Goal Seek
Example:
• You’ve taken 4 tests and received the following scores: 75, 80, 85, and 90.
• You need an average of 80 across all 5 tests to pass the course.
(Replace Test1, Test2, etc., with the actual cell references where the scores are located.)
Example Outcome:
• Goal Seek might show that you need to score 70 on the last test to achieve the average of 80
across all 5 tests.
Data Table
• Interest Rate: 5%
• Loan Term: 10 years
• Loan Amount: $50,000
• Monthly Payment formula: =PMT(B1/12, B2*12, -B3)
Goal:
You want to calculate how the monthly payment changes if the interest rate changes.
You’ll have the input data (Interest Rate, Loan Term, Loan Amount) and the formula for
Monthly Payment, as follows:
Category Value
Interest Rate (%) 5
Loan Term (Years) 10
Loan Amount ($) 50,000
Monthly Payment =PMT(B1/12, B2*12, -B3)
In this formula:
Below the table, create a list of different interest rates you want to analyze, for example:
Interest Rate
3%
4%
5% (current)
6%
Example Outcome:
Your table might look like this after running the Data Table:
• Data Tables allow you to quickly see how different inputs (like interest rates) affect the
outcome (monthly payments).
• You can explore multiple scenarios at once, without manually changing values one by one.
Purpose:
• Highlight cells based on specific criteria (e.g., values greater than a threshold, duplicate
entries, etc.).
c. Managing Rules:
• Access "Manage Rules" under Conditional Formatting to edit or remove existing rules.
Steps:
Result:
The cells in the Sales column with values greater than 4000 will be highlighted. In this case:
You can also use a Color Scale to visualize data. For example, you might want higher sales figures
to have a darker color, and lower sales to be lighter.
Steps:
Result:
The Sales column will have cells shaded from green (higher sales) to red (lower sales), giving a
visual representation of the data distribution.
The 5000 value will be green, 2500 will be red, and other values will be shaded proportionally in
between.
Result:
• Data Visualization: Makes it easy to spot trends, outliers, or patterns in large datasets.
• Customization: You can set a wide variety of conditions and apply different formatting
styles (colors, font styles, icons, data bars).
• Efficiency: Quickly apply rules to large data sets without manual editing.
• This type of conditional formatting highlights cells based on specific rules or comparisons.
• Examples:
o Greater than/Less than: Highlights cells with values greater or less than a specified
number.
o Between: Highlights cells that fall between two specified values.
o Equal to: Highlights cells that match a specific value.
o Text that Contains: Highlights cells containing specific text.
o A Date Occurring: Highlights cells that contain a specific date (e.g., yesterday,
today, last week).
o Duplicate Values: Highlights duplicate or unique values.
2. Top/Bottom Rules
• This type highlights cells based on their ranking within the data.
3. Data Bars
• Data Bars visually represent the value in each cell by shading the cell with a bar
proportional to the value’s magnitude. Higher values have longer bars, while lower values
have shorter bars.
• Can be applied with Gradient Fill or Solid Fill.
4. Color Scales
• Color Scales use a color gradient to visually represent the range of values in a dataset. Each
cell is colored based on its value relative to others.
• Two-Color Scale: Colors blend between two shades based on the value’s position between
the lowest and highest.
• Three-Color Scale: Colors blend between three shades (e.g., green for low values, yellow
for mid-range values, and red for high values).
5. Icon Sets
• Icon Sets apply icons (e.g., arrows, flags, circles, stars) to cells based on their values. Icons
provide a quick, visual way to compare data.
• Types:
o Directional Icons (e.g., up, down, and sideways arrows).
o Shape Icons (e.g., circles or squares of different colors).
o Rating Icons (e.g., stars, flags, or traffic lights).
o You can use 3 to 5 icons to represent different data ranges.
• You can create custom rules by writing your own formulas that return TRUE or FALSE. Cells
meeting the condition (where the formula returns TRUE) will be formatted.
• Example: Highlight rows where sales exceed 1000 and product category equals
“Electronics”:
=AND(A2>1000, B2="Electronics")
• You can apply formatting to one set of cells based on the values in another set of cells.
• Example: If you want to highlight a row if the value in column C is greater than 500, you
would apply a rule that checks the condition in column C but applies formatting to the entire
row.
9. Errors
Purpose:
Steps:
c. Analyzing Data:
• Use the PivotTable to drill down into data by rearranging fields or applying filters to analyze
specific aspects.
Scenario:
You want to analyze the total sales per product and region.
Optionally, you could drag Salesperson to the Rows area below Product if you want to
analyze sales by both product and salesperson.
4. Resulting PivotTable:
Explanation:
• Rows (Product): The products (Laptop, Phone, Tablet) are listed as rows.
• Columns (Region): The regions (East, West) are listed as columns.
Customization Options:
Example:
Benefits of PivotTables:
• Quick Data Analysis: PivotTables let you summarize large amounts of data in just a few
clicks.
• Customizable: You can drag and drop fields to organize the table in various ways and
choose different calculations (sum, count, average, etc.).
• Interactive: You can add filters, group data, and refresh the table when new data is added.
3.3 Overview
Formulas:
• Purpose: Formulas are expressions that perform calculations on data in your worksheet,
allowing you to compute values based on cell references.
• How to Use:
o Start a formula with an = sign, followed by your expression (e.g., =A1 + B1).
Functions:
• Purpose: Functions are predefined formulas in Excel that perform specific calculations, like
summing, averaging, or finding maximum/minimum values.
• How to Use:
o Start with = followed by the function name and arguments in parentheses (e.g.,
=SUM(A1:A10)).
o Common functions include SUM, AVERAGE, IF, VLOOKUP, and COUNT.
Components of a Formula:
Functions simplify complex calculations by using predefined formulas for common tasks like
summing, counting, or rounding numbers.
b. Using Functions:
c. Accessing Functions:
• The Function Library provides access to all Excel functions categorized by their purpose (e.g.,
Math & Trig, Statistical, Logical, Text).
b. How to Use:
• Example: In =A1 + B1, copying this formula down one row changes it to =A2 + B2.
c. Mixed References:
1) INT:
Purpose: Rounds a number down to the nearest integer.
Syntax: =INT(number)
Example: =INT(4.7) returns 4.
2) ROUND:
Purpose: Rounds a number to a specified number of digits.
Syntax: =ROUND(number, num_digits)
Example: =ROUND(3.14159, 2) returns 3.14.
3) SUM:
Purpose: Adds up a range of numbers.
Syntax: =SUM(range)
Example: =SUM(A1:A10) adds the numbers in cells A1 through A10.
4) SUMIF
Purpose: Adds the values in a range that meet a specified condition.
Syntax: =SUMIF(range, criteria, [sum_range])
Example: =SUMIF(A1:A10, ">50", B1:B10) returns the sum of the values in cells B1:B10 where
the corresponding cells in A1:A10 are greater than 50.
5) COUNT:
Purpose: Counts the number of cells that contain numbers.
Syntax: =COUNT(range)
Example: =COUNT(A1:A10) counts the numeric cells in A1 through A10.
6) COUNTIF:
1. INT:
• Formula: =INT(C2)
• Example: For John (Score 85.5), =INT(C2) will return 85, rounding the score down to the
nearest integer.
2. ROUND:
• Formula: =ROUND(C3, 1)
• Example: For Alice (Score 72.345), =ROUND(C3, 1) will round the score to one decimal,
returning 72.3.
3. SUM:
• Formula: =SUM(D2:D8)
• Example: Adds all the loan amounts, returning the total sum of loans: 10000 + 15000 +
5000 + 25000 + 20000 + 18000 + 30000 = 123000.
4. SUMIF:
5. COUNT:
• Formula: =COUNT(B2:B8)
• Example: Counts the number of numeric entries in the "Age" column. The result is 7.
6. COUNTIF:
7. COUNTA:
• Formula: =COUNTA(A2:A8)
• Example: Counts the number of non-empty cells in the "Name" column. The result is 7.
8. COUNTBLANK:
• Formula: =COUNTBLANK(A2:A8)
• Example: Counts the number of empty cells in the "Name" column. In this case, the result is
0.
9. IF:
10. AND:
11. OR:
12. VLOOKUP:
13. CONCATENATE:
14. AVERAGE:
• Formula: =AVERAGE(C2:C8)
• Example: Averages the scores. The result is (85.5 + 72.345 + 92.1 + 67.9 + 89.4 +
75.2 + 91) / 7 = 81.92.
16. SORT:
1) MIN:
=MIN(range)
2) MAX:
=MAX(range)
3) LEN:
=LEN(text)
4) LEFT:
=LEFT(text, num_chars)
5) RIGHT:
=RIGHT(text, num_chars)
6) PROPER:
=PROPER(text)
7) TRIM:
=TRIM(text)
8) IFERROR:
=IFERROR(value, value_if_error)
9) INDEX:
=INDEX(array, row_num, [col_num])
10) MATCH:
=MATCH(lookup_value, lookup_array, [match_type])
11) SUBTOTAL:
=SUBTOTAL(function_num, range)
12) TEXT:
=TEXT(value, format_text)
13) PMT:
=PMT(rate, nper, pv, [fv], [type])
14) HLOOKUP:
=HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup])
15) NOW:
=NOW()
----------------------------------------------------------------------------------
1. Ease of Use SUMIF/COUNTIF are easy to use Manual calculations are more labor-
for single-condition tasks, requiring intensive and require setting up custom
minimal effort and no need for logic, making them more complex for the
complex formulas. user.
2. Speed for Built-in functions quickly calculate SUMIF/COUNTIF have limited flexibility and
Simple results, especially for basic may not work well for multi-conditional or
Calculations summing and counting with a non-standard scenarios, requiring manual
single condition. formulas or more advanced functions like
SUMIFS/COUNTIFS.
4. Performance May perform well for small-to- Can slow down with large datasets due to
with Large Data medium-sized datasets, offering a automatic re-evaluation of dynamic ranges,
straightforward solution for affecting overall workbook performance.
conditional calculations.
5. Formula Built-in functions hide the Lack of transparency can make it difficult for
Transparency complexity behind the formula, others to understand or trace how the result
simplifying how the results are was achieved. Manual calculations, on the
obtained. other hand, lay out each step explicitly.
6. Error Handling SUMIF/COUNTIF functions handle Built-in functions might not manage errors
errors automatically for many like #N/A, #DIV/0!, or empty cells effectively,
standard cases. whereas manual calculations can
incorporate more detailed error handling
using functions like IFERROR.
7. Customization Built-in functions are great for Manual calculations offer more flexibility
and Flexibility straightforward conditional and customization, as they can be tailored to
calculations. complex conditions and allow for multi-step
processes.
Data types
1) Text (String): Used for storing alphanumeric characters. It can include letters, numbers,
symbols, and spaces. Text is aligned to the left of the cell by default.
3) Date and Time: Special data types used to represent dates and times. Excel stores dates as
sequential numbers (called serial numbers) and times as decimal fractions.
4) Boolean (Logical): Represents TRUE or FALSE values, which are typically the result of
logical expressions.
5) Error: When a formula or operation fails, Excel displays an error value. These errors include:
6) Currency: A specialized number format for monetary values. Excel formats currency with a
currency symbol and two decimal places.
9) Scientific (Exponential): Used for very large or very small numbers, Excel displays them in
scientific notation.
Data Validation
Data Validation in Excel is a feature that helps control the type of data or the values users can
enter into a cell. It improves data accuracy and consistency by preventing invalid data entry.
• Allows users to enter only whole numbers within a specified range or meeting certain
criteria.
• Example: Only allow values between 1 and 100.
b) Decimal
• Allows users to enter decimal numbers within a specified range or with certain conditions.
• Example: Only allow values between 0.5 and 5.0.
c) List
d) Date
e) Time
f) Text Length
g) Custom
• Allows you to create custom data validation rules using formulas. This is useful when
predefined options don’t meet your needs.
• Example: Only allow entries where the sum of values in cells A1 and B1 is less than 100.
1. Select the Cells: Choose the cells where you want to apply data validation.
2. Open the Data Validation Dialog Box:
o Go to the Data tab on the ribbon.
o Click Data Validation > Data Validation.
3. Set the Validation Criteria:
=COUNTIF(A:A, A1) = 1
• Ensures Data Consistency: Prevents incorrect or out-of-range data from being entered,
improving the accuracy of data analysis.
• Increases Efficiency: Reduces the need for manual data correction and improves data entry
speed by guiding users.
• Improves User Experience: Provides helpful messages and alerts to guide users in entering
valid data.
• To edit: Select the cells with data validation, then go to Data Validation in the Data tab and
change the criteria.
• To remove: Select the cells, open Data Validation, and click Clear All.
• You can extend validation across multiple sheets by applying the same rules to different
ranges, helping to maintain consistency in large workbooks.
3.4 Overview
Purpose: Charts visually represent worksheet data, making it easier to analyze trends, patterns,
and comparisons.
1. Select Data:
o Highlight the data range you want to include in the chart.
2. Insert Chart:
o Go to the "Insert" tab on the ribbon.
o Choose the type of chart you want (e.g., Column, Line, Pie, Bar).
3. Customize Chart:
o Use the Chart Tools to modify the design, layout, and format of your chart.
o Add titles, labels, and adjust colors as needed.
Purpose:
Example :
Task:
You want to plot a chart for Sales A and Sales C, ignoring Sales B.
Explanation:
In this example, the chart will plot the data for "Sales A" and "Sales C" while skipping "Sales B." By
using the Ctrl/Command key, you can select non-adjacent cells and include only the data you want
in the chart.
Purpose:
• Choose a chart type that best represents your data (e.g., Column, Line, Pie, Bar, etc.).
Purpose:
Purpose:
Purpose:
Purpose:
Purpose: