CODE and CHAR functions in a spreadsheet
Gives the number code of a letter, so =CODE("A") returns 65. Its partner =CHAR(65) turns a code back into a letter. Capital letters start at 65 (A) and run to 90 (Z).
Understanding CODE and CHAR functions in a spreadsheet in ACARA Digital Technologies Years 9–10
What it does: CODE can take a cell reference, so it gives the number code of the letter in A2. Capital letters run from 65 (A) to 90 (Z), so CHAR(90) returns Z. CHAR(65) converts the code 65 into the letter A. It is the reverse of =CODE("A"). CODE("A") is 65. Adding 1 gives 66, and =CHAR(66) is B. Adding 2 would give 67, which is C. CHAR works from number to letter, so giving it a letter is the wrong way round.
Common mistakes: There is no CHR function in a spreadsheet. The function that gives a letter's number code is CODE, so the line should be B2: =CODE(A2). A letter typed straight into CODE must be inside quotes. Without quotes, the spreadsheet reads C as a name and gives an error. It should be =CODE("C").
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 860–875) and word search (Modules 860–944).
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
=CODE("A")Fill in the Blanks
Spot the Error
Student with a class code? Join your class →