Advertisements

Excel CODE Function

The Excel CODE function, which is categorized as Text Function, returns a numeric code for the first character in a text string. For example, =CODE(“A”) returns the value of 65. The returned code corresponds to the character set used by users’ computer. The Excel CODE Function returns ANSI characters for Windows operating system. It is the opposite of CHAR function.

List of examples:

Advertisements

  1. How to generate ANSI value of English letters?
  2. How to generate the ANSI code the first letter of a word?
  3. How to use LOWER function with CODE to generate ANSI code for lower case letters?
  4. How to use UPPER function with CODE to generate ANSI code for UPPER case letters?
  5. How to SUM ANSI codes of different letters?
  6. How to reverse the ANSI code to character?

Excel CODE Function, CODE() function examples, Excel CODE function to Get the code for a character, CODE Formula and how to use CODE function with practical examples

Syntax

CODE (text)

where,

text : is the text or the cell reference of the text for which users want the code of the first characters. This is the only argument and it is required.

Example 1: Generate ANSI value English letters:

Answer: The formula is =CODE(C6), which returns the code for the letter A.

Excel CODE Function, CODE() function examples, Excel CODE function to Get the code for a character, CODE Formula and how to use CODE function with practical examples

Example 2: Generate the ANSI code of the first letter of a word:

Answer: The formula is =CODE(C9) as it is above in example 1.

Example 3: LOWER function with CODE:

Answer: To generate the ANSI code for the letter, which is originally in upper case, users need to combine LOWER and CODE, and the formula is =CODE(LOWER(6)), which returns lowercase A.

Advertisements
Excel CODE Function, CODE() function examples, Excel CODE function to Get the code for a character, CODE Formula and how to use CODE function with practical examples

Example 4: UPPER function with CODE:

Answer: Users can use the combination of UPPER and CODE as it is in example 3. The example code is =CODE(UPPER(text)).

Example 5: Adding ANSI codes of different letters:

Question: How can I add the ANSI values of different letters? Can I use the combination of SUM and CODE functions to add ANSI values?

Answer: Users can add the ANSI values of different letters by simply using the CODE(text)+CODE(text) formula, numeric values and ANSI values can also be added. The combined formula of SUM and CODE is =SUM(CODE(C9:C12), which returns the sum of the letters’ ANSI values in the range C9:C12.

Excel CODE Function, CODE() function examples, Excel CODE function to Get the code for a character, CODE Formula and how to use CODE function with practical examples, How to use the combination of SUM and CODE functions.

Example 6: Reverse of ANSI code:

Answer: To reverse the to the character for a given numeric value (between 0-255), Excel CHAR function is used. The formula to convert numeric values to characters is =CHAR(number). Examples to convert numeric values to characters are in the following image.

CHAR Function in Excel.

More related posts:

MS Office CODE function

REPLACE Function

SUBSTITUTE Function

TRIM Function

Advertisements

ARRAYTOTEXT Function

CLEAN Function

6 Responses

  1. I have noticed that car insurance companies know the vehicles which are at risk from accidents and various risks. In addition they know what types of cars are given to higher risk as well as the higher risk they have got the higher the particular premium price. Understanding the basic basics with car insurance will let you choose the right style of insurance policy which will take care of your requirements in case you happen to be involved in an accident. Many thanks for sharing your ideas in your blog.

  2. Thanks for the thoughts you have provided here. Also, I believe there are several factors that keep your motor insurance premium lower. One is, to bear in mind buying cars that are inside good set of car insurance firms. Cars which have been expensive tend to be at risk of being snatched. Aside from that insurance policies are also good value of your vehicle, so the more costly it is, then higher the premium you make payment for.

  3. The next time I read a blog, I hope that it doesnt disappoint me as much as this one. I mean, I know it was my option to read, however I really thought youd have one thing interesting to say. All I hear is a bunch of whining about something that you can fix when you werent too busy in search of attention.

  4. You really make it appear so easy with your presentation but I find this matter to be actually something which I believe I might never understand. It kind of feels too complex and extremely huge for me. I am having a look forward for your next submit, I will try to get the dangle of it!

Leave a Reply

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

Advertisements