Webbo3 Data Analytics · Cohort 2 · Excel Track · Week 1, Live 2
The Excel Interface, Data Types and Importing a CSV
Today we open Excel together. By the end you can name everything on the screen, tell text from numbers from dates at a glance, and bring TechPlug into Excel without damaging it.
By the end of this class you can
- Name every part of the Excel window and say what it is for
- Use rows, columns, cells, ranges and sheets, and move around a large sheet quickly
- Identify the three data types in Excel, and see what breaks when a number is stored as text
- Import a CSV file with Data > From Text/CSV and save it as a proper Excel workbook
- Read a new dataset and say what it is about
Last class was about thinking. This class is about the tool. You cannot clean what you cannot see, and you cannot see clearly until the screen stops looking like a wall of buttons.
Have these ready before class
Download everything as one zip file (techplug-sales-workbook.zip)
- TechPlug_Sales_Workbook.xlsx: the workbook every class uses: Cleaning Process, Sales Data, Product Catalogue and Staff Directory
- TechPlug_Sales_Data.csv: the Sales Data sheet on its own as a CSV, for the Week 1 import lesson
- TechPlug_Sales_Data_Cleaned.csv: Sales Data after the cleaning, for anyone catching up from Week 3
- TechPlug_Product_Catalogue.csv: the Product Catalogue sheet as a CSV
- TechPlug_Staff_Directory.csv: the Staff Directory sheet as a CSV
1. The Excel Window
Definition
The Excel window is everything you see when a workbook is open: the commands along the top, the grid of cells in the middle, and the information along the bottom. Every part has one job.
Real-Life Scenario
The dashboard of a car. The first time you sit in the driver's seat, it is a confusing panel of dials. After a week of driving, you glance at the fuel gauge without thinking. The Excel window is the same: learn what each part is once, and you will never have to think about it again.
The Parts of the Window
| # | Part | What it is for |
|---|---|---|
| 1 | Title bar | The name of the workbook you have open |
| 2 | Ribbon tabs | Groups of commands: Home for everyday formatting, Insert for charts and PivotTables, Formulas for functions, Data for importing, sorting, filtering and removing duplicates, View for freezing panes |
| 3 | Ribbon | The buttons for the tab you clicked, arranged in groups |
| 4 | Name Box | The address of the selected cell. You can also type an address here and press Enter to jump to it |
| 5 | Formula bar | What is really inside the selected cell. For a formula, it shows the formula while the cell shows the result |
| 6 | Column letters | A, B, C across the top. After Z comes AA, AB, and so on |
| 7 | Row numbers | 1, 2, 3 down the side |
| 8 | Active cell | The cell with the thick green border: the one you are working in |
| 9 | Sheet tabs | The sheets in this workbook. Click + to add one; double-click a tab to rename it |
| 10 | Status bar | Live information about what you have selected: Count, Sum and Average appear when you select cells |
A cell shows a result; the formula bar shows what is actually in it. When something looks wrong, click the cell and read the formula bar first. You will do this hundreds of times in this track.
Picture the car dashboard: speed in the middle (the grid), indicators along the top (the ribbon), fuel and warning lights along the bottom (the status bar). You stop reading it and start glancing at it.
2. Rows, Columns, Cells, Ranges and Sheets
Definition
A column runs down and has a letter. A row runs across and has a number. Where they cross is a cell, named by its column then its row: C5 is column C, row 5. A block of cells is a range, written as its top-left cell, a colon, and its bottom-right cell: A1:L1071. A sheet is one grid, and a workbook is the file that holds one or more sheets.
Real-Life Scenario
A cinema. Rows are numbered, seats in each row are lettered, and your ticket says "Row F, Seat 12". Excel just swaps the order: letter first, then number. "Book seats F12 to F15" is a range. Each screen in the cinema is a sheet; the whole cinema is the workbook.
The Building Blocks
| Thing | How it is written | TechPlug example |
|---|---|---|
| Cell | Column letter, row number | J2 holds the branch of the first sale |
| Range | First cell : last cell | G2:G1071 is every Unit_Price |
| Whole column | Letter : letter | G:G is all of column G, including the header |
| Sheet | Its tab name | Sales Data |
| Workbook | The file name | TechPlug_Sales_Workbook.xlsx, which has four sheets |
Where the Data Really Ends
The header sits in row 1, so the first sale is in row 2. That means the last of 1,070 sales is in row 1,071, not row 1,070. It sounds trivial; it is the cause of more wrong totals than anything else in this track. A total over G2:G1070 quietly leaves out the last sale.
Moving Around Quickly
| Press | What happens |
|---|---|
| Ctrl + Down Arrow | Jump to the last filled cell in the column (stops early at a blank cell, which is itself a clue) |
| Ctrl + Home | Jump back to A1 |
| Ctrl + Shift + Down Arrow | Select from here to the last filled cell |
| Ctrl + Space | Select the whole column |
| Ctrl + A | Select the whole table of data around the active cell |
| Name Box | Type any address, such as L1071, and press Enter |
Select column A with Ctrl + Space and look at the status bar: it says Count: 1071. That is 1,070 sales plus the header. Whenever you open a new file, this is the fastest way to see how many records it has.
Keep the headers in view
Now scroll down. Row 1 stays at the top, so you always know which column is which, even at row 250.
Click C2, then press Ctrl + Down Arrow. Where does it stop? Now click H2 and do the same. Does it stop at row 1,071? If it stops earlier, that column has an empty cell. Write down the row it stopped at: you have just found your first data quality issue, and you will hunt for the rest in Virtual 2.
Picture the cinema ticket: "Row F, Seat 12" becomes cell F12. The screen is the sheet, the building is the workbook, and the usher who walks you to your seat is the Name Box.
3. Data Types in Excel
Definition
Every cell holds one data type, and the type decides what Excel can do with the value. There are three you will meet in every dataset:
- Text: letters, or digits Excel treats as a label. It can be searched and grouped, never added.
- Number: an amount. It can be added, averaged and compared.
- Date: a day on the calendar. Underneath, it is a number, which is why dates can be sorted and subtracted.
Two more appear later: TRUE / FALSE (the answer to a yes-or-no question, from Week 2) and errors such as #N/A (from Week 4).
Real-Life Scenario
A school register has a column of names and a column of test scores. You can work out the class average from the scores, but not from the names. If somebody wrote one score as "seventy-two" in words, the average would quietly leave that student out. Excel works the same way, and it does not warn you.
How to Tell Them Apart at a Glance
| Type | Lines up | In TechPlug |
|---|---|---|
| Text | Left of the cell | Transaction_ID, Product_ID, Product_Name, Category, Staff_ID, Staff_Name, Branch, Customer_Type, Payment_Method |
| Number | Right of the cell | Quantity, Unit_Price |
| Date | Right of the cell (because it is a number underneath) | Date |
This is Excel's default alignment, and it is your quickest test. A number sitting on the left of its cell is almost always a number stored as text.
Type 1 and Type 2: Text and Numbers, and What Breaks
Here are the first five quantities from TechPlug. Their total should be 17. In the second copy, the third value (7) has been typed with an apostrophe in front, which is how a number becomes text. It looks the same. Watch the total.
The total dropped from 17 to 10, exactly the 7 that is stored as text. SUM did not show an error. It skipped the text and gave a wrong answer that looks completely normal. That is the danger: Excel does not refuse dirty data, it just calculates with it.
Select the cells, click the small warning icon that appears beside them, and choose Convert to Number. You will meet the same problem at scale in Week 2.
Type 3: Dates Are Numbers in Disguise
Excel stores a date as a day number, counting 1 January 1900 as day 1. The cell shows you a date because it has a date format; change the format to General and the number underneath appears.
3 March 2024 is day 45,354. That is why you can sort dates, subtract one from another to get the days between them, and group them by month in a PivotTable in Week 4. A date stored as text can do none of those things.
A laptop set to Nigeria or the United Kingdom shows 03/01/2024 for 3 January; one set to the United States shows 1/3/2024. Same number underneath, different picture on top. In this course we format every date as yyyy-mm-dd (2024-01-03), which nobody can misread. You will set that format in section 4.
Click any date in column B. Then Home, open the Number Format box, and choose General. What number appears? Press Ctrl + Z to undo. Now type 15000 in an empty cell, and '15000 (with an apostrophe) in the cell below. Which one sits on the left?
Picture the school register again: a score written in words sits there looking like a score, but the calculator skips it. Left-aligned numbers are scores written in words.
4. Importing a CSV File
Definition
A CSV (comma-separated values) file is a plain text file that holds a table: one record per line, with commas between the fields. It is the most common way data moves between systems, because almost every program can write one and read one.
Real-Life Scenario
A CSV is like a shopping list sent by text message: "rice, 2 bags, 45000". There is no formatting, no bold, no colour, just the facts in order. Whoever receives it decides how to lay it out. Excel is the person receiving the text message.
There is no formatting in the file at all: no column widths, no bold header, no Naira format. Everything you will see in Excel is Excel's interpretation of these lines. That is why the way you import a file matters.
Two Ways In
| Way | How | When to use it |
|---|---|---|
| Open it | File > Open, or double-click the file | A quick look. Excel guesses every type silently and you cannot check its guesses |
| Import it | Data > From Text/CSV | Real work. You see a preview, Excel shows its guess for each column, and you can check before anything lands in the sheet |
Step by Step: Data > From Text/CSV
Import the Sales Data CSV
Excel puts the data on a new sheet named TechPlug_Sales_Data, as a green striped Table, and opens a Queries & Connections pane on the right that remembers where the data came from.
Turn the Table Into a Normal Range
An Excel Table is a powerful feature, but it changes how formulas are written: instead of F2*G2 you would see [@Quantity]*[@Unit_Price]. Every formula in this track is written with plain cell addresses, so that what you see in a lesson is what you see on your screen. So we convert it:
Convert to a normal range
Excel warns that this removes the link to the CSV file. That is what we want: the data is now an ordinary sheet you can work on, and the downloaded CSV stays untouched.
From Now On: the TechPlug Sales Workbook
What you just imported is exactly the Sales Data tab of the TechPlug Sales Workbook. The workbook also holds the Cleaning Process, Product Catalogue and Staff Directory tabs you will need from Week 2, so every class from here works in the workbook. It is already an Excel file, so it simply opens: File > Open, or double-click it.
Save It as a Workbook, Not a CSV
Save a working copy of the workbook
Now the downloaded workbook stays untouched as your original, and every change you make lands in your own copy.
A CSV can hold only plain values on one sheet. Save your work as CSV and every formula becomes a frozen number, every extra sheet disappears, and all your formatting is gone. Excel warns you about "possible data loss"; believe it. Always work in .xlsx.
Make It Readable
Formatting that helps you read
Formatting changes how a value looks, never what it is. 380,000 is still 380000 underneath, and the formula bar will show you so.
Picture the text-message shopping list arriving on your phone and you copying it neatly into a notebook with columns. The message stays in your phone untouched; the notebook is where you work.
5. What Is This Data About?
Before any formula, an analyst reads a new dataset the way a detective reads a room. Five questions describe almost any business table:
| Question | Answered by | TechPlug |
|---|---|---|
| Who? | People columns | Staff_Name (who sold), Customer_Type (who bought) |
| What? | Item columns | Product_Name, Category |
| Where? | Place columns | Branch |
| How? | Process columns | Payment_Method |
| When? | Time columns | Date |
| How much? | Number columns | Quantity, Unit_Price |
Put it together and you can describe the whole sheet in one sentence: "Each row is one TechPlug sale: who sold it, to what kind of customer, what was sold, where, when, for how much and how it was paid, for 1,070 sales from January to March 2024." If you cannot write that sentence about a dataset, you are not ready to analyse it.
Practical Exercises
Exercise 1: Very Easy
Without looking at the table above, name the ten parts of the Excel window.
Exercise 2: Simple Application
Import TechPlug_Sales_Data.csv with Data > From Text/CSV, convert it to a range, and save it as an .xlsx workbook. Then open the TechPlug Sales Workbook and save your own working copy of it.
Exercise 3: Combination
Format the Date column as yyyy-mm-dd and the money columns with Comma Style, then freeze the top row.
Exercise 4: A Small Real-World Problem
For every column, write T (text), N (number) or D (date) on a piece of paper by looking only at the alignment. Then click one cell in each column and check yourself in the formula bar.
Checkpoint
Q1. What is the difference between what a cell shows and what the formula bar shows?
The cell shows the result, formatted. The formula bar shows what is really in the cell: the formula, or the raw value.
Q2. Sales Data has 1,070 rows of sales. Which row is the last one in, and why?
Row 1,071, because row 1 holds the headers.
Q3. Five quantities should total 17, but SUM gives 10. What is the most likely cause?
One value (7) is stored as text, so SUM skips it without any error.
Q4. Why can Excel sort dates in time order?
Because a date is stored as a number: a day count in which 1 January 1900 is day 1.
Q5. Why do we convert the imported Table to a normal range in this track?
So formulas use plain cell addresses like F2*G2, the same as every lesson shows.
Q6. Why should you never save your working file as CSV?
A CSV keeps only plain values on one sheet: formulas, extra sheets and formatting are lost.
Tick Before You Move On
- ☐ I can name every part of the Excel window
- ☐ I can write a cell address and a range, and jump to a cell with the Name Box
- ☐ I know the last sale on Sales Data is in row 1,071
- ☐ I can tell text, numbers and dates apart by their alignment
- ☐ I have seen a number stored as text drop out of a SUM
- ☐ I imported TechPlug with From Text/CSV, converted it to a range and saved it as .xlsx
- ☐ I can describe TechPlug in one sentence
Quick Recap
The formula bar shows what is in a cell; the cell shows the result. Cells are named column then row; ranges run from the top-left to the bottom-right cell. Text sits left, numbers and dates sit right. A number on the left is a warning. Dates are numbers underneath, which is why they can be sorted and grouped. Import with Data > From Text/CSV, convert to a range, and always save as .xlsx.
Final Scenario
A friend sends you a sales file and says: "The total is wrong. Excel is broken."
You select the Unit_Price column and glance at the status bar: Count is right, but Sum looks low. You scan the column: three values are sitting on the left of their cells. Numbers stored as text. You select them, click the warning icon, and choose Convert to Number. The total jumps to the right figure.
Excel was never broken. It was calculating exactly what it was given.
Read the screen before you trust the answer.
Next, Week 1, Virtual 2: you open the Sales Data tab on your own, label every column, count the rows, and list every data quality problem you can find, before writing a single formula.