Formualizer Docs

CHAR

Returns the character specified by a number Excel uses Windows-1252 encoding for codes 1-255.

Returns the character represented by a numeric code.

CHAR follows Excel-style Windows-1252 behavior for codes 1..255.

The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.

Syntax

=CHAR(number)

Arguments

ArgumentTypeRequiredDefault
numberanyRequired—

Return type

Can return text.

Remarks

  • Input is truncated to an integer code.
  • Codes in the Windows-1252 extension range (128-159) are mapped to Unicode equivalents.
  • Errors are propagated unchanged.

Error cases

  • Valid code range is 1 through 255; outside this range returns #VALUE!.

Examples

Return the character at the numeric code for the letter A.

Formula =CHAR(65)

Expected result A

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Compare the character at the numeric code for the letter a.

Formula =CHAR(97)

Expected result a

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Return the space character at code 32.

Formula =CHAR(32)

Expected result

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Code zero is outside the supported input range.

Formula =CHAR(0)

Expected result #VALUE!

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Out-of-range code

Formula =CHAR(300)

Expected result #VALUE!

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

FAQ

Which character set does CHAR use for codes 128-159?

It follows Excel-style Windows-1252 mappings, including extended symbols in that range.

Implementation

Engine source

On this page