BCA101 Computer Fundamentals and Applications

Computer Fundamentals and ApplicationsUnit 712 min read

Excel Spreadsheets: Formulas, Functions & Data Analysis

Unit 7 of Computer Fundamentals and Applications covers Excel’s core tools—formulas, functions, conditional logic, data validation, and charting—with real-world examples from Nepalese businesses (e.g., salary calculations for Ncell employees, Daraz order tracking) and global apps (Google Sheets for collaborative budget


Core Concepts of Excel Spreadsheets

1. What is a Spreadsheet?

A spreadsheet is an electronic grid (rows × columns) used to:

  • Store structured data (text, numbers, dates).
  • Perform calculations automatically.
  • Generate reports/charts.
  • Analyze trends (e.g., sales, expenses, inventory).

Why Excel?

  • Automation: No manual recalculations (e.g., bank loan interest).
  • Collaboration: Shared workbooks (e.g., NEPSE stock analysts).
  • Visualization: Dashboards for decision-making (e.g., Daraz’s order status).

SpreadsheetWorkbookCells (A1, B2, etc.)GridFormulas/FunctionsCalculationsChartsVisualsData ToolsAnalysis
Excel spreadsheet structure: core components and their relationships

2. Excel Basics: Cells, Ranges, and References

Cell Addressing

  • Columns: A, B, C… Z, AA, AB (26 × 26 = 676 columns).
  • Rows: 1, 2, 3… 1,048,576.
  • Range: A1:D10 (cells A1 to D10).
Name0Salary1Bonus2
Excel table structure: rows and columns with sample data (HAT Company)

Example: In a Ncell employee salary sheet, B2 might store an employee’s salary, and C2 could calculate tax as =B2*0.13.

Relative vs. Absolute References

Type Symbol Example Use Case
Relative None =A1+B1 Copies formula down a column.
Absolute $ =A$1+B$1 Locks row/column (e.g., tax rate).

Worked Example: Calculate Net Salary for Ncell employees (Salary – Tax – Insurance). Assume:

  • Salary in column B, Tax Rate in D1 (13%), Insurance in D2 (5%).
  • Formula for Net Salary (E2):
    =B2 - (B2*$D$1) - (B2*$D$2)
    
    • Drag this down to apply to all rows.

stateDiagram-v2
    [*] --> CellSelected
    CellSelected --> FormulaEntered : Type "=B2*0.13"
    FormulaEntered --> Calculation : Press Enter
    Calculation --> ResultDisplayed : Shows 1300 (if B2=10000)
    ResultDisplayed --> [*]

3. Excel Formulas and Functions

A. Basic Formulas

Operation Symbol Example
Addition + =A1+B1
Subtraction - =C1-D1
Multiplication * =E1*0.13
Division / =F1/12

Example: Calculate monthly loan EMI for a bank loan.

  • Formula:
    =PMT(rate, nper, pv)
    
    • rate = Annual interest rate/12 (e.g., 5%/12).
    • nper = Total payments (e.g., 12*5 for 5 years).
    • pv = Loan amount (e.g., 500000).

B. Logical Functions

Function Syntax Example Use Case
IF =IF(test, true, false) =IF(B2>50000, "High", "Low") Classify salaries.
AND =AND(test1, test2) =AND(B2>10000, C2<20000) Check multiple conditions.
OR =OR(test1, test2) =OR(D2="Pass", D2="Recheck") Pass/fail grading.

Worked Example: For XYZ Company (from past exams), calculate Income Tax based on salary:

  • Tax Rules:
    • ≤10,000: 0%
    • 10,001–50,000: 10%
    • 50,000: 20%

  • Formula for Tax (D2):
    =IF(B2<=10000, 0, IF(B2<=50000, B2*0.1, B2*0.2))
    
  • Total (E2):
    =B2 + C2 + D2
    
  • Net Salary (F2):
    =B2 - E2
    

sequenceDiagram
    participant User
    participant Excel
    User->>Excel: Types =IF(B2>50000, B2*0.2, B2*0.1)
    Excel-->>User: Displays 2000 (if B2=100000)
    User->>Excel: Drags formula down
    Excel-->>User: Auto-fills D3:D100

C. Lookup and Reference Functions

Function Syntax Example Use Case
VLOOKUP =VLOOKUP(value, table, col) =VLOOKUP("Ram", A2:B10, 2) Find salary by name.
HLOOKUP =HLOOKUP(value, table, row) =HLOOKUP(2, A1:D1, 3) Find row-based data.
INDEX =INDEX(array, row, col) =INDEX(A2:B10, 3, 2) Flexible lookup.
MATCH =MATCH(value, array, match) =MATCH("High", C2:C10, 0) Find position of a value.

Worked Example: For HAT Company (past exam), find the Maximum Salary:

  • Formula:
    =MAX(D2:D4)
    
  • For Conditional Maximum (e.g., only for "Manager"):
    =MAXIFS(D2:D4, C2:C4, "Manager")
    

D. Text and Date Functions

Function Syntax Example Use Case
CONCATENATE =CONCATENATE(A1, " ", B1) =CONCATENATE("Mr.", A1) Combine names (e.g., "Mr. Ram").
LEFT/RIGHT =LEFT(A1, 3) =LEFT(B2, 2) Extract "KT" from "Kathmandu".
DATE =DATE(2023, 5, 15) =DATE(YEAR(TODAY()), 5, 15) Dynamic dates.
DATEDIF =DATEDIF(start, end, "Y") =DATEDIF(A1, B1, "Y") Calculate years between dates.
08162431CONCATENATE16 bitsLEFT/RIGHT8 bitsDATE8 bits
Common text/date functions with syntax examples

Example: Calculate days until deadline for a Daraz order:

=B2-TODAY()

(Where B2 is the order date.)


4. Data Analysis Tools

A. Sorting and Filtering

  • Sort: Data → Sort A to Z (e.g., sort Ncell employees by salary).
  • Filter: Click dropdown arrow in header → select values (e.g., filter "Engineer" roles).

Example: Filter HAT Company data to show only employees with Bonus > 1000.


123Raw DataFilter (Bonus > 1000)Filtered ListPivotTable
Data analysis workflow: Filter → PivotTable (HAT Company example)

B. PivotTables

Convert rows/columns of data into a summary report. Steps:

  1. Select data → Insert → PivotTable.
  2. Drag fields to Rows, Values, or Columns.
  3. Apply calculations (Sum, Average, Count).

Example: Summarize Daraz order data by region:

  • Rows: Region (e.g., Kathmandu, Pokhara).
  • Values: Sum of Orders.

Region (Kathmandu)Region (Pokhara)RowsSum of Orders (500)Count of Orders (120)ValuesPivotTable
PivotTable structure for Daraz order data by region

C. Data Validation

Restrict cell input to specific values (e.g., dropdown lists). Example: Limit salary grades to "Low", "Medium", "High":

  1. Select cell → Data → Data Validation.
  2. Choose List → enter values: Low,Medium,High.

5. Charts and Graphs

Visualize data for trends/patterns. Common Chart Types:

Chart Type Best For Example
Column Compare categories (e.g., sales by month). NEPSE stock prices.
Pie Show proportions (e.g., budget allocation). Daraz revenue sources.
Line Trends over time (e.g., traffic growth). Pathao ride demand.
Bar Compare discrete items (e.g., employee performance). Ncell customer complaints.

Example: Create a bar chart for XYZ Company salaries:

  1. Select data (A1:F3).
  2. Insert → Bar Chart.
  3. Customize titles/axes (e.g., "Salary Distribution").

012.52537.550Low (<20K)40Medium (20K-50K)50High (>50K)10
Salary distribution chart for XYZ Company (real data example)

6. Advanced Functions (Exam Focus)

Function Syntax Example Use Case
SUMIF =SUMIF(range, criteria, sum_range) =SUMIF(B2:B10, ">50000", B2:B10) Sum salaries >50K.
COUNTIF =COUNTIF(range, criteria) =COUNTIF(D2:D10, "Pass") Count passes in exams.
AVERAGEIF =AVERAGEIF(range, criteria, avg_range) =AVERAGEIF(B2:B10, "Kathmandu", C2:C10) Avg salary in Kathmandu.
INDEX+MATCH =INDEX(return_range, MATCH(lookup, lookup_range, 0)) =INDEX(B2:B10, MATCH("Ram", A2:A10, 0)) Safer than VLOOKUP.

Worked Example: For Places Production Achievement (past exam):

  1. Achievement (%):
    =C2/B2
    
  2. Grade:
    =IF(D2>=80, "A", IF(D2>=60, "B", "C"))
    
  3. Average Achievement:
    =AVERAGE(D2:D4)
    

In the Real World

Excel is everywhere in Nepal and globally. Here’s how businesses and apps use it:

  1. eSewa / Khalti (Digital Payments)

    • Idea Used: SUMIF and VLOOKUP.
    • How?
      • Transaction Logs: Sum daily payments per user (=SUMIF(UserID, "Ram", Amount)).
      • Fraud Detection: Lookup suspicious transactions (=VLOOKUP(TransactionID, Blacklist, 2)).
  2. Daraz / Pathao (Order Management)

    • Idea Used: IF + COUNTIF + PivotTables.
    • How?
      • Order Status: =IF(DeliveryTime<TODAY(), "Late", "On Time").
      • Driver Efficiency: Count completed orders per driver (=COUNTIF(DriverID, "Raju")).
      • Sales Dashboard: PivotTable to show top-selling products by region.
  3. NEPSE (Stock Market)

    • Idea Used: AVERAGEIF, DATEDIF, and Line Charts.
    • How?
      • Moving Averages: =AVERAGEIF(ClosePrice, "Last 30 Days") to smooth trends.
      • Volatility: =STDEV(PriceRange) to measure risk.
      • Trend Analysis: Line chart of closing prices over 1 year.
  4. Ncell / NTC (Customer Data)

    • Idea Used: INDEX+MATCH and Data Validation.
    • How?
      • Billing: Calculate monthly charges (=IF(Usage>GB, "Overage Fee", "Standard")).
      • Customer Segmentation: Dropdown lists for "New/Retained" status.
  5. Banks (Loan Processing)

    • Idea Used: PMT, DATEDIF, and IF for eligibility.
    • How?
      • EMI Calculation: =PMT(5%/12, 60, 500000) for a 5-year loan.
      • Early Repayment Penalty: =IF(DATEDIF(StartDate, Today, "M")<60, "Penalty", "None").


Exam Tip: How to Score Full Marks

  1. Formula Accuracy:

    • Always use absolute references ($) for fixed values (e.g., tax rates).
    • Example: =B2*$D$1 (not =B2*D1).
  2. Step-by-Step Logic:

    • Break complex problems into parts (e.g., first calculate tax, then total, then net salary).
    • Use comments (Ctrl+1) to explain steps in the exam.
  3. Real-World Tie-Ins:

    • Relate formulas to scenarios like salary sheets (Ncell), order tracking (Daraz), or loan calculations (banks).
    • Example: For IF questions, say:

      "This is like how eSewa applies different transaction fees for domestic vs. international payments."

  4. Chart Questions:

    • Describe the type of chart (e.g., "bar chart for comparing monthly sales").
    • Mention axes labels (e.g., "X-axis: Months, Y-axis: Revenue").
  5. Common Pitfalls:

    • #DIV/0!: Check for empty cells or division by zero.
    • #NAME?: Ensure function names are spelled correctly (e.g., SUMIFS vs. SUMIF).
    • Relative vs. Absolute: Drag formulas carefully to avoid copying errors.

Pro Tip:

  • Practice with past exam sheets (like the salary or production achievement questions).
  • Use F4 to toggle between relative/absolute references quickly.
  • Memorize shortcuts:
    • Ctrl+C / Ctrl+V: Copy/Paste.
    • Ctrl+Shift+L: Toggle filters.
    • Alt+E+S+V: Paste as Values (to remove formulas).

Based on the TU BCA syllabus for Computer Fundamentals and Applications (BCA101), unit 7.

Discussion

Loading…