Excel Advanced - Organising Data with Tables
Organising Data with Tables
Transform an ordinary range into a dependable Excel Table, then sort, filter, summarise and remove duplicates without damaging the source data.
Learning outcomes
Practice dataset
The embedded dataset contains Malaysian retail transactions. It deliberately includes repeated customers and one exact duplicate so you can distinguish legitimate repeat business from duplicated records.
1. Prepare the range
Inspect before converting
- Select any cell in the dataset.
- Press Ctrl+End; the last used cell should be I29.
- Confirm row 1 contains one header per column, with no blank headers, merged cells or subtotal rows.
- Confirm Transaction ID is stored as text and Date as a real Excel date.
Create and name an Excel Table
- Click inside the range and press Ctrl+T (or Insert → Table).
- Confirm A1:I29 and tick My table has headers.
- On Table Design, replace the default name with tblRetailSales.
- Choose a medium table style with visible banded rows.
2. Calculated columns and structured references
Calculate Sales
- In the first empty header cell, J1, type Sales.
- In J2, enter the formula below and press Enter.
- Excel should fill the entire Table column automatically.
- Format Sales as Currency or Accounting with two decimals.
=[@Quantity]*[@[Unit Price]]Checkpoint: the first row is RM3,600 and the source total is RM127,075.
Add a Total Row
- Select the Table, then Table Design → Total Row.
- In the Sales total cell, choose Sum.
- In Quantity, choose Sum; the result is 246 units.
- Filter the Table and observe that totals respond to visible rows because Excel uses
SUBTOTAL.
=SUBTOTAL(109,tblRetailSales[Sales])3. Sorting and filtering
Apply a multi-level sort
- Open Data → Sort and tick My data has headers.
- Sort by Region, A to Z.
- Add a level: Sales, Largest to Smallest.
- Verify rows remain intact—never sort only one column in a transaction table.
Checkpoint: within Central, transaction TXN-1026 (RM8,400) should appear before other Central transactions.
Filter high-value completed orders
- Filter Status to Completed.
- On Sales, choose Number Filters → Greater Than or Equal To → 5000.
- Read the filtered Total Row.
Expected result: 8 transactions with total Sales of RM51,140.
Optional custom-list sort
To display regions in a business-defined order, use Sort → Order → Custom List and enter: Central, Northern, Southern, Eastern. Custom lists are preferable to manually moving rows.
4. Advanced Filter and unique records
Extract unique customers
Advanced Filter can copy a distinct list without altering the Table.
- Copy the Customer header to L1.
- Select the Customer column including its header.
- Choose Data → Advanced → Copy to another location.
- Set Copy to L1, tick Unique records only, then OK.
Checkpoint: there are 17 unique customers plus the header.
Microsoft 365 alternative
=SORT(UNIQUE(tblRetailSales[Customer]))This dynamic-array result updates as the Table expands. Advanced Filter remains suitable for older Excel versions and fixed extracts.
5. Remove duplicates safely
Remove only the exact duplicate
- Save a backup or duplicate the worksheet.
- Clear all filters and record the controls: 28 rows, 246 units, RM127,075.
- Select the Table and choose Data → Remove Duplicates.
- Tick all original columns (Transaction ID through Status). You may include Sales because it is derived consistently.
- Click OK. Excel should report 1 duplicate value found and removed; 27 unique values remain.
After cleanup: 27 rows, 241 units and RM122,775. The removed duplicate is the second copy of TXN-1012.
6. Make the Table expand
Click the first row immediately below the Table and enter a new transaction. The Table should expand, inherit its formatting and calculate Sales automatically. If it does not, check File → Options → Proofing → AutoCorrect Options → AutoFormat As You Type → Include new rows and columns in table.
| Transaction ID | Date | Region | Customer | Product | Category | Quantity | Unit Price | Status |
|---|---|---|---|---|---|---|---|---|
| TXN-1028 | 2026-04-05 | Eastern | Rimba Trading | Tablet | Electronics | 3 | 1850 | Completed |
Expected Sales: RM5,550. A chart or PivotTable based on the Table can include new rows after refresh without redefining its source range.
Troubleshooting
Confirm the formula was entered inside the Table and calculated-column auto-fill is enabled.
Use “Greater Than or Equal To,” and confirm Sales contains numbers rather than text.
Undo immediately. Clear filters, select the full Table and use all fields that define a record.
Check the Table and column names. Renaming a referenced column incorrectly can break formulas.
Knowledge check
1. Why is a Table better than a fixed range?
It expands with new data, carries formulas and formatting down, provides filters, and offers readable structured references.
2. What is the safest way to sort?
Sort from within the Table or select the full dataset so complete records move together.
3. Advanced Filter or Remove Duplicates?
Use Advanced Filter to create a separate unique extract. Use Remove Duplicates only when you intend to delete duplicate rows from the source, after making a backup and recording controls.
4. Why does a Table Total Row use SUBTOTAL?
SUBTOTAL can ignore filtered-out rows, so the total reflects visible data.
Completion checklist
- Table name: tblRetailSales
- Calculated column: Sales
- High-value completed filter: 8 rows / RM51,140
- Unique customers: 17
- Cleaned controls: 27 rows / 241 units / RM122,775
Next lesson: use clean, structured Table data to build clear comparisons, trends and relationships with charts.