CODE function - Microsoft Support (2024)

Excel for Microsoft 365 Excel for Microsoft 365 for Mac Excel for the web Excel 2021 Excel 2021 for Mac Excel 2019 Excel 2019 for Mac Excel 2016 Excel 2013 More...Less

This article describes the formula syntax and usage of the CODEfunction in Microsoft Excel.

Description

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

CODE(text)

The CODE function syntax has the following arguments:

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

Example

Copy the example data in the following table, and paste it in cell A1 of a new Excel worksheet. For formulas to show results, select them, press F2, and then press Enter. If you need to, you can adjust the column widths to see all the data.

Formula

Description

Result

=CODE("A")

Displays the numeric code for A

65

=CODE("!")

Displays the numeric code for !

33

CODE function - Microsoft Support (2024)

FAQs

How to do code function in Excel? ›

The CODE function in Excel is used to find out the character's code in the string. It finds out the code for the first character only, so if we use this formula as =CODE(“Anand”) and =CODE(“An”), we will get the same result as 65 as the code for character A is 65.

What is the code for Microsoft Excel? ›

VBA stands for Visual Basic Analysis. Excel VBA is Microsoft's programming language for Office applications such as MS-Excel, MS-Word, and MS-Access.

How do you get help on a function in Excel? ›

If you're not sure how to use a particular function, you can click the "Help on this function" link at the bottom of the Insert Function dialog box, and that will bring up Excel's Help.

Are Excel functions like coding? ›

From a Coherent perspective, Excel is a programming language simply because it is a way for people define calculations and logic.

Where do I run code in Excel? ›

Run a macro from the Developer tab
  1. Open the workbook that contains the macro.
  2. On the Developer tab, in the Code group, click Macros.
  3. In the Macro name box, click the macro that you want to run, and press the Run button.
  4. You also have other choices: Options - Add a shortcut key, or a macro description.

What do 37 all formulas in Excel start with? ›

A formula always begins with an equal sign (=). Excel for the web interprets the characters that follow the equal sign as a formula.

What are the 25 commonly used formulas in MS Excel? ›

Ajit Yadav 👨🏫 🇮🇳
  • SUM formula: Example: =SUM(A1:A5) ...
  • AVERAGE formula: Example: =AVERAGE(B1:B10) ...
  • COUNT formula: Example: =COUNT(C1:C8) ...
  • MAX formula: Example: =MAX(D1:D6) ...
  • MIN formula: Example: =MIN(E1:E4) ...
  • IF formula: Example: =IF(F1>10, "Pass", "Fail") ...
  • VLOOKUP formula: ...
  • CONCATENATE formula:
Jun 15, 2023

What is the best code to learn for Excel? ›

Coding languages:
  • VBA: Visual Basic for Application released since 1993.
  • M language: A script language for PowerBI since 2013.
  • Office Script: TypeScript integrated into MS Office since 2019 (if I remember correctly)
  • Python: Integrated into MS Office just recently.
Oct 11, 2023

What is the formula code? ›

Formula code is a collection of whitespace, identifiers, keywords, literals, comments, operators and separators.

How many lines of code does Excel have? ›

Originally Answered: Did it really take millions lines of code to write Excel? Yes, Excel is definitely >1 million lines, probably multiple millions.

What is the most useful Excel function and why? ›

VLOOKUP. The VLOOKUP function is one of the most commonly used and recognizable functions in Excel. It will look for a value in a table and return information from another column relating to that value.

What are common functions of Microsoft Excel? ›

  • IF Function. The Excel IF function is the most essential function in Excel for logical tests. ...
  • MIN & MAX Function. The Excel MIN function returns the smallest numeric value in a range of values. ...
  • TRIM Function. ...
  • CONCATENATE Function. ...
  • COUNT Function. ...
  • COUNTA Function. ...
  • COUNTIF Function. ...
  • SUMIF Function.

What are the 10 basic Excel formulas? ›

  • IF Function. The Excel IF function is the most essential function in Excel for logical tests. ...
  • MIN & MAX Function. The Excel MIN function returns the smallest numeric value in a range of values. ...
  • TRIM Function. ...
  • CONCATENATE Function. ...
  • COUNT Function. ...
  • COUNTA Function. ...
  • COUNTIF Function. ...
  • SUMIF Function.

How do you use Excel formulas for beginners? ›

Enter a formula that contains a built-in function
  1. Select an empty cell.
  2. Type an equal sign = and then type a function. For example, =SUM for getting the total sales.
  3. Type an opening parenthesis (.
  4. Select the range of cells, and then type a closing parenthesis).
  5. Press Enter to get the result.

How do I get a list of formulas in Excel? ›

1. Show Formulas option on the Excel ribbon. In your Excel worksheet, go to the Formulas tab > Formula Auditing group and click the Show Formulas button. Microsoft Excel displays formulas in cells instead of their results right away.

What is the most popular formula in Excel? ›

1. SUM. The SUM function in Excel is used to add up the numbers in a range of cells. It's one of the most popular functions and is quite easy to use.

Top Articles
Latest Posts
Article information

Author: Velia Krajcik

Last Updated:

Views: 6244

Rating: 4.3 / 5 (54 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Velia Krajcik

Birthday: 1996-07-27

Address: 520 Balistreri Mount, South Armand, OR 60528

Phone: +466880739437

Job: Future Retail Associate

Hobby: Polo, Scouting, Worldbuilding, Cosplaying, Photography, Rowing, Nordic skating

Introduction: My name is Velia Krajcik, I am a handsome, clean, lucky, gleaming, magnificent, proud, glorious person who loves writing and wants to share my knowledge and understanding with you.