MS Excel: Chr Function (VBA only)
In Excel, the Chr function returns the character based on the ASCII value.
The syntax for the Chr function is:
Chr( ascii_value )
ascii_value is the ASCII value used to retrieve the character.
Applies To:
- Excel 2007, Excel 2003, Excel XP, Excel 2000
For example:
Chr (87) would return "W" Chr (105) would return "i"
VBA Code
The Chr function can only be used in VBA code. For example:
Dim LResult As String
LResult = Chr(87)
In this example, the variable called LResult would now contain the value "W".