Text and date functions
Data pasted from other systems is often messy. Text and date functions clean it with a formula instead of retyping it.
- LearnRead the guide and its worked examples.
- PractiseA drill on just this skill, easier tasks first. Stuck? “Show me how”.
- TestA timed mock in the style your employer named.
- ReviewYour report shows what cost marks and what to practise next.
The functions
- TRIM
=TRIM(text) - Removes spaces at the start and end, and squeezes double spaces to one.
- LEFT / RIGHT
=LEFT(text, n) · =RIGHT(text, n) - The first or last n characters.
- MID
=MID(text, start, n) - n characters starting at position start.
- CONCAT and &
=CONCAT(A2, " ", B2) · =A2&" "&B2 - Joins pieces of text together.
- UPPER / LOWER / PROPER
=PROPER(text) - Changes the case. PROPER gives each word a capital letter.
- TODAY, YEAR, MONTH, DAY
=YEAR(date) - Today's date, or one part of a date.
- NETWORKDAYS
=NETWORKDAYS(start, end) - Working days (Monday to Friday) between two dates, counting both ends.
Worked examples
Example 1 Remove extra spaces from a name
| A | B | |
|---|---|---|
| 1 | Name as pasted | Clean name |
| 2 | Sarah Jones | Sarah Jones |
=TRIM(A2) and shows Sarah Jones (highlighted).Piece by piece
TRIM(- Tidy the spaces in the text.
A2- The messy name. The spaces at each end go, and the three spaces in the middle become one.
Example 2 Pull the number out of a product code
| A | B | |
|---|---|---|
| 1 | Code | Number |
| 2 | UK-4471-B | 4471 |
| 3 | FR-2308-A |
=MID(A2,4,4) and shows 4471 (highlighted).Piece by piece
A2- The code UK-4471-B.
4- Start at the 4th character. U=1, K=2, -=3, 4=4.
4- Take 4 characters: 4471.
Note- The result is text, not a number. Wrap it in VALUE( ) if you need to do sums with it.
Example 3 Days from order to delivery
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Order | Ordered | Delivered | Days |
| 2 | Ord-118 | 03/03/2026 | 10/03/2026 | 7 |
=C2-B2 and shows 7 (highlighted).Piece by piece
C2- The delivery date. A date is stored as a number of days, so you can subtract.
-- Minus.
B2- The order date. 10 March minus 3 March is 7 days.
Tip- If the answer looks like a date, change the cell's format to Number.
Common mistakes
- Counting MID's start position from 0. The first character is 1.
- Forgetting that LEFT, MID and RIGHT give text, so "4471" won't add up until you use VALUE.
- Joining text without a space: =A2&B2 gives SarahJones. Add " " between them.
- Typing a date that the sheet reads as text, such as 3rd March. Use a format the sheet recognises, like 03/03/2026.
Excel and Google Sheets
In Excel: Excel reads dates in your computer's regional format, so 03/03/2026 may be day-first or month-first. CONCAT needs Excel 2019 or later; CONCATENATE and & work everywhere.
In Google Sheets: Dates follow the spreadsheet's locale (File > Settings). The text functions match Excel's. Google Sheets adds REGEXEXTRACT for harder patterns.
Now practise it
Reading gets you started; doing it under a clock is what the test checks. Practise this skill on its own, easier tasks first, then take a mock.
Practise in the Excel style Practise in the Google Sheets style
Skill drills come with the 30-day and 90-day passes. No pass yet? Try the free five-task mini-mock, no account needed.