Courses Learn Blog Contact
Get Started →
Lesson 9

Week 2, Virtual 2: Text Cleaning Practice, and Your First Look at Verdant Foods

Finish Steps 8 to 10 of the TechPlug Cleaning Process on your own, then open Verdant Foods for the first time.

Webbo3 Data Analytics Cohort 2: Excel Track 14 min read Free

Webbo3 Data Analytics · Cohort 2 · Excel Track · Week 2, Virtual 2

Text Cleaning Practice, and Your First Look at Verdant Foods

You finish the TechPlug Cleaning Process on your own, Steps 8 to 10. Then you open the pod project file for the first time and fix two of its four problems.

By the end of this class you can

  • Replace a column with its cleaned copy using Paste Special, Values
  • Clean Branch, Category and Customer_Type the same way as Staff_Name
  • Explain why Step 5 (Unknown) has to come before Step 9 (PROPER and TRIM)
  • Check the whole cleaning with the filter lists, as Step 10 says
  • Open the Verdant Foods file safely and fix its Category and Date columns

In Live 2 your tutor cleaned Staff_Name while you watched. Today nobody is watching. That is the point: the only way to know you can clean a column is to clean one and prove it worked.

What you do in this class

  1. Part 1: Steps 8 to 10 of the Cleaning Process tab on your working copy of the TechPlug workbook.
  2. Part 2: download Verdant Foods, set up the pod workbook, and fix the Category column.
  3. Part 3: find and fix the dates in the wrong format.
  4. Then open the Week 2 pod task page for the rest of the cleaning and the Cleaning Log.

Hand in: Your cleaned TechPlug workbook, and the pod workbook with Raw Data and Cleaned Data tabs started.

Part 1: Finishing the TechPlug Cleaning Process

Step 8: Replace the Old Column

Your helper column J holds =PROPER(TRIM(I2)), filled down. A formula column depends on the original: delete column I and J turns into errors. So the clean copy goes back over the original as values, and the helper is deleted:

Step 8 of the Cleaning Process

1.Select J2:J1051 (the helper) › Ctrl + C
2.Right-click I2 (Staff_Name) › Paste Special › Values › OK
3.Check: open the Staff_Name filter list: 10 names
4.Right-click the column letter J › Delete
Paste Values, Not Paste

An ordinary paste copies the formula, which would now point at itself and break. Paste Special, Values copies only the text the formula produced. If you see 0 or an error after pasting, press Ctrl + Z and use Values.

Step 9: Repeat for the Other Columns

The same three moves (insert a helper, =PROPER(TRIM(cell)), paste values back) on Branch, Category and Customer_Type. After Step 8 the columns are back in their places: Branch J, Category E, Customer_Type K.

What this formula doesWe want a clean copy of Branch: no stray spaces, a capital at the start of each word.
XTechPlug_Sales_Workbook.xlsx - Excel
After Enter and Fill Down
K2
fx
=PROPER(TRIM(J2))
A⋯JK
1Transaction_IDBranchBranch_Clean
2TP-0892KanoKano
⋮⋮⋮⋮
7TP-0474ENUGUEnugu
8TP-0162··Warri···Warri
⋮⋮⋮⋮
11TP-0348··Warri···Warri
⋮⋮⋮⋮
13TP-0878port harcourtPort Harcourt
⋮⋮⋮⋮
15TP-0879abujaAbuja
Filled down from K2 to K1051: 1,050 rows. Rows 2, 7, 8, 11, 13, 15 shown.
Cleaning ProcessSales DataProduct CatalogueStaff Directory
What this formula doesWe want a clean copy of Customer_Type, including the rows Step 5 filled with Unknown.
XTechPlug_Sales_Workbook.xlsx - Excel
After Enter and Fill Down
L2
fx
=PROPER(TRIM(K2))
A⋯KL
1Transaction_IDCustomer_TypeType_Clean
2TP-0892RetailRetail
3TP-0785RETAILRetail
4TP-0210RETAILRetail
⋮⋮⋮⋮
10TP-0207UnknownUnknown
⋮⋮⋮⋮
22TP-0511RETAILRetail
⋮⋮⋮⋮
25TP-0054retailRetail
Filled down from L2 to L1051: 1,050 rows. Rows 2, 3, 4, 10, 22, 25 shown.
Cleaning ProcessSales DataProduct CatalogueStaff Directory

Unknown passes through untouched, because it was already written properly in Step 5. Do Category the same way with =PROPER(TRIM(E2)).

Why Step 5 Comes Before Step 9

What if someone ran Step 9 on Customer_Type before filling the blanks with Unknown? A formula always returns something, and for a blank cell =PROPER(TRIM(K2)) returns empty text: a value with nothing in it. Ask Excel whether that is blank:

What this formula doesWe want to know whether the cleaned copy of a blank Customer_Type is really empty, if the blanks had not been filled first.
XTechPlug_Sales_Workbook.xlsx - Excel
After Enter and Fill Down
N2
fx
=ISBLANK(L2)
KL⋯N
1Customer_TypeType_CleanIs_Blank
2RetailRetailFALSE
⋮⋮⋮⋮
10FALSE
⋮⋮⋮⋮
47FALSE
⋮⋮⋮⋮
73FALSE
Filled down from N2 to N1051: 1,050 rows. Rows 2, 10, 47, 73 shown.
Cleaning ProcessSales DataProduct CatalogueStaff Directory

FALSE, even on the rows that look empty. Pasted back as values, that empty text would leave fifteen cells that look blank but are not: a filter on (Blanks) might still find them, but ISBLANK would not, and nothing would warn you. Filling Unknown first means there are no blanks left for PROPER and TRIM to turn into empty text. The order of the Cleaning Process is not decoration.

Step 10: Check Your Work

ColumnSpellings beforeValues afterMust be
Staff_Name10110The 10 names in the Staff Directory
Branch9810The 10 branches in the Staff Directory
Category155Accessories, Appliances, Laptops, Smartphones, Televisions
Customer_Type94Corporate, Retail, Unknown, Wholesale

Open each filter list and compare it with this table, exactly as Step 10 says. Then check the row count one last time: Count on column A says 1,051. Your Sales Data tab now matches TechPlug_Sales_Data_Cleaned.csv, the catch-up file in the downloads. Week 3 starts from this state, so save it.

Picture This

Picture tidying a cupboard: you lay everything out on the bed (the helper column), check each item, put them back folded (Paste Values), and clear the bed (delete the helper). Four shelves, the same routine on each, then one last look to be sure every shelf is right.

Part 2: Verdant Foods, Opened Safely

Verdant Foods Nigeria: the pod project file

Download everything as one zip file (verdant-foods-pod-dataset.zip)

Why We Open This File Differently

TechPlug was imported with Data > From Text/CSV. Verdant Foods is opened with File > Open instead, and the reason is its Date column. It mixes two formats on purpose: most dates are written 2025-01-31, and ten are written 31/01/2025.

From Text/CSV decides one type for the whole column. On a laptop that reads dates month-first, it cannot read 31/01/2025 (there is no month 31) and turns those ten cells into errors, which load as empty cells: the evidence is gone. File > Open is less strict. It keeps whatever it cannot read as text, so the ten dates stay in the sheet, where you can see them and fix them.

Set up the pod workbook

1.File › Open › Browse › Choose VerdantFoods_Pod_Dataset.csv › Open
2.File › Save As › Save as type: Excel Workbook (*.xlsx) › Name it VerdantFoods_Pod › Save
3.Double-click the sheet tab › Rename it Raw Data
4.Right-click Raw Data › Move or Copy › Tick Create a copy › OK
5.Rename the copy Cleaned Data

Two tabs now. Raw Data is never touched again. All the work happens on Cleaned Data. If your pod already has a shared workbook from your tutor, do this in that file instead of a new one.

What we are looking atWe want to see the start of the Cleaned Data tab, an exact copy of the raw file for now.
XVerdantFoods_Pod.xlsx - Excel
Cleaned Data, before any cleaning
ABCDEFGHIJ
1Transaction_IDDateRegionStateProduct_NameCategoryQuantityUnit_PriceSales_RepCustomer_Type
2VF-00012025-01-01South EastEnuguVerdant Tomato Paste 400gCondiments331,400Precious EtimRetail
3VF-00022025-01-03South SouthEdoVerdant Plantain Chips 150gSnacks80900Olumide JohnsonWholesale
4VF-00032025-01-03South WestOyoVerdant Pepper Sauce 250mlCondiments1061,800Ifeanyi ObiWholesale
5VF-00042025-01-04North CentralFCT AbujaVerdant Choco Drink 400gBeverages202,800Funmilayo AdeyemiRetail
6VF-00052025-01-04South SouthRiversVerdant Tomato Paste 400gCondiments151,400Precious EtimRetail
7VF-00062025-01-06South SouthDeltaVerdant Tiger Nut Milk 1LBeverages2642,200Precious EtimWholesale
8VF-00072025-01-06South EastEnuguVerdant Pepper Sauce 250mlCondiments161,800Bashir LawalRetail
9VF-00082025-01-06South WestOyoVerdant Zobo Drink 1LBeverages421,500Yakubu DanjumaRetail
470 rows of data in rows 2 to 471.
Raw DataCleaned Data

Fix the Category Column

Verdant sells four categories, but 30 cells spell them differently: wrong case, spaces before or after, or both. You know the fix.

What this formula doesWe want every Category value written exactly as one of the four real categories.
XVerdantFoods_Pod.xlsx - Excel
After Enter and Fill Down
K44
fx
=TRIM(PROPER(F44))
A⋯F⋯K
1Transaction_IDCategoryCategory_Clean
⋮⋮⋮⋮
44VF-0041Condiments··Condiments
⋮⋮⋮⋮
50VF-0047SNACKSSnacks
⋮⋮⋮⋮
53VF-0050··beverages·Beverages
⋮⋮⋮⋮
64VF-0061Beverages··Beverages
⋮⋮⋮⋮
100VF-0096Cereals··Cereals
⋮⋮⋮⋮
128VF-0124··cereals·Cereals
⋮⋮⋮⋮
134VF-0130BEVERAGESBeverages
Filled down from K2 to K471: 470 rows. Rows 44, 50, 53, 64, 100, 128, 134 shown.
Raw DataCleaned Data

Open the filter list on Category_Clean: four entries, Beverages, Cereals, Condiments and Snacks. Paste Values over column F, delete column K, and write in your notes: Category, 30 cells, wrong case and extra spaces, fixed with TRIM and PROPER.

Part 3: The Dates in the Wrong Format

Step 1: Find Out Which Kind of Laptop You Have

The same file behaves differently on different laptops, so first find out what yours did. ISTEXT is the sibling of ISNUMBER: it answers TRUE when a cell holds text.

What this formula doesWe want to know, for every row, whether Excel left the Date as text instead of turning it into a real date.
XVerdantFoods_Pod.xlsx - Excel
After Enter and Fill Down
K2
fx
=ISTEXT(B2)
AB⋯K
1Transaction_IDDateDate_Is_Text
2VF-00012025-01-01FALSE
⋮⋮⋮⋮
32VF-00292025-01-31FALSE
33VF-003031/01/2025TRUE
⋮⋮⋮⋮
45VF-004215/02/2025TRUE
⋮⋮⋮⋮
136VF-013222/04/2025TRUE
Filled down from K2 to K471: 470 rows. Rows 2, 32, 33, 45, 136 shown.
Raw DataCleaned Data

Filter Date_Is_Text for TRUE and read the status bar.

What the status bar saysWhat it meansWhat you do
10 of 470 records foundYour laptop reads dates month-first. The ten day-first dates stayed as text (the case shown here)Step 2
0 of 470 records foundYour laptop reads dates day-first (Nigeria and the UK usually do). Excel already read all ten correctlySkip to Step 3, and use the Notepad check below to log them

Step 2: Turn the Text Into Real Dates With Text to Columns

Text to Columns splits text into columns, but its last screen also lets you say how to read a date. We use it on the ten text dates only:

Text to Columns, day first

1.Date_Is_Text arrow › Sort Z to A (TRUE moves to the top)
2.Select only the Date cells of the rows that say TRUE
3.Data › Text to Columns › Delimited › Next
4.Untick every delimiter › Next
5.Column data format: Date › Choose DMY › Finish

DMY tells Excel "day, then month, then year", so 31/01/2025 becomes the real date 31 January 2025 on any laptop. Check: Date_Is_Text should now say FALSE on every row. Then sort by Transaction_ID, A to Z, to put the rows back in order, and delete the helper column.

Or: Do It With a Formula

If you prefer formulas, the same fix uses the text functions from this week. In 31/01/2025 the day is the first 2 characters, the month is 2 characters starting at position 4, and the year is the last 4. DATE(year, month, day) builds a real date from those three pieces, and IF only does it to the text cells:

What this formula doesWe want a real date in every row: the day-first text dates rebuilt from their pieces, and every date that was already real left alone.
XVerdantFoods_Pod.xlsx - Excel
After Enter and Fill Down
K2
fx
=IF(ISTEXT(B2),DATE(RIGHT(B2,4),MID(B2,4,2),LEFT(B2,2)),B2)
AB⋯K
1Transaction_IDDateDate_Fixed
2VF-00012025-01-012025-01-01
⋮⋮⋮⋮
33VF-003031/01/20252025-01-31
⋮⋮⋮⋮
45VF-004215/02/20252025-02-15
⋮⋮⋮⋮
136VF-013222/04/20252025-04-22
Filled down from K2 to K471: 470 rows. Rows 2, 33, 45, 136 shown.
Raw DataCleaned Data

Then Paste Values over column B and delete column K. Both routes give the same ten real dates.

Step 3: One Format for the Whole Column

Every date shown the same way

1.Select column B › Home › Number Format box › More Number Formats › Custom › Type: yyyy-mm-dd › OK

If Your Laptop Already Read Them: the Notepad Check

On a day-first laptop all the dates are real already, so you cannot see which ten were written differently, but the Cleaning Log still needs them. Open the CSV itself in Notepad (right-click the file, Open with, Notepad), press Ctrl + F and search for /2025. Every other date uses hyphens, so each match is one of the ten.

What we are looking atWe want to see one of the day-first dates as it is written in the raw file, next to its neighbours.
VerdantFoods_Pod_Dataset.csv - Notepad
Lines 31 to 33 of the file
VF-0028,2025-01-31,North Central,FCT Abuja,Verdant Corn Flakes 500g,Cereals,35,3500,Yakubu Danjuma,Retail
VF-0029,2025-01-31,South East,Enugu,Verdant Tomato Paste 400g,Condiments,12,1400,Funmilayo Adeyemi,Retail
VF-0030,31/01/2025,South West,Lagos,Verdant Tomato Paste 400g,Condiments,184,1400,Funmilayo Adeyemi,Wholesale

Note the Transaction_ID of each match for your log. There are exactly 10.

Never Type Over a Date by Hand

Retyping 31/01/2025 as 2025-01-31 in the cell works for one date, but by the tenth you will have typed one wrongly, and nothing will tell you. Text to Columns and the formula do all ten the same way, and you can check them with ISTEXT.

Picture This

Picture two visitors at a gate, one with an ID card in the local format and one in a foreign format. A strict guard turns the second away and loses his name (From Text/CSV). A careful guard writes the name down as given and sorts it out later (File > Open). Text to Columns is the clerk who reads the foreign card properly.

Checkpoint

Q1. Why does the Cleaning Process fill Unknown (Step 5) before running PROPER and TRIM (Step 9)?

On a blank cell the formula returns empty text, not a blank. Pasted as a value, the cell looks empty but ISBLANK says FALSE. With Unknown filled first, there are no blanks to turn into empty text.

Q2. Why is Verdant Foods opened with File > Open and not From Text/CSV?

From Text/CSV forces one type on the Date column and can turn the day-first dates into errors on a month-first laptop, losing them. File > Open keeps them as text so they can be fixed.

Q3. What does DMY mean in Text to Columns?

Day, Month, Year: the order the date is written in.

Q4. Your ISTEXT filter finds 0 rows. Have you done something wrong?

No. Your laptop reads day-first dates and already converted them. Format the column as yyyy-mm-dd and use the Notepad check to log the ten.

Tick Before You Move On

  • ☐ Staff_Name, Branch, Category and Customer_Type are clean, pasted back as values, helpers deleted
  • ☐ Each filter list shows exactly the values Step 10 expects
  • ☐ The pod workbook has a Raw Data tab, never edited, and a Cleaned Data tab
  • ☐ Category in Cleaned Data has four values, and I noted the 30 fixes
  • ☐ Every date in Cleaned Data is a real date shown as yyyy-mm-dd
  • ☐ I know the Transaction_IDs of the 10 day-first dates

Quick Recap

Clean in a helper column, check it, Paste Special Values, delete the helper. Fill blanks with a label before cleaning text, or the formula turns them into empty text. Open Verdant Foods with File > Open, so dates it cannot read stay visible as text. ISTEXT shows which dates are text; Text to Columns with DMY or a DATE formula turns them into dates. Format the whole Date column as yyyy-mm-dd so every date looks the same.

Next: Pod Task Week 2. The full cleaning brief for Verdant Foods: the 15 duplicates, the 20 blank quantities, the Quantity_Flag column, and the Cleaning Log.

Learn this with a real instructor

Free lessons take you a long way on your own. The full programmes add live classes, assignments, Skill Points and a certificate — built for African students.