Function Code()

Code()

This function returns the numeric code for the first letter of the string used as input to this function.


Syntax:

= Code (String)

String = is the text, or reference to a cell that contains the text, for which the Numeric code is to found


Example:

  • = Code("Excel Matic") - result will be - 69 (As 69 is code for 'E')
  • = Code("Matic") - result will be - 77 (As 77 is code for 'M')
  • = Code("excel matic") - result will be - 101 (As 101 is code for 'e')
  • = Code("matic") - result will be - 109 (As 109 is code for 'm')
  • = Code("A") - result will be - 65 (As 65 is code for 'A')
  • = Code("a") - result will be - 97 (As 97 is code for 'a')
Note: The numeric codes for small letters (such as m, e, a, etc.) are different from those of capital letters (such as M, E, A, etc.)


Excel Matic Tip:

In Excel there are 255 numeric codes for the characters and symbols. To know which character is asociated with which code do this:
  • In cell A1 write 1 and in cell A2 write 2
  • Select the rangeA1:A2
  • Now keep the mouse cursor on right-bottom edge of the selection. The cursor will now turn into cross shape (i.e. - '+')
  • Now press the left mouse button and drag down the range with the left button still pressed
  • This will auto-fill the range with consecutive numbers
  • Drag till 255 and stop there
  • Now in cell B1 type this formula:

    =Char(A1)
  • Again drag this range down as done previously till B255
You will see that in the B column all the codes will populate for corresponding characters in column A

Note: The corresponding function to get character for the given numeric code is - Char()
Share on Google Plus

About Rishie Khurana

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment

Monday, June 8, 2009

Function Code()

Code()

This function returns the numeric code for the first letter of the string used as input to this function.


Syntax:

= Code (String)

String = is the text, or reference to a cell that contains the text, for which the Numeric code is to found


Example:

  • = Code("Excel Matic") - result will be - 69 (As 69 is code for 'E')
  • = Code("Matic") - result will be - 77 (As 77 is code for 'M')
  • = Code("excel matic") - result will be - 101 (As 101 is code for 'e')
  • = Code("matic") - result will be - 109 (As 109 is code for 'm')
  • = Code("A") - result will be - 65 (As 65 is code for 'A')
  • = Code("a") - result will be - 97 (As 97 is code for 'a')
Note: The numeric codes for small letters (such as m, e, a, etc.) are different from those of capital letters (such as M, E, A, etc.)


Excel Matic Tip:

In Excel there are 255 numeric codes for the characters and symbols. To know which character is asociated with which code do this:
  • In cell A1 write 1 and in cell A2 write 2
  • Select the rangeA1:A2
  • Now keep the mouse cursor on right-bottom edge of the selection. The cursor will now turn into cross shape (i.e. - '+')
  • Now press the left mouse button and drag down the range with the left button still pressed
  • This will auto-fill the range with consecutive numbers
  • Drag till 255 and stop there
  • Now in cell B1 type this formula:

    =Char(A1)
  • Again drag this range down as done previously till B255
You will see that in the B column all the codes will populate for corresponding characters in column A

Note: The corresponding function to get character for the given numeric code is - Char()

Function Code()SocialTwist Tell-a-Friend

0 comments:

Post a Comment