Length checking with LEN
LEN counts the characters in a cell, spaces included. Comparing it to a number, like =LEN(A2)=4 for a 4-digit postcode, gives TRUE if the length is right and FALSE if not.
Understanding Length checking with LEN in ACARA Digital Technologies Years 9–10
What it does: A 4-digit postcode needs a length of exactly 4, so LEN(A2) is compared with 4 using =. TRIM removes extra spaces before LEN counts, so a postcode typed with a stray space is still measured correctly. LEN(A2) returns the number of characters. Comparing it with =4 gives TRUE or FALSE, which is what a check needs. LEN counts every character in the cell, including spaces at the start, middle or end. The >= operator checks the LEN result is 8 or more, which is how a minimum length check works. LEN should only contain the cell to measure. The comparison with 4 belongs outside the brackets.
Common mistakes: Spreadsheets have no LENGTH function. The function that counts characters is LEN, so the line should be =LEN(A2)=4. The comma between the TRUE result and the FALSE result is missing. It should be =IF(LEN(A4)=4,"OK","Check").
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 255–329) and word search (Modules 226–329).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
=LEN(A2)=4Fill in the Blanks
Spot the Error
Student with a class code? Join your class →