Skip to content
Free Excel Tutorials
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Data Analysis

  • How to calculate average last N values in a table in Excel
  • How To Create Frequency Distribution in Excel
  • Create Scatter Chart in Excel
  • Conflicting Multiple Conditional Formatting Rules in Excel
  • How To Create Pareto Chart in Excel

References

  • Excel Advanced Lookup using Index and Match Functions
  • How to get last column number in range in Excel
  • Offset in Excel
  • To count total rows in a range in Excel
  • Vlookup Examples in Excel

Data Validations

  • Excel Data validation specific characters only
  • Excel Data validation only dates between
  • Excel Data validation number multiple 100
  • Data validation must not exist in list
  • Excel Data validation allow uppercase only

CODE function: Description, Usage, Syntax, Examples and Explanation

by

What is CODE function in Excel?

CODE function is one of TEXT functions in Microsoft Excel that returns a numeric code for the first character in a text string. The returned code corresponds to the character set used by your computer.

Operating environment Character set
Macintosh Macintosh character set
Windows ANSI

Syntax of CODE function

CODE(text)

The CODE function syntax has the following arguments:

  • Text    Required. The text for which you want the code of the first character.

Example of CODE function

Steps to follow:

1. Open a new Excel worksheet.

2. Copy data in the following table below and paste it in cell A1

Note: For formulas to show results, select them, press F2 key on your keyboard and then press Enter.

You can adjust the column widths to see all the data, if need be.

Formula Description Result
=CODE(“A”) Displays the numeric code for A 65
=CODE(“!”) Displays the numeric code for ! 33

Post navigation

Previous Post:

How to generate random date between two dates in Excel

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others

Logical Functions

  • SWITCH function example in Excel
  • How to use Excel FALSE Function
  • How to use IFS function in Excel
  • Invoice status with nested if in Excel
  • How to use Excel XOR Function

Date Time

  • How to calculate Day of the Year in Excel
  • Get days, months, and years between dates in Excel
  • Convert time to time zone in Excel
  • Calculate expiration date in Excel
  • Display Days in month in Excel

Grouping

  • Group numbers at uneven intervals in Excel
  • How to randomly assign data to groups in Excel
  • Map text to numbers in Excel
  • Categorize text with keywords in Excel
  • Group times into 3 hour buckets in Excel

General

  • AutoRecover file that was never saved in Excel
  • How to fill cell ranges with random text values in Excel
  • How to calculate decrease by percentage in Excel
  • AutoFit Column Width, AutoFit Row Height in Excel
  • How to create dynamic worksheet reference in Excel
© 2026 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning