Data Science — Excel as your first lab
Unit-I is data analysis with Excel: what analysis means, the process, and the core Excel toolkit — text functions, dates, conditional formatting, sorting, filtering and subtotals. Everything below is a live sandbox: change the input, watch Excel-style formulas fire.
01Types of Data Analysis
The same dataset can be read five different ways — depending on the question you ask.
Data mining
Find hidden patterns you didn't know to look for. E.g. market-basket: customers who buy diapers often buy beer.
Business intelligence
Dashboards & KPIs — what happened? Sales by region, live dashboards.
Statistical analysis
Describe and infer with statistics: mean, variance, hypothesis tests, confidence.
Predictive analysis
Forecast the future: regression, time-series, churn prediction from history.
Text analysis
Mine unstructured text: sentiment of tweets, topic extraction, spam filters.
Prescriptive*
What should we do? Optimization + simulation — "give me the best price to set".
02The Data-Analysis Process
Six stages, in order. Skimp on cleaning and every later step inherits the mess.
| Stage | What you do | Placement example |
|---|---|---|
| 1 Requirements | Define the question | "Does CGPA predict package?" |
| 2 Collection | Gather data | Survey forms from 300 students |
| 3 Processing | Organise, structure | One row per student, typed columns |
| 4 Cleaning | Fix errors & gaps | Blank CGPAs, "8.5+" text, duplicates |
| 5 Analysis | Explore & model | Correlation CGPA↔package |
| 6 Communication | Report insights | Chart + 1-page summary to management |
03Cleaning Text with Excel Functions
Real spreadsheets are full of messy text. These functions are the cleaning kit — type messy text, then fire a function and see the formula that Excel would run.
Cheat sheet
| Function | What it does |
|---|---|
| TRIM(text) | Removes extra spaces (keeps single spaces) |
| PROPER(text) | Capitalises the first letter of each word |
| UPPER / LOWER | All caps / all lowercase |
| SUBSTITUTE(text, old, new) | Replaces occurrences (e.g. "," → "") |
| LEFT(text,n) / RIGHT / MID(text,start,n) | Slice out substrings |
| FIND(find, text) | Position of a substring (returns number) |
| LEN(text) | Length in characters |
| CONCAT / & | Join text |
04Dates & Times in Excel
Excel stores dates as serial numbers (days since 1900-01-01) — that's why you can subtract dates. Times are fractions of a day: 6:00 AM = 0.25.
| Function | What it gives |
|---|---|
| TODAY() / NOW() | Today's date / date + time |
| DATEDIF(start, end, "y"/"ym"/"md") | Full years / months / days between |
| WEEKDAY(date, 1) | 1=Sunday … 7=Saturday |
| EOMONTH(date, 0) | Last day of that month |
| MOD(time, 1) | Wraps negative times (overnight hours) |
05Conditional Formatting
Formatting rules that react to the data: highlights, bars, color scales, top-n. Data patterns pop instantly.
=$B2>70 applied to range A2:F10.
The $B locks the column, the 2 varies per row — that mix is what makes the rule "travel" correctly.06Sorting & Filtering
Sorting rearranges the whole table by a key; filtering hides rows that fail a condition (it never deletes data).
07Subtotals — and why SUM ≠ SUBTOTAL
Subtotals group data and insert summary rows. The twist: =SUBTOTAL(9,…) skips hidden rows, while =SUM doesn't.
| Dept | Item | Qty | Sales ₹ |
|---|
08Formula Sheet & 5 Near-Certain Questions
| Task | Formula |
|---|---|
| Clean spaces | =TRIM(A2) |
| Title case | =PROPER(A2) |
| Strip commas | =SUBSTITUTE(A2,",","") |
| First word | =LEFT(A2, FIND(" ",A2)-1) |
| Email domain | =MID(A2, FIND("@",A2)+1, LEN(A2)) |
| Exact age | =DATEDIF(B2,TODAY(),"y") & "y " & DATEDIF(B2,TODAY(),"ym") & "m" |
| Overnight hours | =MOD(B2-A2,1)*24 |
| Visible-only total | =SUBTOTAL(9, C2:C9) |