CHAR

CHAR(number)

Returns the character with the corresponding ANSI/ASCII number.

numberThe number specifying which character you want between 1 and 255.

REMARKS
* This function is useful when you want to specify characters that are difficult or impossible to type directly.
* The "number" argument can be with or without leading zeros.
* The "number" can be a text string representation of a number.
* If "number" < 1, then #VALUE! is returned.
* If "number" > 255, then #VALUE! is returned.
* If "number" is not numeric, then #VALUE! is returned.
* If you are using Windows then the character set is ANSI (which is identical to ASCII).
* If you are using Macintosh then the character set is different to Windows.
* For a full list of all the ASCII String Codes, please refer to the ASCII String Table page.
* You can return a line break by using CHAR(10).
* You can use the CODE function to return the ANSI/ASCII number for the first character in a text string.
* You can use the UNICHAR function to return the character with the corresponding UNICODE number.
* You can use the UNICODE function to return the UNICODE number for the first character in a text string.
* For more information about the different character sets refer to the Character Codes page.
* The equivalent VBA function is VBA.CHR
* For the Microsoft documentation refer to support.microsoft.com

 A
1=CHAR(34) = "
2=CHAR(44) = ,
3=CHAR(65) = A
4=CHAR(66) = B
5=CHAR(67) = C
6=CHAR(97) = a
7=CHAR(98) = b
8=CHAR(128) = €
9=CHAR(130) = ,
10=CHAR("00065") = A
11=CHAR(70) = F
12=CHAR(65+26) = [
13=CHAR(CODE("A")) = A
14=CHAR(CODE("A")+32) = a
15=CHAR(256) = #VALUE!
16=CHAR(-10) = #VALUE!
17=CHAR(40000) = #VALUE!
18=CHAR("text") = #VALUE!

1 - What is the character corresponding to the number 34. This is a double quote.
2 - What is the character corresponding to the number 44. This is a comma.
3 - What is the character corresponding to the number 65. This is capital A.

© 2025 Better Solutions Limited. All Rights Reserved. © 2025 Better Solutions Limited Top