Elective Data Analysis and Modeling

Data Analysis and ModelingUnit 28 min read

Spreadsheet Data Management: Tools, Functions & Workflows

Unit 2 of Data Analysis and Modeling explores spreadsheet fundamentals—data entry, formulas, functions, validation, and automation—using Excel/Google Sheets, with real-world applications in finance, logistics, and decision-making.

TAKEAWAYS:

  • Spreadsheets organize raw data into structured tables for analysis, using cells, ranges, and named references to simplify complex calculations.
  • Functions (e.g., SUM, VLOOKUP, IF) automate repetitive tasks, while data validation ensures accuracy in inputs.
  • PivotTables and charts transform raw data into actionable insights, enabling trend analysis and reporting.
  • Macros and VBA extend spreadsheet capabilities for custom workflows, though they require programming basics.
  • Real-world tools like eSewa’s transaction logs or Daraz’s inventory dashboards rely on these techniques for efficiency.
  • Exam focus: formula construction, logical errors, and interpreting outputs—always show step-by-step traces.

Core Concepts: The Spreadsheet Ecosystem

Spreadsheets are the backbone of data management. They combine:

  • Data storage (tables, lists, grids).
  • Computational logic (formulas, functions).
  • Visualization (charts, conditional formatting).

1. Structure: Cells, Ranges, and Workbooks

A spreadsheet is built on a grid of cells (e.g., A1, B2), grouped into ranges (e.g., A1:C10). Workbooks (.xlsx files) can hold multiple sheets (tabs).

Workbook (.xlsx)Sheet 1: Sales DataSheet 2: ExpensesCells (A1, B2, ...)Ranges (A1:C10)Formula (e.g., =SUM(B2:B10))
Workbook structure: sheets contain cells/ranges/formulas

Why it matters: Organizing data into sheets prevents clutter and enables cross-referencing. For example, Ncell’s monthly call-data sheet might link raw logs (Sheet 1) to billing summaries (Sheet 2).


2. Formulas and Functions: The Engine of Automation

Formulas perform calculations (e.g., =A1+B2), while functions are pre-built operations (e.g., =SUM(A1:A10)).

=SUM(A1:A10)0=AVERAGE(B1:B5)1=IF(C1>50, "Pass", "Fail")2
Common Excel formula examples

Key Function Categories:

Category Example Functions Use Case
Math/Trig SUM, AVERAGE, ROUND Calculating totals, averages.
Logical IF, AND, OR Conditional checks (e.g., discounts).
Lookup/Reference VLOOKUP, HLOOKUP, INDEX-MATCH Fetching data from tables.
Text CONCATENATE, LEFT, SUBSTITUTE Cleaning or combining text.
Date/Time TODAY, DATEDIF, NOW Tracking deadlines or durations.

Worked Example: eSewa Transaction Validation Suppose eSewa’s spreadsheet tracks payments with columns:

Invoice# Amount (NPR) Status
INV001 500 Paid
INV002 1200 Pending

To flag pending payments over 1000 NPR:

=IF(AND(B2>1000, C2="Pending"), "URGENT", "OK")

Output:

Invoice# Amount Status Alert
INV001 500 Paid OK
INV002 1200 Pending URGENT

3. Data Validation: Keeping Inputs Clean

Prevent errors by restricting cell inputs. For example:

  • Dropdown lists: Limit order statuses to "Pending," "Shipped," or "Delivered" (used by Daraz’s order-tracking system).
  • Custom rules: Ensure numeric entries (e.g., age ≥ 18).

How to apply:

  1. Select a cell/range → Data → Data Validation.
  2. Choose List and enter options (e.g., Pending, Shipped, Delivered).
  3. Set error alerts (e.g., "Invalid status!").

4. PivotTables: Turning Data into Insights

PivotTables summarize large datasets. Steps:

  1. Select data → Insert → PivotTable.
  2. Drag fields to Rows, Columns, or Values areas.

Example: NTC’s Monthly Revenue by Region

Region Revenue (NPR)
Kathmandu 5,000,000
Pokhara 3,000,000
Total 8,000,000

Visualization:

Kathmandu (63%)Pokhara (38%)
NTC Revenue by Region (Kathmandu: 62.5%, Pokhara: 37.5%)

5. Charts: Storytelling with Data

Charts visualize trends. Common types:

  • Column/Bar: Compare categories (e.g., Pathao’s monthly rides).
  • Line: Show trends over time (e.g., NEPSE index).
  • Pie: Proportions (e.g., Khalti’s payment methods).

Worked Example: Daraz’s Sales Growth

Month Sales (Units)
Jan 2023 500
Feb 2023 700
Mar 2023 900

Chart:

0225450675900Jan 2023500Feb 2023700Mar 2023900Units Sold
Monthly sales growth (Jan-Mar 2023)

Insight: Sales grew by 40% in 3 months—ideal for marketing reports.


6. Automation: Macros and VBA

For repetitive tasks, use macros (recorded steps) or VBA (custom scripts). Example: Auto-generate invoices for Khalti’s merchants.

Sub GenerateInvoice()
    Range("A1").Value = "Invoice #" & Format(Now(), "yyyymmdd") & "001"
    ' Add more logic (e.g., pull customer data)
End Sub

Note: Macros require enabling Developer tab in Excel.


7. Real-World Applications

eSewa: Transaction Auditing

  • Tool: Spreadsheets track payments, taxes, and refunds.
  • Key Function: VLOOKUP to match invoices with bank records.
  • Output: Automated compliance reports for the government.

Daraz: Inventory Management

  • Tool: PivotTables summarize stock levels by category.
  • Key Function: IF(Stock<Reorder_Threshold, "Reorder", "OK").
  • Output: Alerts for low-stock items.

Ncell: Customer Churn Analysis

  • Tool: Charts plot call-drop rates by region.
  • Key Function: AVERAGE(Daily_Drops).
  • Output: Targets for network upgrades.

8. Common Pitfalls and Fixes

Issue Cause Solution
#DIV/0! Division by zero. Use IFERROR(A1/B1, "N/A").
#REF! Invalid cell reference. Check VLOOKUP range or deleted rows.
Circular references Formula loops (e.g., A1=B1+B2, B1=A1). Enable Formula Auditing → Trace Precedents.
Circular ReferenceFormula ErrorData Mismatch
Common spreadsheet error relationships

9. Exam Tip: How to Score Full Marks

  1. Show your work: For formulas, write intermediate steps (e.g., =SUM(A1:A10) → =500+300+...).
  2. Label outputs: Use headers like "Total Revenue" or "Pending Orders."
  3. Use real data: Tie examples to Nepalese contexts (e.g., NTC’s revenue, Khalti’s transactions).
  4. PivotTables: Always describe rows, columns, and values axes.
  5. Error handling: Mention IFERROR or data validation in answers.

Sample Exam Question: "Create a spreadsheet to track Pathao’s monthly rides. Use functions to calculate total rides and average per driver. Flag drivers with <50 rides/month as ‘Low Activity.’" Answer Structure:

  1. Table Design: Columns for DriverID, Rides, Month.
  2. Formulas:
    • Total rides: =SUM(B2:B100).
    • Average: =AVERAGE(B2:B100).
    • Flag: =IF(B2<50, "Low Activity", "OK").
  3. Chart: Bar graph of rides by driver.

Based on the PU BBA (PU) syllabus for Data Analysis and Modeling, unit 2.

Discussion

Loading…