Excel: Chr Function (VBA only)
In Excel, the Chr function returns the character based on the NUMBER code.
The syntax for the Chr function is:
Chr( number_code )
number_code is the NUMBER 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".